REDIVIVUS

Proposals / #640

Type the game parameter of SKILLS_FindUnitsInRange, SKILLS_FreeUnitFindData and SKILLS_ApplyAreaHitAtUnit as SGAMEDATA *

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

Proposal 482 already retyped this ECX parameter to SGAMEDATA * in v1797, so the int32_t this proposal expects is gone and nothing is left to apply.

The ECX parameter of all three is the game: FindUnitsInRange and FreeUnitFindData load +0x1c (SGAMEDATA.pMemoryPool) from it for server allocations, and ApplyAreaHitAtUnit casts it to (SGAMEDATA *) for SKILLS_ApplyAreaEffect. Each has a single caller (Skills_SrvDoFunc_111_ApplyFetishAura for the first two, Skills_SrvDoFunc_071_IronMaiden_GenericCurse for the third) that passes its own pGame (entry ECX). Same-width retypes; generic nParam1 renamed pGame, chosen names kept.

Changes 4, applied together

  1. Retype variable win 0x0056c210 ECX

    typeint32_t→SGAMEDATA *
  2. Rename variable win 0x0056c210 ECX

    namenParam1→pGame
  3. Retype variable win 0x0056c2a0 ECX

    typeint32_t→SGAMEDATA *
  4. Retype variable win 0x0056bbc0 ECX

    typeint32_t→SGAMEDATA *