Name the value parameter of the stat setters and their thunks
Ghidra v1799 · 2663303
In STATLIST_SetStatValue and the functions that forward to it, the third parameter is the value being set: D2AddStatToStatsListEx passes its own nValue there. The thunks' last parameter is the layer word, named here after each thunk's target (nSubIndex on STATLIST_AddStatValue). Stack[0x10] of STATLIST_SetStatValue is left as low because the checks treat it as chosen.
Changes 6, applied together
Rename variable
win 0x006270b0 Stack[0xc]namenParam→nValueRename variable
win 0x00627810 Stack[0xc]namenParam→nValueRename variable
win 0x00627250 Stack[0xc]namenParam→nValueRename variable
win 0x00627250 Stack[0x10]namenParam2→nLayerRename variable
win 0x006272a0 Stack[0xc]namenParam→nValueRename variable
win 0x006272a0 Stack[0x10]namenParam2→nSubIndex