Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API UnitRangedDamage

From WoW Classic Wiki
UnitRangedDamage -Documentation by geekgirljess-
speed, lowDmg, hiDmg, posBuff, negBuff, percent = UnitRangedDamage("player");

Returns the unit's ranged damage and speed.


Arguments
("unit")
unit
String - The UnitId to get information from. (Likely only works for "player" and "pet" -- unconfirmed)

Returns
speed, lowDmg, hiDmg
speed
Number - The unit's ranged weapon speed (0 if no ranged weapon equipped).
lowDmg
Number - The unit's minimum ranged damage.
hiDmg
Number - The unit's maximum ranged damage.
posBuff
Number - The unit's positive Bonus on ranged attacks (includes Spelldamage increases)
negBuff
Number - The unit's negative Bonus on ranged attacks
percent
Number - percentage modifier (usually 1)



Example
local speed, lowDmg, hiDmg = UnitRangedDamage("player");
local avgDmg = (lowDmg + hiDmg) / 2;
local avgDps = avgDmg / speed;

Template:WoW API