Commit 76be882d authored by mercury233's avatar mercury233

update GetID

parent 4e2795f8
...@@ -5,12 +5,8 @@ POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE ...@@ -5,12 +5,8 @@ POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE
RACE_CYBERS=RACE_CYBERSE RACE_CYBERS=RACE_CYBERSE
function GetID() function GetID()
local str=string.match(debug.getinfo(2,"S")["source"],"c%d+%.lua") local offset=self_code<100000000 and 1 or 100
str=string.sub(str,1,string.len(str)-4) return self_table,self_code,offset
local scard=_G[str]
local id=tonumber(string.sub(str,2))
local offset=id<100000000 and 1 or 100
return scard,id,offset
end end
--the lua version of the bit32 lib, which is deprecated in lua 5.3 --the lua version of the bit32 lib, which is deprecated in lua 5.3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment