REDIVIVUS

Proposals / #758

Recover the Mac inventory-removal Boolean and item input

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

Ghidra vmac 109 · 39698f0

Complete Mac removal001670b9 reads one incoming stack dword, validates item unit type4, follows its existing item-data pInventory and updates inventory/item links. Its sole return has exactly two reaching EAX definitions: full XOR0 at001670cb and MOV1 at00167366. All8 current direct callers pass the item at outgoing[ESP]; recursive cleanup explicitly tests full EAX. No other semantic input or stack read exists. Recover BOOL and cdecl(D2UnitStrc* pItem), using the existing complete unit type. The Windows twin independently agrees on item semantics and Boolean return, without importing its fastcall ABI. All799/80/710-byte inventory bodies, complete11 caller bodies, Mac type layouts and Windows original bytes checked; LINKEDIT ULEB reference is nonexecutable. Static database metadata only.

Changes 1, applied together

  1. Set prototype mac 0x001670b9

    signatureundefined INVENTORY_RemoveItemFromInventory(void)→BOOL INVENTORY_RemoveItemFromInventory(D2UnitStrc * pItem)
    conventionunknown→__cdecl