REDIVIVUS

Proposals / #641

Type and name the skills.txt row and skill level parameters of SKILLASS_CreateSummon and SKILLASS_ApplyLevelScaledBuffs

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

Ghidra v1798 · d52cd0a

In both functions the nParam1 stack parameter is a D2SkillsTxt row: ApplyLevelScaledBuffs reads +0x54 (aurastat), +0x98 (passivestat), +0xe4 (sumumod) and the calc ints at +0x6c/+0xa8; CreateSummon reads +0xbe (pettype), +0xc0 (petmax) and the +5 flag byte. Their callers (Skills_SrvDoFunc_044/045 for CreateSummon, 049 for ApplyLevelScaledBuffs) pass the row they computed as eSkill*0x23c + pTxtSkills. nParam2 in each is the skill level (passed as the level argument of D2GetSkillCalc). Same-width retypes; generic names renamed pSkillsTxt / nSkillLvl.

Changes 6, applied together

  1. Retype variable win 0x005d5e10 Stack[0xc]

    typeint32_t→D2SkillsTxt *
  2. Rename variable win 0x005d5e10 Stack[0xc]

    namenParam1→pSkillsTxt
  3. Rename variable win 0x005d5e10 Stack[0x14]

    namenParam2→nSkillLvl
  4. Retype variable win 0x005d6cf0 Stack[0x8]

    typeint32_t→D2SkillsTxt *
  5. Rename variable win 0x005d6cf0 Stack[0x8]

    namenParam1→pSkillsTxt
  6. Rename variable win 0x005d6cf0 Stack[0x10]

    namenParam2→nSkillLvl