WoW:API UnitGUID: Difference between revisions

24 bytes removed ,  22 August 2009
Undo revision 1989690 by Blamdarot (talk): old phrasing is better
(Undo revision 1989690 by Blamdarot (talk): old phrasing is better)
Line 30: Line 30:
A GUID can be thought of as being composed of multiple pieces of data. Consider "'''0xAABCCCDDDDEEEEEE'''", where:
A GUID can be thought of as being composed of multiple pieces of data. Consider "'''0xAABCCCDDDDEEEEEE'''", where:
:; AA : unknown.
:; AA : unknown.
:; B : unit type : 0 for players, 1 for world objects, 3 for NPCs, 4 for pets, 5 for vehicles. (A mask with 0x7 will also get these values.
:; B : unit type, mask with 0x7 to get: 0 for players, 1 for world objects, 3 for NPCs, 4 for pets, 5 for vehicles.
:; CCC : If the unit is a pet, CCCDDDD forms a unique ID for the pet based on creation order; if a world object, CCCDDDD is the object ID; otherwise unknown.
:; CCC : If the unit is a pet, CCCDDDD forms a unique ID for the pet based on creation order; if a world object, CCCDDDD is the object ID; otherwise unknown.
:; DDDD : If the unit is an NPC, this is the hexadecimal representation of the NPC id.
:; DDDD : If the unit is an NPC, this is the hexadecimal representation of the NPC id.