Script::UnitDamage
function · ui · primitive
- Address
0x518c20· 545 bytes, up to0x518e40- Signature
int __fastcall (lua_State *L)- Meaning
- Returns a unit's melee damage range, the physical bonus values and the damage percent
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitstats#damage
Finding: Damage in ui: unit stat functions
UnitDamage(unit) returns seven values: the main-hand and off-hand minimum and maximum damage (UNIT_FIELD_MINDAMAGE
to MAXOFFHANDDAMAGE, fields 134 to 137, floats), then the physical bonus damage positive and negative (signed
integers, fields 1201 and 1208), then the damage percent (a float, field 1215). UnitRangedDamage(unit) returns the
ranged speed in seconds, the ranged minimum and maximum (fields 171 and 172) and the same three bonus values read for
the damage school of the ranged weapon. The bonus values are read only for the local player; for another player they
are 0, 0 and 0.0, and for a non-player they are 0, 0 and 1.0.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 6
- ClntObjMgrGetActivePlayer objectlayer
- GetUnitFromToken ui
- lua_isstring lua
- lua_tostring lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.