|
恩,为什么做呢。。。参考I00Z和I010。。。。
function Mod_EX takes integer m, integer d,integer p returns integer
return (m - (m / d) * d)/p
endfunction
function BlizzardId2IntSingle takes integer b returns integer
if(b>=48 and b<=57)then
return b-48
elseif(b>=65 and b<=90)then
return b-55
endif
return 0
endfunction
function BlizzardId2Int takes integer b returns integer
local integer k = b
local integer n
local integer s = 0
set n = Mod(k,256)
set s = s+BlizzardId2IntSingle(n)
set k = k - n
set n = Mod_EX(k,65536,256)
set s = s+BlizzardId2IntSingle(n)*36
set k = k - n
set n = Mod_EX(k,16777216,65536)
set s = s+BlizzardId2IntSingle(n)*1296
set k = k - n
set n = k/16777216
set s = s+BlizzardId2IntSingle(n)*46656
return s
endfunction |
评分
-
查看全部评分
|