WoW:API UnitGUID: Difference between revisions

m
Previous note incorrect.
m (Previous note incorrect.)
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.
: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.
NOTE: On the server Alexstraza I have seen the 1st 3 numbers be 040, meaning you must mask with 0x7 and 0=player, not 8.   
:NOTE: On the server Alexstraza I have seen the 1st 3 numbers be 040, meaning you must mask with 0x7 and 0=player, not 8.
:CORRECTION: If you have masked with 0x7 then the result CANNOT be 8.  Masking 8 with 0x7 gives 0.  It seems reasonable to conclude that the original poster is correct.   
:; 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