benilla-re systems structs docs

Script::SetInventoryPortaitTexture

function · ui · primitive

Address
0x4c9150 · 468 bytes, up to 0x4c9323
Signature
int __fastcall (lua_State *L)
Meaning
Clears a texture, then fails to resolve its unit because it reads the token from argument 1
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/portraittextures#inventory-portrait

Finding: Inventory portrait in ui: portrait textures

SetInventoryPortaitTexture(texture, unit, slot) is 0x4c9150. After the three texture checks it clears the texture, then needs argument 2 to be a string (Usage: SetInventoryPortaitTexture(texure, unit, slot)) and argument 3 to be a slot the reader accepts (Invalid inventory slot in SetInventoryPortaitTexture). It then reads the unit token from argument 1, the texture table, which is never a string, so the token is null and the function returns with the texture cleared. The unit and slot code after that, which finds a player, an ammo item or the item in the slot and builds the same icon path as the bag portrait, cannot be reached with a table as argument 1.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 17

Calls and jumps by a bare address, from tables/calls.tsv.