Mercurial > wow > wowdb-profiler
comparison Main.lua @ 66:e84a1e960bed
Change method of extracting ID from GUID
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Mon, 30 Jul 2012 09:50:44 -0500 |
parents | 3f7a12a9163c |
children | 8cbb3d7b8522 |
comparison
equal
deleted
inserted
replaced
65:3f7a12a9163c | 66:e84a1e960bed |
---|---|
221 end | 221 end |
222 local types = private.UNIT_TYPES | 222 local types = private.UNIT_TYPES |
223 local unit_type = _G.bit.band(tonumber(guid:sub(1, 5)), UNIT_TYPE_BITMASK) | 223 local unit_type = _G.bit.band(tonumber(guid:sub(1, 5)), UNIT_TYPE_BITMASK) |
224 | 224 |
225 if unit_type ~= types.PLAYER and unit_type ~= types.PET then | 225 if unit_type ~= types.PLAYER and unit_type ~= types.PET then |
226 return unit_type, tonumber(guid:sub(-12, -9), 16) | 226 return unit_type, tonumber(guid:sub(6, 10), 16) |
227 end | 227 end |
228 | |
229 return unit_type | 228 return unit_type |
230 end | 229 end |
231 end -- do-block | 230 end -- do-block |
232 | 231 |
233 | 232 |