REDIVIVUS

Proposals / #1125

Recover GetAiCmd's monster AI command pointer result

applied · by Commit-Will · submitted 2026-11-03, applied 2026-11-04

Ghidra v113 · 8222e32

GetAiCmd returns zero or the four-byte pCmdCurrent field reached through the existing Unit/monster/AiGeneral record chain. The selected MinionReset caller tests full EAX and reads the command argument at +8. Model the result with the existing precise D2MonsterAiCmdStrc * type while preserving the current name, Unit* formal and Stack4 storage, HASH local, __cdecl convention, arity and noVarArgs contract.

Changes 1, applied together

  1. Set prototype mac 0x001a1859

    signatureundefined4 GetAiCmd(D2UnitStrc * pUnit)→D2MonsterAiCmdStrc * GetAiCmd(D2UnitStrc * pUnit)
    convention__cdecl