REDIVIVUS

Proposals / #678

Mac: companions to Windows #542, #531 and #532 (sound-data unit, skills.txt row, monster unit parameters)

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

Ghidra vmac 106 · d52cd0a

Mac twins of already-proposed Windows fixes with the same body semantics. GetSfxAsyncTicks reads +0x80 of its unit (client-side union); SKILLSMON_SetMonsterDeathFrame compares byte +0x11 (D2SkillsTxt.monanim) with 0x0e, so its first parameter is a skills.txt row; SKILLSCLT_CalcChargeSkillDuration reads +4 (nClassId) of its first parameter and indexes monstats with it (a unit). Mac D2SkillsTxt has the same layout (monanim at 17). Generic nParam renamed pUnit / pSkillsTxt as in the Windows proposals; the chosen name pMonUnit is kept. Mac callers were not individually traced; the retypes follow from how each body uses its parameter.

Changes 5, applied together

  1. Retype variable mac 0x00129b7b ECX

    typeint32_t→D2UnitStrc *
  2. Rename variable mac 0x00129b7b ECX

    namenParam→pUnit
  3. Retype variable mac 0x0008deba Stack[0x4]

    typeint32_t→D2SkillsTxt *
  4. Rename variable mac 0x0008deba Stack[0x4]

    namenParam→pSkillsTxt
  5. Retype variable mac 0x00117d8a Stack[0x4]

    typeint32_t→D2UnitStrc *