REDIVIVUS

Proposals / #785

Type MONSTER_RollAndAssignUMods' ECX parameter as D2UnitStrc * via set_prototype (keeps the name this)

applied · by Captain-Fwiffo · submitted 2026-11-01, applied 2026-11-02

Ghidra v1809 · 6c26878

Resubmission of #295 as a prototype change, as the reviewer asked, because the __thiscall auto 'this' cannot be retyped with retype_local. The body proves the ECX parameter is the monster unit ([this]==1 is eUnitType==UNIT_MONSTER, +0x14 pUnitData, +0x20 sSeed). The prototype keeps the callee-cleaned stack arguments and the existing parameter name; the house-rule rename to pUnit is left to a dispute because the checker treats this as a chosen name.

Changes 1, applied together

  1. Set prototype win 0x005a0760

    signaturevoid MONSTER_RollAndAssignUMods(void * this, SGAMEDATA * pGame, BOOL bResult)→void MONSTER_RollAndAssignUMods(D2UnitStrc * this, SGAMEDATA * pGame, BOOL bResult)
    convention__thiscall