Type and name the skills.txt row and skill level parameters of SKILLASS_CreateSummon and SKILLASS_ApplyLevelScaledBuffs
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
Retype variable
win 0x005d5e10 Stack[0xc]typeint32_t→D2SkillsTxt *Rename variable
win 0x005d5e10 Stack[0xc]namenParam1→pSkillsTxtRename variable
win 0x005d5e10 Stack[0x14]namenParam2→nSkillLvlRetype variable
win 0x005d6cf0 Stack[0x8]typeint32_t→D2SkillsTxt *Rename variable
win 0x005d6cf0 Stack[0x8]namenParam1→pSkillsTxtRename variable
win 0x005d6cf0 Stack[0x10]namenParam2→nSkillLvl