REDIVIVUS

Proposals / #834

Name the Properties.txt set column parameter nSet across the ITEMPROP_ family

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

Ghidra v1809 · 9528519

Stack[0xc] is the 5th slot of the shared fpProperties signature that all 25 ITEMPROP_ handlers implement. The dispatcher ITEMMOD_ApplyPropertyToUnitStatsExpansion (0065fd70) fills it with (uint)(byte)pPropTxt->set[i], the set column of the D2PropertiesTxt row for the func slot being applied, so the parameter is that column and nothing else. ITEMPROP_AddStat_Simple reads it at 0065f2e7 from [EBP+0x10] and pushes it at 0065f2f0 as the 5th argument of ITEMMOD_AddStatToItem (0065f2f5), where it selects the write path: zero uses STATLIST_AddStatValue, non-zero uses D2AddStatToStatsListEx, which is the separate expansion stat list. Naming it after the column it carries keeps the handlers honest about where the value comes from, since individual handlers use it differently (ITEMPROP_AddStat_WithLayerFromParam4 and ITEMPROP_AddStat_LayerFromParam4Lo take a stat layer from it). Types are left as they are.

Changes 25, applied together

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

    namenParam2→nSet
  2. Rename variable win 0x0065eba0 Stack[0xc]

    namenParam→nSet
  3. Rename variable win 0x0065ec10 Stack[0xc]

    namenParam2→nSet
  4. Rename variable win 0x0065ec80 Stack[0xc]

    namenParam→nSet
  5. Rename variable win 0x0065ecf0 Stack[0xc]

    namenParam→nSet
  6. Rename variable win 0x0065ee80 Stack[0xc]

    namenParam→nSet
  7. Rename variable win 0x0065f010 Stack[0xc]

    namenParam→nSet
  8. Rename variable win 0x0065f2b0 Stack[0xc]

    namenParam→nSet
  9. Rename variable win 0x0065f310 Stack[0xc]

    namenParam→nSet
  10. Rename variable win 0x0065f390 Stack[0xc]

    namenParam→nSet
  11. Rename variable win 0x0065f3f0 Stack[0xc]

    namenParam→nSet
  12. Rename variable win 0x0065f470 Stack[0xc]

    namenParam→nSet
  13. Rename variable win 0x0065f590 Stack[0xc]

    namedwParam2→nSet
  14. Rename variable win 0x0065f6a0 Stack[0xc]

    namedwParam2→nSet
  15. Rename variable win 0x0065f870 Stack[0xc]

    namedwParam2→nSet
  16. Rename variable win 0x0065f960 Stack[0xc]

    namenParam→nSet
  17. Rename variable win 0x0065f9d0 Stack[0xc]

    namenParam→nSet
  18. Rename variable win 0x0065fa40 Stack[0xc]

    namenParam→nSet
  19. Rename variable win 0x0065fae0 Stack[0xc]

    namedwParam2→nSet
  20. Rename variable win 0x0065fb50 Stack[0xc]

    namenParam→nSet
  21. Rename variable win 0x0065fba0 Stack[0xc]

    namenParam→nSet
  22. Rename variable win 0x0065fbf0 Stack[0xc]

    namenParam→nSet
  23. Rename variable win 0x0065fc40 Stack[0xc]

    namenParam→nSet
  24. Rename variable win 0x0065fc90 Stack[0xc]

    namenParam2→nSet
  25. Rename variable win 0x0065fd20 Stack[0xc]

    namedwParam2→nSet