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 UnitAttackPower

From WoW Classic Wiki
UnitAttackPower -Documentation by Flickering-
base, posBuff, negBuff = UnitAttackPower("unit");

Returns the unit's melee attack power and modifiers.


Arguments
("unit")
unit
String - The UnitId to get information from. (Does not work for "target" - Possibly only "player" and "pet")

Returns
base, posBuff, negBuff
base
Number - The unit's base attack power
posBuff
Number - The total effect of positive buffs to attack power.
negBuff
Number - The total effect of negative buffs to the attack power (a negative number)

Example
local base, posBuff, negBuff = UnitAttackPower("unit");
local effective = base + posBuff + negBuff;



Template:WoW API