WoW:UnitFlag: Difference between revisions

98 bytes added ,  15 August 2023
m
Move page script moved page UnitFlag to WoW:UnitFlag without leaving a redirect
m (Corrected spelling/grammar)
m (Move page script moved page UnitFlag to WoW:UnitFlag without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 17: Line 17:
|COMBATLOG_OBJECT_TYPE_NPC||0x||0||0||0||0||0||'''8'''||0||0
|COMBATLOG_OBJECT_TYPE_NPC||0x||0||0||0||0||0||'''8'''||0||0
|-
|-
|class="alt"|COMBATLOG_OBJECT_TYPE_PLAYER||0x||0||0||0||0||0||'''4'''||0||0
|class="alt"|COMBATLOG_OBJECT_TYPE_PLAYER||0x||0||0||0||0||0||4||0||0
|-align="center"
|-align="center"
!colspan="10"|Controller
!colspan="10"|Controller
Line 127: Line 127:
**Since '''0x1148''' can also be an enemy player's pet you need to check the [[API UnitGUID| unit GUID]] to know if it's an enemy pet or a player character.
**Since '''0x1148''' can also be an enemy player's pet you need to check the [[API UnitGUID| unit GUID]] to know if it's an enemy pet or a player character.
*A player who was charmed by a NPC is '''0x1248''' (A hostile pet controlled by an outsider NPC)
*A player who was charmed by a NPC is '''0x1248''' (A hostile pet controlled by an outsider NPC)
if bit.band(UnitFlag, COMBATLOG_OBJECT_CONTROL_PLAYER) > 0 then
  print("Controller: a player")
end
Anonymous user