WoW:API UnitDamage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API UnitDamage to API UnitDamage without leaving a redirect)
 
(8 intermediate revisions by 8 users not shown)
Line 1: Line 1:
=== Description ===
{{wowapi}} __NOTOC__
 
Unit damage returns information about your current damage stats. Doesn't seem to return usable values for mobs, NPCs, or other players. The method returns 7 values, only some of which appear to be useful.
Unit damage returns information about your current damage stats. Doesn't seem to return usable values for mobs, NPCs, or other players. The method returns 7 values, only some of which appear to be useful.


=== Return Values ===
lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod = UnitDamage("unit");
# Low damage melee (tested appears correct)
 
# High damage melee (tested appears correct)
== Parameters ==
# Low damage unarmed (untested, 0 on a Paladin, actual number on a Priest)
=== Arguments ===
# High damage unarmed (untested, 0 on a Paladin, actual number on a Priest)
 
# Unknown (perhaps ranged)
:;unit : String - The [[unitId]] to get information for. (Likely only works for <tt>"player"</tt> and <tt>"pet"</tt>. Possibly for [[Beast Lore]]'d <tt>"target"</tt>s. -- unconfirmed)
# Unknown (perhaps ranged)
 
# Unknown (often times holds the value 1)
=== Returns ===
 
: lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod
 
:;lowDmg : Number - The unit's minimum melee damage.
:;hiDmg : Number - The unit's maximum melee damage.
:;offlowDmg : Number - The unit's minimum offhand melee damage.
:;offhiDmg : Number - The unit's maximum offhand melee damage. (same as above)
:;posBuff : Number - positive physical Bonus (should be >= 0)
:;negBuff : Number - negative physical Bonus (should be <= 0)
:;percentmod : Number - percentage modifier (usually 1; 0.9 for warriors in defensive stance)

Latest revision as of 04:47, 15 August 2023

WoW API < UnitDamage

Unit damage returns information about your current damage stats. Doesn't seem to return usable values for mobs, NPCs, or other players. The method returns 7 values, only some of which appear to be useful.

lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod = UnitDamage("unit");

Parameters[edit]

Arguments[edit]

unit
String - The unitId to get information for. (Likely only works for "player" and "pet". Possibly for Beast Lore'd "target"s. -- unconfirmed)

Returns[edit]

lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod
lowDmg
Number - The unit's minimum melee damage.
hiDmg
Number - The unit's maximum melee damage.
offlowDmg
Number - The unit's minimum offhand melee damage.
offhiDmg
Number - The unit's maximum offhand melee damage. (same as above)
posBuff
Number - positive physical Bonus (should be >= 0)
negBuff
Number - negative physical Bonus (should be <= 0)
percentmod
Number - percentage modifier (usually 1; 0.9 for warriors in defensive stance)