Skip to content

Commit d5da6fc

Browse files
authored
Update how Influences are handled (#8257)
1 parent 5cca1ee commit d5da6fc

File tree

5 files changed

+44
-14
lines changed

5 files changed

+44
-14
lines changed

src/Classes/Item.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ local function getCatalystScalar(catalystId, tags, quality)
4848
return 1
4949
end
5050

51-
local influenceInfo = itemLib.influenceInfo
51+
local influenceInfo = itemLib.influenceInfo.all
5252

5353
local ItemClass = newClass("Item", function(self, raw, rarity, highQuality)
5454
if raw then
@@ -757,6 +757,13 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
757757
self.canHaveTwoEnchants = true
758758
self.canHaveThreeEnchants = true
759759
self.canHaveFourEnchants = true
760+
elseif lineLower == "has elder, shaper and all conqueror influences" then
761+
self.HasElderShaperAndAllConquerorInfluences = true
762+
for _, curInfluenceInfo in ipairs(itemLib.influenceInfo.default) do
763+
self[curInfluenceInfo.key] = true
764+
end
765+
elseif lineLower:match("if the eater of worlds is dominant") then
766+
self.canHaveEldritchInfluence = true
760767
elseif lineLower == "has a crucible passive skill tree with only support passive skills" then
761768
self.canHaveOnlySupportSkillsCrucibleTree = true
762769
elseif lineLower == "has a crucible passive skill tree" then

src/Classes/ItemsTab.lua

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ local socketDropList = {
3232

3333
local baseSlots = { "Weapon 1", "Weapon 2", "Helmet", "Body Armour", "Gloves", "Boots", "Amulet", "Ring 1", "Ring 2", "Belt", "Flask 1", "Flask 2", "Flask 3", "Flask 4", "Flask 5" }
3434

35-
local influenceInfo = itemLib.influenceInfo
35+
local influenceInfo = itemLib.influenceInfo.all
3636

3737
local catalystQualityFormat = {
3838
"^x7F7F7FQuality (Attack Modifiers): "..colorCodes.MAGIC.."+%d%% (augmented)",
@@ -505,9 +505,15 @@ holding Shift will put it in the second.]])
505505
end
506506
local function setDisplayItemInfluence(influenceIndexList)
507507
self.displayItem:ResetInfluence()
508-
for _, index in ipairs(influenceIndexList) do
509-
if index > 0 then
510-
self.displayItem[influenceInfo[index].key] = true;
508+
if self.displayItem.HasElderShaperAndAllConquerorInfluences then
509+
for i, curInfluenceInfo in ipairs(itemLib.influenceInfo.default) do
510+
self.displayItem[influenceInfo[i].key] = true
511+
end
512+
else
513+
for _, index in ipairs(influenceIndexList) do
514+
if index > 0 then
515+
self.displayItem[influenceInfo[index].key] = true
516+
end
511517
end
512518
end
513519

@@ -1567,6 +1573,12 @@ function ItemsTabClass:SetDisplayItem(item)
15671573
-- Set both influence dropdowns
15681574
local influence1 = 1
15691575
local influence2 = 1
1576+
local influenceDisplayList = { "Influence" }
1577+
for i, curInfluenceInfo in ipairs((item.canHaveEldritchInfluence or item.type == "Helmet" or item.type == "Body Armour" or item.type == "Gloves" or item.type == "Boots") and itemLib.influenceInfo.all or itemLib.influenceInfo.default) do
1578+
influenceDisplayList[i + 1] = curInfluenceInfo.display
1579+
end
1580+
self.controls.displayItemInfluence.list = influenceDisplayList
1581+
self.controls.displayItemInfluence2.list = influenceDisplayList
15701582
for i, curInfluenceInfo in ipairs(influenceInfo) do
15711583
if item[curInfluenceInfo.key] then
15721584
if influence1 == 1 then

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8913,7 +8913,7 @@ c["Has 3 Sockets"]={{[1]={flags=0,keywordFlags=0,name="SocketCount",type="BASE",
89138913
c["Has 4 Abyssal Sockets"]={{[1]={flags=0,keywordFlags=0,name="AbyssalSocketCount",type="BASE",value=4}},nil}
89148914
c["Has 6 Abyssal Sockets"]={{[1]={flags=0,keywordFlags=0,name="AbyssalSocketCount",type="BASE",value=6}},nil}
89158915
c["Has 6 Sockets"]={{[1]={flags=0,keywordFlags=0,name="SocketCount",type="BASE",value=6}},nil}
8916-
c["Has Elder, Shaper and all Conqueror Influences"]={nil,"Has Elder, Shaper and all Conqueror Influences "}
8916+
c["Has Elder, Shaper and all Conqueror Influences"]={{},nil}
89178917
c["Has a Crucible Passive Skill Tree"]={{},nil}
89188918
c["Has a Crucible Passive Skill Tree with only Support Passive Skills"]={{},nil}
89198919
c["Has a Two Handed Sword Crucible Passive Skill Tree"]={{},nil}

src/Modules/ItemTools.lua

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,24 @@ itemLib = { }
1313

1414
-- Info table for all types of item influence
1515
itemLib.influenceInfo = {
16-
{ key="shaper", display="Shaper", color=colorCodes.SHAPER },
17-
{ key="elder", display="Elder", color=colorCodes.ELDER },
18-
{ key="adjudicator", display="Warlord", color=colorCodes.ADJUDICATOR },
19-
{ key="basilisk", display="Hunter", color=colorCodes.BASILISK },
20-
{ key="crusader", display="Crusader", color=colorCodes.CRUSADER },
21-
{ key="eyrie", display="Redeemer", color=colorCodes.EYRIE },
22-
{ key="cleansing", display="Searing Exarch", color=colorCodes.CLEANSING },
23-
{ key="tangle", display="Eater of Worlds", color=colorCodes.TANGLE },
16+
["all"] = {
17+
{ key="shaper", display="Shaper", color=colorCodes.SHAPER },
18+
{ key="elder", display="Elder", color=colorCodes.ELDER },
19+
{ key="adjudicator", display="Warlord", color=colorCodes.ADJUDICATOR },
20+
{ key="basilisk", display="Hunter", color=colorCodes.BASILISK },
21+
{ key="crusader", display="Crusader", color=colorCodes.CRUSADER },
22+
{ key="eyrie", display="Redeemer", color=colorCodes.EYRIE },
23+
{ key="cleansing", display="Searing Exarch", color=colorCodes.CLEANSING },
24+
{ key="tangle", display="Eater of Worlds", color=colorCodes.TANGLE },
25+
},
26+
["default"] = {
27+
{ key="shaper", display="Shaper", color=colorCodes.SHAPER },
28+
{ key="elder", display="Elder", color=colorCodes.ELDER },
29+
{ key="adjudicator", display="Warlord", color=colorCodes.ADJUDICATOR },
30+
{ key="basilisk", display="Hunter", color=colorCodes.BASILISK },
31+
{ key="crusader", display="Crusader", color=colorCodes.CRUSADER },
32+
{ key="eyrie", display="Redeemer", color=colorCodes.EYRIE },
33+
}
2434
}
2535

2636
-- Apply a value scalar to the first n of any numbers present

src/Modules/ModParser.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5132,6 +5132,7 @@ local specialModList = {
51325132
["this item can be anointed by cassia"] = { },
51335133
["implicit modifiers cannot be changed"] = { },
51345134
["has a crucible passive skill tree"] = { },
5135+
["has elder, shaper and all conqueror influences"] = { },
51355136
["has a two handed sword crucible passive skill tree"] = { },
51365137
["has a crucible passive skill tree with only support passive skills"] = { },
51375138
["crucible passive skill tree is removed if this modifier is removed"] = { },

0 commit comments

Comments
 (0)