Name skill and damage helper parameters from their callees
Ghidra v1799 · 2663303
Each parameter is forwarded unchanged to a callee parameter and takes its name: SERVER_MinDamage and MaxDamage, GetMinElemDamage and GetMaxElemDamage, SKILLS_CalcToHit, D2GetSkillCalc, SKILLS_CreateMissileAtTarget, DRLGROOM_FindBetterNearbyRoom, SetDamageStats, DAMAGE_RollPhysicalDamageRange and ITEMMOD_GetOrCreateStatList. Pushes and registers were matched to each signature in the machine code. Two are not forwards: SKILLBAR_CanTargetPosition's EAX is range-checked against nTxtSkillsCount and scaled into the skills table, so nSkillId; ITEMMODE_ResetSkillToDefault's EBX reaches GetLeftSkillData when nonzero and GetRightSkillData when zero, so bIsLeftSkill. The chosen name SKILLDESC_DescLine8_AppendMana looks wrong: it calls SKILLS_CalcToHit and formats a to-hit value.
Changes 19, applied together
Rename variable
win 0x004ec740 EAXnamenParam2→nSkillLevelRename variable
win 0x004ec740 EDInamenParam3→eSkillIdRename variable
win 0x004ec6f0 EDInamenParam1→nSkillLevelRename variable
win 0x004ec6f0 EBXnamenParam2→eSkillIdRename variable
win 0x004ec280 EAXnamenParam1→nLevelRename variable
win 0x004ec280 EBXnamenParam2→nMissileIdRename variable
win 0x004ec510 ECXnamenParam1→eSkillRename variable
win 0x004ec510 EAXnamenParam2→nSkillLevelRename variable
win 0x005d02b0 Stack[0x8]namenParam1→nSkillLvlRename variable
win 0x005ca470 Stack[0x10]namenParam→nSkillLvlRename variable
win 0x005d9ce0 Stack[0x8]namenParam1→nXRename variable
win 0x005d9ce0 Stack[0xc]namenParam2→nYRename variable
win 0x005d9ce0 EAXnamenParam3→nSkillIdRename variable
win 0x0059f900 EDInamenParam→nLevelRename variable
win 0x0057a8e0 Stack[0xc]namenParam1→nMinPctBonusRename variable
win 0x0057a8e0 Stack[0x10]namenParam2→nRangePctBonusRename variable
win 0x0057a8e0 Stack[0x14]namenParam→nDamageAccumRename variable
win 0x0055c4f0 EBXnamenParam→bIsLeftSkillRename variable
win 0x0065d070 Stack[0x18]namenParam5→nState