diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 3cdb977be..482c3d4d2 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -781,14 +781,17 @@ function calcs.initEnv(build, mode, override, specEnv) instrumentsOfPower = nodesModsList:Flag(nil, "InstrumentsOfPower") or false, lordOfTheWilds = nodesModsList:Flag(nil, "LordOfTheWilds") or false, } - local cache = build.itemsTab.lastWeaponFlagState - local losingGiantsBlood = cache and cache.giantsBlood and not weaponFlagState.giantsBlood - local losingInstrumentsOfPower = cache and cache.instrumentsOfPower and not weaponFlagState.instrumentsOfPower - local losingLordOfTheWilds = cache and cache.lordOfTheWilds and not weaponFlagState.lordOfTheWilds - if losingGiantsBlood or losingInstrumentsOfPower or losingLordOfTheWilds then -- Only validate socket when losing Keystone / Ascendancy - build.itemsTab:ValidateWeaponSlots(weaponFlagState) + -- Only mutate equipped items in the real build pass; calculator overrides (e.g. node power) are transient. + if mode == "MAIN" then + local cache = build.itemsTab.lastWeaponFlagState + local losingGiantsBlood = cache and cache.giantsBlood and not weaponFlagState.giantsBlood + local losingInstrumentsOfPower = cache and cache.instrumentsOfPower and not weaponFlagState.instrumentsOfPower + local losingLordOfTheWilds = cache and cache.lordOfTheWilds and not weaponFlagState.lordOfTheWilds + if losingGiantsBlood or losingInstrumentsOfPower or losingLordOfTheWilds then -- Only validate socket when losing Keystone / Ascendancy + build.itemsTab:ValidateWeaponSlots(weaponFlagState) + end + build.itemsTab.lastWeaponFlagState = { giantsBlood = weaponFlagState.giantsBlood, instrumentsOfPower = weaponFlagState.instrumentsOfPower, lordOfTheWilds = weaponFlagState.lordOfTheWilds } end - build.itemsTab.lastWeaponFlagState = { giantsBlood = weaponFlagState.giantsBlood, instrumentsOfPower = weaponFlagState.instrumentsOfPower, lordOfTheWilds = weaponFlagState.lordOfTheWilds } -- Build and merge item modifiers, and create list of radius jewels if not accelerate.requirementsItems then