REDIVIVUS

Proposals / #832

Name the stat list state parameter nState across the ITEMPROP_ family

applied · by jaenster · submitted 2026-11-02, applied 2026-11-02

Ghidra v1809 · 9528519

Stack[0x1c] is the 9th slot of the shared fpProperties signature that all 25 ITEMPROP_ handlers implement. ITEMPROP_AddStat_Simple forwards it straight through: 0065f2f5 calls ITEMMOD_AddStatToItem (0065ea50) with [EBP+0x20], that slot, as the last pushed argument, which lands on the callee parameter already carrying the chosen name nState. ITEMMOD_AddStatToItem in turn passes it as the 2nd argument of ITEMMOD_GetOrCreateStatList (0065cbf0), whose parameter there is likewise already named nState, and that function uses it only as a state: it looks the list up with GetStatListByStateOrFlagsIfNotExists(pUnit, nState, nFlags) and finishes with SetState(pStatList, nState). Three chosen names and two chosen callee names agree on the meaning. The slot stays typed int32_t; only the name changes.

Changes 25, applied together

  1. Rename variable win 0x0065eb30 Stack[0x1c]

    namenParam4→nState
  2. Rename variable win 0x0065eba0 Stack[0x1c]

    namenParam3→nState
  3. Rename variable win 0x0065ec10 Stack[0x1c]

    namenParam5→nState
  4. Rename variable win 0x0065ec80 Stack[0x1c]

    namenParam4→nState
  5. Rename variable win 0x0065ecf0 Stack[0x1c]

    namenParam3→nState
  6. Rename variable win 0x0065ee80 Stack[0x1c]

    namenParam3→nState
  7. Rename variable win 0x0065f010 Stack[0x1c]

    namenParam3→nState
  8. Rename variable win 0x0065f2b0 Stack[0x1c]

    namenParam4→nState
  9. Rename variable win 0x0065f310 Stack[0x1c]

    namenParam4→nState
  10. Rename variable win 0x0065f390 Stack[0x1c]

    namenParam4→nState
  11. Rename variable win 0x0065f3f0 Stack[0x1c]

    namenParam4→nState
  12. Rename variable win 0x0065f470 Stack[0x1c]

    namenParam3→nState
  13. Rename variable win 0x0065f590 Stack[0x1c]

    namenParam22→nState
  14. Rename variable win 0x0065f6a0 Stack[0x1c]

    namenParam2→nState
  15. Rename variable win 0x0065f870 Stack[0x1c]

    namenParam2→nState
  16. Rename variable win 0x0065f960 Stack[0x1c]

    namenParam3→nState
  17. Rename variable win 0x0065f9d0 Stack[0x1c]

    namenParam3→nState
  18. Rename variable win 0x0065fa40 Stack[0x1c]

    namenParam3→nState
  19. Rename variable win 0x0065fae0 Stack[0x1c]

    namenParam2→nState
  20. Rename variable win 0x0065fb50 Stack[0x1c]

    namenParam3→nState
  21. Rename variable win 0x0065fba0 Stack[0x1c]

    namenParam3→nState
  22. Rename variable win 0x0065fbf0 Stack[0x1c]

    namenParam3→nState
  23. Rename variable win 0x0065fc40 Stack[0x1c]

    namenParam3→nState
  24. Rename variable win 0x0065fc90 Stack[0x1c]

    namenParam4→nState
  25. Rename variable win 0x0065fd20 Stack[0x1c]

    namenParam2→nState