REDIVIVUS

Proposals / #969

Mac SKILLSNEC_CltCreateTeethMissiles: __cdecl int (pUnit, eSkill, nSkillLvl, nTargetX, nTargetY, nMonClassId)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body reads six stack slots and no register inputs: [EBP+0xc] indexes SkillsTxt (count +0xba0, stride 0x23c) and its missile word +0xea; [EBP+0x14] and [EBP+0x18] must be non-zero (target X/Y); [EBP+0x1c] indexes MonStats (count +0xa80, stride 0x1a8) then MonStats2 via +0x18 (monster class); [EBP+8] is null-checked as the caster unit; [EBP+0x10] (skill level) is forwarded with the skill to the missile setup. Windows twin SKILLSNEC_CltCreateTeethMissiles 0x004f3a60 is int (D2UnitStrc * pUnit, eD2Skills eSkill, int32_t nSkillLvl, int32_t nTargetX, int32_t nParam1, int32_t nParam2), same order; the two generic names are Y and the monster class.

Changes 1, applied together

  1. Set prototype mac 0x0009049f

    signatureundefined SKILLSNEC_CltCreateTeethMissiles(void)→int SKILLSNEC_CltCreateTeethMissiles(D2UnitStrc * pUnit, eD2Skills eSkill, int32_t nSkillLvl, int32_t nTargetX, int32_t nTargetY, int32_t nMonClassId)
    conventionunknown→__cdecl