WoW:API UnitGUID: Difference between revisions

Changed the number which stands for players to 8 instead of 0.
(→‎Example: Decomposing a GUID: Change to 4.0 NPC ID in scripts)
(Changed the number which stands for players to 8 instead of 0.)
Line 31: Line 31:
:; AA : unknown; Possible battlegroup identifier when used for players.
:; AA : unknown; Possible battlegroup identifier when used for players.
:; B : unit type, mask with 0x7 to get: 0 for players, 1 for world objects, 3 for NPCs, 4 for permanent pets, 5 for vehicles.  Temporary pets (Treants, Spirit Wolves, Water Elemental, Mirror Images, and Ghouls) are considered NPCs (3), even if talents or glyphs prevent them from expiring.
:; B : unit type, mask with 0x7 to get: 0 for players, 1 for world objects, 3 for NPCs, 4 for permanent pets, 5 for vehicles.  Temporary pets (Treants, Spirit Wolves, Water Elemental, Mirror Images, and Ghouls) are considered NPCs (3), even if talents or glyphs prevent them from expiring.
NOTE: According to my personal analysis, I found that the number stands for players should be 8 instead of 0. I don't know if this is a newly update.
:; 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.
Anonymous user