Threat-2.0 API Documentation

From WowAce Wiki
Jump to: navigation, search

API Documentation

Note: This documentation is auto-generated. Please note that direct modifications may be overwritten on next autogenerate.

:ClearStoredThreatTables(mob_guid)

Arguments

mob_guid
type - (needs documentation)


:EncounterMobs()

Notes

Returns the number of known alive mobs in the current encounter. Not generally needed by GUIs; may be needed by Class core


:GetCumulativeThreat()

Returns

integer - this player's cumulative threat in the encounter, suitable for publishing to KTM or similar


:GetMaxThreatOnTarget("target_guid")

Arguments

"target_guid"
string - GUID of the target to get max threat one.

Notes

Returns the maximum threat value and the GUID of the player with the maximum threat on the given target


:GetPlayerAtPosition(guid , position)

Arguments

guid
type - (needs documentation)
position
type - (needs documentation)


:GetThreat("player_guid" , "target_guid")

Arguments

"player_guid"
string - Name of the player or pet to get threat for
"target_guid"
string - Name or hash of the target to get threat on

Notes

Returns a float corresponding to the given player or pet's threat level on the given target


:IsActive()

Returns

boolean - whether Threat-1.0 is currently activated.


:IsCompatible(user)

Arguments

user
type - (needs documentation)


:IsOutOfDate("name")

Arguments

"name"
string - name of the party member to check

Returns

  • boolean - whether the given party member is using an out-of-date ThreatLib or not
  • integer - our version number
  • integer - the latest revision number we've seen
  • string - the name of the person holding the latest revision


:IsUsingForeignThreatSource("partyMember")

Arguments

"partyMember"
string - name of the party member to check

Notes

Returns a boolean indicating whether the given party member is using ThreatLib (false) or an external source like KTM (true)


:IterateGroupThreatForTarget(target_guid)

Arguments

target_guid
type - (needs documentation)


:IteratePlayerThreat(player_guid)

Arguments

player_guid
type - (needs documentation)


:RequestActiveOnSolo(value)

Arguments

value
boolean - whether to be activated. Default: true

Notes

This is meant to be called by a GUI to allow for testing in solo situations.


:RequestThreatClear()

Notes

Executes a raid-wide threat wipe Must have privileges to execute this; you can clear your own, but other clients are going to verify that you're allowed to do this


:SendThreatTo("targetPlayer" , "targetEnemy" , threat)

Arguments

"targetPlayer"
string - guid of the group member to send threat to
"targetEnemy"
string - guid of the enemy to send threat for
threat
float - amount of threat to send

Notes

Sends a given amount of threat to a group member. Used for Misdirection. Not needed by GUIs.


:SetNPCModuleValue("var_name" , var_value)

Arguments

"var_name"
string - variable name to set
var_value
float - value to set for variable


:ToggleThreatPublish(val)

Arguments

val
boolean - Whether or not to publish threat updates

Notes

Toggles threat publishes on and off, in case you don't want to send threat values to your group for some reason


:UnitInMeleeRange("unitID")

Arguments

"unitID"
string - UnitID to check melee range for

Notes

Returns true if the unit is within 10 yards


:UpdatePartyGUIDs()

No arguments

:WipeRaidThreatOnMob(mob_id)

Arguments

mob_id
integer - NPC ID of the enemy to ask the group to wipe threat on

Notes

Sends a comm message to the group instructing them to wipe their threat levels on a specific mob. This is not protected as it needs to be able to be executed by anyone who sees the relevant events.

KTM protects this by requiring 2 or more people to send the event before it is processed.