REDIVIVUS

Proposals / #1019

Recover the Mac other-hand item's complete register prototype

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

Ghidra vmac 111 · 3cfe190

Mac0018a158 actually consumes ECX inventory and fullEDX body location, supplies index4 when input5 and index5 otherwise, then returns the unchanged fullEAX Unit pointer from168455. All three real caller sites independently source ECX from Unit.pInventory and EDX from successful weapon-helper DWORD4/5 outputs. Recover the complete precise two-register prototype and pointer result with current __fastcc, supported by a fresh same-shape applied native precedent. No incoming stack argument or purge is added. Preserve chosen function/locals; new formal names describe proven roles. No enum/field/layout/caller or behavior change.

Changes 1, applied together

  1. Set prototype mac 0x0018a158

    signatureundefined SKILLS_GetOtherHandItem(void)→D2UnitStrc * SKILLS_GetOtherHandItem(D2InventoryStrc * pInventory, eD2BodyLocDWORD eBodyLoc)
    conventionunknown→__fastcc