REDIVIVUS

Proposals / #792

Complete Mac equipped-item query output and success types

applied · by Commit-Will · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 110 · 9528519

Mac shield/weapon inventory queries have undefined returns and scalar-pointer output metadata. Complete native bodies return full EAX0/1 and write actual D2UnitStrc* values through item outputs. Weapon body-location writes are four-byte right/left-arm enum4/5; its primary flag is four-byte0/1. Use BOOL returns, D2UnitStrc** item outputs, existing eD2BodyLocDWORD* and BOOL* outputs. Preserve every chosen name, cdecl, formal count and slot. All18 incoming code-call argument/result contexts, existing grid-cell producer and primary getter were audited against raw Mac bytes; both Windows twins match the original PE. No caller/helper/shared-layout changes or runtime/build gain claimed.

Changes 2, applied together

  1. Set prototype mac 0x00169068

    signatureundefined INVENTORY_GetEquippedShield(D2InventoryStrc * pInventory, undefined4 * ppShield)→BOOL INVENTORY_GetEquippedShield(D2InventoryStrc * pInventory, D2UnitStrc * * ppShield)
    convention__cdecl
  2. Set prototype mac 0x00169121

    signatureundefined INVENTORY_GetEquippedWeapon(D2InventoryStrc * pInventory, undefined4 * ppWeapon, undefined4 * pBodyLoc, undefined4 * pbIsPrimary)→BOOL INVENTORY_GetEquippedWeapon(D2InventoryStrc * pInventory, D2UnitStrc * * ppWeapon, eD2BodyLocDWORD * pBodyLoc, BOOL * pbIsPrimary)
    convention__cdecl