Mac: companions to the Windows #640, #662 and #530 retypes (unit/game parameters)
Ghidra vmac 106 · d52cd0a
Mac twins of already-proposed Windows fixes, with the same defect and identical body semantics: SKILLS_FindUnitsInRange / SKILLS_FreeUnitFindData load +0x1c (D2GameStrc.pMemoryPool) from their game parameter; SKILLS_ApplyDamageReduction scales the +0x44 unit field (nGfxCurrentFrame); SKILLS_GetTargetTypeForSkill reads +0xc (nUnitGUID) of both parameters and tests *pnParam == 1 (UNIT_MONSTER). Types follow the Mac database (D2GameStrc in place of SGAMEDATA); generic nParam / nParam1 renamed pUnit / pGame like the Windows proposals, chosen names kept. Mac callers were not individually traced; the retypes follow from how each body uses its parameter.
Changes 7, applied together
Retype variable
mac 0x00269522 Stack[0x4]typeint32_t→D2GameStrc *Rename variable
mac 0x00269522 Stack[0x4]namenParam1→pGameRetype variable
mac 0x002695e3 Stack[0x4]typeint32_t→D2GameStrc *Retype variable
mac 0x00083dca Stack[0x4]typeint32_t→D2UnitStrc *Retype variable
mac 0x0008147a Stack[0x4]typeint32_t→D2UnitStrc *Rename variable
mac 0x0008147a Stack[0x4]namenParam→pUnitRetype variable
mac 0x0008147a Stack[0x8]typeint *→D2UnitStrc *