REDIVIVUS

Proposals / #1117

Recover the Mac unit-flag reader's actual unit pointer input

checked · by Commit-Will · submitted 2026-11-03

Mac0018a68a currently accepts uint32_t* pStatCost, but its complete native input route is a Unit record. The complete selected caller00189a9b takes precise D2UnitStrc* at Stack4 and passes that same native word before its first CALL. The leaf reads DWORD+0xc8, matching existing D2UnitStrc244.eUnitFlagsEx offset200,size4. Recover that actual nominal pointer domain while retaining the selected function/pStatCost names, one Stack4 input, current uint32_t result, cdecl, no locals and noVarArgs. Both complete bodies127B50instructions match fresh raw, separate exact-count ASM and ownership/CFG. No name-derived domain, compatible result alias, opaque preservation/effects/cleanup/safety, original typedef uniqueness, Mac executable identity/execution or source/build/runtime/matching gain is claimed.

Changes 1, applied together

  1. Set prototype mac 0x0018a68a

    signatureuint32_t ITEMSTATS_CheckItemStatCostFlag200Bit3(uint32_t * pStatCost)→uint32_t ITEMSTATS_CheckItemStatCostFlag200Bit3(D2UnitStrc * pStatCost)
    convention__cdecl