Lua GetMainTank

From ArcEmu-Wiki
Jump to: navigation, search


This returns whatever player has the most aggro/threat. It can be used to determine if an event will take place, or to select a unit to cast spells on, etc.


  • A returned value
function wikiExample(pUnit, event)
if pUnit:GetMainTank() == Ardwin then
<actions here>

In that example, if the Main Tank was Ardwin, it would do the actions specified where <actions here> is.

  • Selecting a target
function wikiExample(pUnit, event)
pUnit:FullCastSpellOnTarget(40860, pUnit:GetMainTank())

In that example, the action FullCastSpellOnTarget, casts a complete spell on the the specified in the parameters which is GetMainTank().

Personal tools