Skip to content

Commit 82a0b04

Browse files
author
LocalIdentity
committed
Fix imbued supports blocking other skill sets
Setting a imbued gem on a skill set would block all the other skill sets from also setting a gem for the same item slot
1 parent 5766193 commit 82a0b04

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/Classes/SkillsTab.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,19 @@ function SkillsTabClass:NewSkillSet(skillSetId)
13021302
return skillSet
13031303
end
13041304

1305+
function SkillsTabClass:RebuildImbuedSupportBySlot()
1306+
wipeTable(self.imbuedSupportBySlot)
1307+
for _, socketGroup in ipairs(self.socketGroupList) do
1308+
if socketGroup.slot and socketGroup.imbuedSupport then
1309+
local gemId = data.gemForBaseName[socketGroup.imbuedSupport:lower().." support"]
1310+
local gem = gemId and data.gems[gemId]
1311+
if gem and gem.grantedEffect then
1312+
self.imbuedSupportBySlot[socketGroup.slot] = gem.grantedEffect
1313+
end
1314+
end
1315+
end
1316+
end
1317+
13051318
-- Changes the active skill set
13061319
function SkillsTabClass:SetActiveSkillSet(skillSetId)
13071320
-- Initialize skill sets if needed
@@ -1319,6 +1332,7 @@ function SkillsTabClass:SetActiveSkillSet(skillSetId)
13191332
end
13201333

13211334
self.socketGroupList = self.skillSets[skillSetId].socketGroupList
1335+
self:RebuildImbuedSupportBySlot()
13221336
self.controls.groupList.list = self.socketGroupList
13231337
self.activeSkillSetId = skillSetId
13241338
self.build.buildFlag = true

0 commit comments

Comments
 (0)