Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down