Skip to content

Commit 018de98

Browse files
committed
fix toggle saving and accounting for new item has any influence at all
1 parent 527723e commit 018de98

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/Classes/ItemsTab.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,12 +1550,16 @@ local function copyAnointsAndEldritchImplicits(self, newItem)
15501550
end
15511551
end
15521552

1553+
-- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits nor any other influence
1554+
-- and your current respective item does, apply those implicits and influence to the new item
15531555
local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" }
15541556
local implicitRarities = { "NORMAL", "MAGIC", "RARE" }
1555-
-- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits
1556-
-- and your current respective item does, apply those implicits and influence to the new item
1557-
if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and
1558-
not (newItem.tangle and newItem.cleansing) and (currentItem.cleansing or currentItem.tangle) then
1557+
for _, influence in ipairs(itemLib.influenceInfo.default) do
1558+
if newItem[influence.key] then
1559+
return
1560+
end
1561+
end
1562+
if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and (currentItem.cleansing or currentItem.tangle) then
15591563
local currentImplicits = currentItem.implicitModLines
15601564
if currentImplicits then
15611565
newItem.implicitModLines = currentImplicits

src/Modules/Main.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ function main:Init()
107107
self.dpiScaleOverridePercent = GetDPIScaleOverridePercent and GetDPIScaleOverridePercent() or 0
108108
self.showWarnings = true
109109
self.slotOnlyTooltips = true
110+
self.migrateEldritchImplicits = true
110111
self.notSupportedModTooltips = true
111112
self.notSupportedTooltipText = " ^8(Not supported in PoB yet)"
112113
self.POESESSID = ""
@@ -627,6 +628,9 @@ function main:LoadSettings(ignoreBuild)
627628
if node.attrib.slotOnlyTooltips then
628629
self.slotOnlyTooltips = node.attrib.slotOnlyTooltips == "true"
629630
end
631+
if node.attrib.migrateEldritchImplicits then
632+
self.migrateEldritchImplicits = node.attrib.migrateEldritchImplicits == "true"
633+
end
630634
if node.attrib.notSupportedModTooltips then
631635
self.notSupportedModTooltips = node.attrib.notSupportedModTooltips == "true"
632636
end
@@ -761,6 +765,7 @@ function main:SaveSettings()
761765
lastExportedWebsite = self.lastExportedWebsite,
762766
showWarnings = tostring(self.showWarnings),
763767
slotOnlyTooltips = tostring(self.slotOnlyTooltips),
768+
migrateEldritchImplicits = tostring(self.migrateEldritchImplicits),
764769
notSupportedModTooltips = tostring(self.notSupportedModTooltips),
765770
POESESSID = self.POESESSID,
766771
invertSliderScrollDirection = tostring(self.invertSliderScrollDirection),
@@ -1082,6 +1087,7 @@ function main:OpenOptionsPopup()
10821087
local initialDefaultItemAffixQuality = self.defaultItemAffixQuality or 0.5
10831088
local initialShowWarnings = self.showWarnings
10841089
local initialSlotOnlyTooltips = self.slotOnlyTooltips
1090+
local initialMigrateEldritchImplicits = self.migrateEldritchImplicits
10851091
local initialNotSupportedModTooltips = self.notSupportedModTooltips
10861092
local initialInvertSliderScrollDirection = self.invertSliderScrollDirection
10871093
local initialDisableDevAutoSave = self.disableDevAutoSave
@@ -1136,6 +1142,7 @@ function main:OpenOptionsPopup()
11361142
self.defaultItemAffixQuality = initialDefaultItemAffixQuality
11371143
self.showWarnings = initialShowWarnings
11381144
self.slotOnlyTooltips = initialSlotOnlyTooltips
1145+
self.migrateEldritchImplicits = initialMigrateEldritchImplicits
11391146
self.notSupportedModTooltips = initialNotSupportedModTooltips
11401147
self.invertSliderScrollDirection = initialInvertSliderScrollDirection
11411148
self.disableDevAutoSave = initialDisableDevAutoSave

0 commit comments

Comments
 (0)