WoW:API SetRaidTargetIcon: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (catfix, Replaced: {{framexml → <br>{{framexml)
(boilerplate)
Line 1: Line 1:
<br>{{framexmlfunc|FrameXML/TargetFrame.lua}} __NOTOC__
{{framexmlfunc|FrameXML/TargetFrame.lua}} __NOTOC__
 
Sets or clears a Raidicon on top of a unit.
 
  SetRaidTargetIcon("unit", index)
  SetRaidTargetIcon("unit", index)


Sets or clears a Raidicon on top of a unit.
== Arguments ==
 
;unit : String - UnitID, e.g. "target"
 
;index : Integer - Raid icon index; 0 to remove any icons from the unit.
== Parameters ==
::1 = Yellow 4-point Star
=== Arguments ===
::2 = Orange Circle
:("unit", index)
::3 = Purple Diamond
 
::4 = Green Triangle
:;unit : String - UnitID, e.g. "target"
::5 = White Crescent Moon
:;index : Integer - Index of the RaidIcon, see example below
::6 = Blue Square
 
::7 = Red "X" Cross
== Example ==
::8 = White Skull
SetRaidTargetIcon("target", 1);  -- Star
SetRaidTargetIcon("target", 2);  -- Circle
SetRaidTargetIcon("target", 3);  -- Diamond
SetRaidTargetIcon("target", 4);  -- Triangle
SetRaidTargetIcon("target", 5);  -- Moon
SetRaidTargetIcon("target", 6);  -- Square
SetRaidTargetIcon("target", 7);  -- Cross
SetRaidTargetIcon("target", 8);  -- Skull
SetRaidTargetIcon("target", 0);  -- Remove RaidIcon
 
==Details==
 
: Patch 1.11 introduced RaidIcons for easier targetting. This function sets an icon on top of a targets head.
 
Setting the same icon twice to the same target will drop the icon (look at the function in TargetFrame.lua).


{{AlsoSee|[[API SetRaidTarget|SetRaidTarget]] and [[API GetRaidTargetIndex|GetRaidTargetIndex]]}}
== Notes ==
* Patch 1.11 introduced RaidIcons for easier targetting. This function sets an icon on top of a targets head.
* Setting the same icon twice to the same target will drop the icon.
* {{api|SetRaidTarget}} is the native API function used (and does not exhibit the toggling behavior); see also {{api|GetRaidTargetIndex}}.

Revision as of 23:17, 25 December 2009

WoW API < SetRaidTargetIcon

"I" iconThis function is implemented in Lua here FrameXML/TargetFrame.lua.

Sets or clears a Raidicon on top of a unit.

SetRaidTargetIcon("unit", index)

Arguments

unit
String - UnitID, e.g. "target"
index
Integer - Raid icon index; 0 to remove any icons from the unit.
1 = Yellow 4-point Star
2 = Orange Circle
3 = Purple Diamond
4 = Green Triangle
5 = White Crescent Moon
6 = Blue Square
7 = Red "X" Cross
8 = White Skull

Notes

  • Patch 1.11 introduced RaidIcons for easier targetting. This function sets an icon on top of a targets head.
  • Setting the same icon twice to the same target will drop the icon.
  • SetRaidTarget is the native API function used (and does not exhibit the toggling behavior); see also GetRaidTargetIndex.