Script::GetWeaponEnchantInfo
function · ui · primitive
- Address
0x4c9790· 521 bytes, up to0x4c9998- Signature
int __fastcall (lua_State *L)- Meaning
- Returns six values for the main-hand and off-hand temporary enchantments: flag, milliseconds left and charges
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/inventory#weapon-enchant-info
Finding: Weapon enchant info in ui: inventory queries and alerts
GetWeaponEnchantInfo() takes no argument and ignores any it is given. It always returns six values, three for the
main-hand item (equipment slot 15) and then three for the off-hand item (slot 16): whether the item has a temporary
enchantment (the number 1, else nil), the milliseconds left (a number, nil when the duration field is 0) and the charges
(a number). A hand with no item, an item whose record flags carry 0x2000, or an enchantment id of 0 gives three nils for
that hand, and the off hand is read either way. With no player object all six are nil.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 6
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGItem_C::GetEnchantmentRemainingMs objectlayer
- GetItemInSlot objectlayer
- lua_pushnil lua
- lua_pushnumber lua
Calls and jumps by a bare address, from tables/calls.tsv.