m
Removed " or <tt>"NPC"</tt>" since tokens are not case sensitive. Added "Others" section. Added stuff under "player".
m (Removed " or <tt>"NPC"</tt>" since tokens are not case sensitive. Added "Others" section. Added stuff under "player".) |
|||
| Line 1: | Line 1: | ||
{{wowapitype}} | {{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 (they are '''not''' case sensitive): | ||
== Base Values == | == Base Values == | ||
| Line 7: | Line 7: | ||
; <tt>"focus"</tt> : The current player's focus target as selected by the /focus command. (Added in 2.0.0) | ; <tt>"focus"</tt> : The current player's focus target as selected by the /focus command. (Added in 2.0.0) | ||
; <tt>"player"</tt> : The current player | ; <tt>"player"</tt> : The current player. | ||
:: It appears that you can also use the current player's proper name in place of "player" (e.g. "[[Server:Cenarion_Circle_US/Treader|Treader]]"). Although; it seems a little unnecessary since "player" requires no effort from the Lua engine. Plus getting the current player's proper name involves passing "player" to [[API_UnitName|UnitName]](), so you might as well just pass "player" to whichever function you are calling. | |||
; <tt>"pet"</tt> : The current player's pet | ; <tt>"pet"</tt> : The current player's pet | ||
| Line 27: | Line 28: | ||
; <tt>"none"</tt>: A valid unit token that always refers to no unit. | ; <tt>"none"</tt>: A valid unit token that always refers to no unit. | ||
The following value also appears in some very specific places (Vendor interactions, for example) | ==Others== | ||
The following value also appears in some very specific places (Vendor interactions, for example) or functions. | |||
; <tt>"npc | ; <tt>"npc"</tt> : The NPC with which the player is currently interacting. | ||
== Targets == | == Targets == | ||