WoW:API UnitRangedDamage

Revision as of 05:37, 4 January 2006 by WoWWiki>Muert
UnitRangedDamage -Documentation by geekgirljess-
speed, lowDmg, hiDmg = 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.

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

Template:WoW API