Script::UnitRangedDamage
function · ui · primitive
- Address
0x518910· 634 bytes, up to0x518b89- Signature
int __fastcall (lua_State *L)- Meaning
- Returns the ranged speed, damage range and the bonus values of the ranged weapon's school
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitstats#damage
- Test
ui::luabind_518910_unit_ranged_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 8
- ClntObjMgrGetActivePlayer objectlayer
- GetUnitFromToken ui
- DBCache_ItemStats_C_int_HASHKEY_INT_::GetRecord dbcache
- CGPlayer_C::GetVisibleItem objectlayer
- lua_isstring lua
- lua_tostring lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.