REDIVIVUS

Proposals / #696

Name the spawnable gate and prefix flag of the magic affix rollers

applied · by dtchitt · submitted 2026-11-01, applied 2026-11-01

Ghidra v1799 · 2663303

ITEMMOD_RollMagicAffixVersioned and VersionedEx pass EDX as the second argument of ITEMMOD_RollMagicAffix and ITEMMOD_RollMagicAffixClassic. That parameter is chosen as bIsSuffix, but it gates the row's spawnable column, and drop callers pass 1 for prefixes and suffixes alike, so EDX becomes bSpawnableOnly instead of copying the callee's name. The fifth argument picks the table range: nonzero reads pPrefixStart, zero reads pSuffixStart, which is what Classic's bIsPrefix says. The chosen bIsSuffix on the two callees looks wrong for the same reason, but it can't be changed here. Not tested live: this is from the machine code only.

Changes 6, applied together

  1. Rename variable win 0x005c18e0 EDX

    namenParam→bSpawnableOnly
  2. Rename variable win 0x005c1940 EDX

    namenParam→bSpawnableOnly
  3. Rename variable win 0x005c18e0 Stack[0xc]

    namenParam4→bIsPrefix
  4. Rename variable win 0x005c1940 Stack[0xc]

    namenParam4→bIsPrefix
  5. Rename variable win 0x005c1940 Stack[0x14]

    namenParam6→nAutoMagicGroup
  6. Rename variable win 0x005c12f0 Stack[0x14]

    namenParam4→bIsPrefix