Name the weapon stat reset flag of the hit builder, tested in the running game
Ghidra v1799 · 2663303
When DAMAGE_CalculateOffensiveDamage's Stack[0xc] is nonzero, EQUIPMENT_RecalcDualWieldWeaponStats takes both weapons' damage-related stats out of the unit. A class that can dual-wield then gets the weapon in use put back, and WEAPON_ApplyEquippedWeaponStats restores everything at the end. Nonzero also skips the skill crit test. I tested this in a running 1.14d copy, calling 0057b7d0 with forced seeds. A sorceress with her short staff rolled from the staff's stats with 0 (60 of 60) and without them with 1 (60 of 60). A barbarian with a hand axe got identical results with 0 and 1 (60 of 60). Stats matched before and after every call, 120 of 120 for each class. Only starting weapons were used, and I did not test real dual-wielding with two weapons.
Changes 3, applied together
Rename variable
win 0x0057b7d0 Stack[0xc]namenParam→bResetWeaponStatsRename variable
win 0x00535d10 EDXnamenParam→bResetWeaponStatsRename variable
win 0x00535e20 EDXnamenParam→bResetWeaponStats