Threat-2.0

From WowAce Wiki

Jump to: navigation, search

Contents

Changes from Threat-1.0

Internal changes

  • All spell names are being replaces with spell IDs or tables of spell IDs. This removes the dependency on Babble-Spell, and provides implicit rank info.
  • Class core API and transactional changes
    • Transactions are no longer implicitly started. Instead, you start one by calling a transactional threat method.
    • AddTargetThreat -> AddTargetThreatTransactional
    • MultiplyTargetThreat -> MultiplyTargetThreatTransactional
    • AddThreat -> AddThreatTransactional
    • MultiplyThreat -> MultiplyThreatTransactional
    • SetTargetThreat -> SetTargetThreatTransactional
    • ReduceAllThreat -> ReduceAllThreatTransactional
    • _addTargetThreat -> AddTargetThreat
    • _multiplyTargetThreat -> MultiplyTargetThreat
    • _addThreat -> AddThreat
    • _multiplyThreat -> MultiplyThreat
    • _setTargetThreat -> SetTargetThreat
    • _reduceAllThreat -> ReduceAllThreat
    • NPC modules now expect to be registered with NPCIDs
    • NPC modules now have :RegisterSpellHandler(spell1ID, spell2ID, ..., spellNID, func)
      • func is of the signature function(mobGUID, targetUnitID), where targetUnitID is "player" or "pet".
  • ClassCore.SpecialCastHandlers -> ClassCore.CastLandedHandlers
  • ClassCore.ClassBuffs -> ClassCore.BuffHandlers

External Changes

  • All interfaces that previously took unit names now take unit GUIDs


:GetThreat("playerGUID", "targetGUID")

Returns a player's (or pet's) threat on a given target.

Arguments
"playerGUID"
string - GUID of the party member to get threat for
"targetGUID"
string - GUID of the target to get threat on

Returns

  • integer - threat level of the given player (or pet) on the given target

:IterateGroupThreatForTarget("targetGUID")

Gives you an iterator for the group's threat on a given target.

Arguments
"targetGUID"
string - GUID of the target to get threat on

Returns

  • function - an iterator that can be used to iterate the group's threat on the given target

:IteratePlayerThreat("playerGUID")

Gives you an iterator for the player's threat on all known targets.

Arguments
"playerGUID"
string - GUID of the player to get threat for

Returns

  • function - an iterator that can be used to iterate the player's threat on all known targets

:GetMaxThreatOnTarget("targetGUID")

Returns the maximum threat level on the target. This is not necessarily the threat of the aggro holder due to the 110%/130% aggro threshold.

Arguments
"targetGUID"
string - GUID of the target to get max threat on

Returns

  • integer - maximum threat on this target.
Personal tools
Support the Site