Flickering19966@legacy41540688 (talk | contribs) m (Categorization) |
Muert39620@legacy41559547 (talk | contribs) No edit summary |
||
Line 24: | Line 24: | ||
local base, posBuff, negBuff = UnitAttackPower("unit"); |
local base, posBuff, negBuff = UnitAttackPower("unit"); |
||
local effective = base + posBuff + negBuff; |
local effective = base + posBuff + negBuff; |
||
+ | |||
---- |
---- |
||
− | {{ |
+ | {{WoW API}} |
− | [[Category:API Unit Functions|UnitAttackPower]] |
Revision as of 05:31, 4 January 2006
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