From 301bc149ee9ba6860866eccda53dc2f023faf128 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Tue, 17 Feb 2026 16:49:14 +1100 Subject: [PATCH] Fix offhand unequip during node power process with Giant's Blood When we run the node power search it deallocates nodes to test the power of them and when it does that it also is unequipping the shield in the offhand as it believes it is an invalid item The code to change the equip state for Giant's Blood now only runs on player initiated gear changes --- src/Modules/CalcSetup.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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