REDIVIVUS

Proposals / #777

Mac: retype ITEM_SetItemInBodyLocation's pItem to D2UnitStrc *

applied · by Captain-Fwiffo · submitted 2026-11-01, applied 2026-11-02

Ghidra vmac 108 · bc4e150

Mac twin of the Windows ITEM_SetItemInBodyLocation(D2InventoryStrc *, D2UnitStrc * pItem, uint32_t eBodyLoc) at 004c1c50, already typed there and paired (mac-pair T1a). The Mac body only null-tests pItem and forwards it to INVENTORY_GetItemAtBodyLoc, whose parameter is a D2UnitStrc * (the decompile shows a (D2UnitStrc *)pItem cast), so there is no direct field access to cite; the evidence is the pairing and the typed callee. Same-width retype of the second stack parameter; name kept. Mac callers were not traced.

Changes 1, applied together

  1. Retype variable mac 0x00102208 Stack[0x8]

    typeint32_t→D2UnitStrc *