Script::UnitAttackSpeed
function · ui · primitive
- Address
0x518e50· 290 bytes, up to0x518f71- Signature
int __fastcall (lua_State *L)- Meaning
- Returns the main-hand speed and the off-hand speed when a player holds an off-hand weapon
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitstats#attack-speed
- Test
ui::luabind_518e50_unit_attack_speed
Finding: Attack speed in ui: unit stat functions
UnitAttackSpeed(unit) returns two values. The first is the main-hand speed in seconds (UNIT_FIELD_BASEATTACKTIME,
field 126, as an unsigned 64-bit read scaled by 0.001), or 0 for no unit. The second is the off-hand speed (field 127,
scaled the same) when the unit is a player with more than 16 items listed whose item in slot 16 is a weapon (item
class 2), and nil otherwise.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 8
- ClntObjMgrObjectPtr objectlayer
- GetUnitFromToken ui
- GetItemClass objectlayer
- lua_isstring lua
- lua_tostring lua
- lua_pushnil lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.