Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement

Returns the unit's melee attack power and modifiers.

base, posBuff, negBuff = UnitAttackPower(unit)

Arguments[]

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

Returns[]

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[]

Displays the player's current attack power in the default chat window.

local base, posBuff, negBuff = UnitAttackPower("player")
local effective = base + posBuff + negBuff
print("Your current attack power: "..effective)
Advertisement