Wikia

WoWWiki

API UnitRangedDamage

Talk0
101,391pages on
this wiki
WoW API < UnitRangedDamage

Returns the unit's ranged damage and speed.

speed, lowDmg, hiDmg, posBuff, negBuff, percent = UnitRangedDamage("player");

ParametersEdit

ArgumentsEdit

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

ReturnsEdit

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)


ExampleEdit

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

ResultEdit

Calculates your average damage per second.

Around Wikia's network

Random Wiki