Formatting mostly
(Formatting mostly) |
|||
| Line 1: | Line 1: | ||
{{wowapitype}} | |||
Many of the API functions which act on units in the game world (Players, NPC's, Monsters, etc) refer to the unit in question by an identifier that is related to how the player is accessing the unit. The following values are available: | Many of the API functions which act on units in the game world (Players, NPC's, Monsters, etc) refer to the unit in question by an identifier that is related to how the player is accessing the unit. The following values are available: | ||
| Line 7: | Line 9: | ||
; <tt>"pet"</tt> : The current player's pet | ; <tt>"pet"</tt> : The current player's pet | ||
; <tt>" | ; <tt>"party''N''"</tt> : The ''N''th party member excluding the player (1,2,3 or 4) | ||
; <tt>" | ; <tt>"partypet''N''"</tt> : The pet of the ''N''th party member (N is 1,2,3, or 4) (Added in 1.5.0) | ||
; <tt>" | ; <tt>"raid''N''"</tt> : The raid member with [[raidIndex]] ''N'' (1,2,3,...,40). | ||
; <tt>" | ; <tt>"raidpet''N''"</tt> : The pet of the raid member with [[raidIndex]] ''N'' (1,2,3,...,40) (Added in 1.5.0) | ||
; <tt>"target"</tt> : The currently targetted unit | ; <tt>"target"</tt> : The currently targetted unit | ||
| Line 31: | Line 27: | ||
== Targets == | == Targets == | ||
You can append the suffix <tt>target</tt> to any UnitId to get a UnitId which refers to that unit's target (e.g. <tt>"partypet2target"</tt>). This appending can be repeated indefinitely (<tt>"playertargettarget"</tt>), though you will observe an attendant performance hit if you overdo it, as the game engine has to jump from target to target. | You can append the suffix <tt>target</tt> to any UnitId to get a UnitId which refers to that unit's target (e.g. <tt>"partypet2target"</tt>). This appending can be repeated indefinitely (e.g. <tt>"playertargettarget"</tt>), though you will observe an attendant performance hit if you overdo it, as the game engine has to jump from target to target. | ||
== Notes == | == Notes == | ||
| Line 38: | Line 34: | ||
Also, some functions return different values if the target is close enough to be 'visible' to your client (not necessarily in line of sight), as can be determined with [[API UnitIsVisible|UnitIsVisible("unit")]], versus further away. | Also, some functions return different values if the target is close enough to be 'visible' to your client (not necessarily in line of sight), as can be determined with [[API UnitIsVisible|UnitIsVisible("unit")]], versus further away. | ||