Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:UnitFlag
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Explanation== A unit can only be one type from each of the following four categories: # Type # Controller # Reaction # Controller affiliation Here’s a quick explanation of how these flags are broken down: ===Type=== This is the way the unit is ''currently'' being controlled: *Units directly controlled by humans are players. *Units controlled by the server are NPCs. *Pets are units controlled by a player or NPC. *Guardians are automatons that are not controlled, but automatically defend their master. *Objects are everything else, such as Traps. The result is that these bits can tell you what kind of unit that combat log object was. ===Controller=== This is who currently controls this object. It can only be controlled by a physical human player or by a server NPC. ===Reaction=== This is the unit’s faction reaction, relative to you. Anything that hates you is Hostile, anything that is friendly with you is Friendly, everything else is Neutral. ===Controller affiliation=== A unit’s controller affiliation is the unit’s controller relationship relative to YOU. Either it is controlled by you, your party, your raid or someone else. {| | {|class="darktable" | {|class="darktable" | {|class="darktable" |Mine |} |Party |} |Raid |} |Outsiders |} ===Example=== *A player who is dueling you is '''0x0548''' (A hostile player controlled by an outsider physical human being) *A player who was mind controlled by another player that attacks you is '''0x1148''' (A hostile pet who is controlled by an outsider player) **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) if bit.band(UnitFlag, COMBATLOG_OBJECT_CONTROL_PLAYER) > 0 then print("Controller: a player") end
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)