Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ describe("TestSkills", function()

local skillsTab = {
socketGroupList = {
{ enabled = false, gemList = { fakeGem("Disabled Skill") } },
{ enabled = true, gemList = { fakeGem("Disabled Gem", nil, { enabled = false }) } },
{ enabled = true, gemList = { fakeGem("Item Skill", { fromItem = true }) } },
{ enabled = true, gemList = { fakeGem("Tree Skill", { fromTree = true }) } },
{ enabled = true, gemList = { fakeGem("Stored Item Skill", nil, { fromItem = true }) } },
Expand Down
13 changes: 7 additions & 6 deletions src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1523,14 +1523,15 @@ function SkillsTabClass:UpdateGlobalGemCountAssignments()
wipeTable(GlobalGemAssignments)
local countSocketGroups = 0
for _, socketGroup in ipairs(self.socketGroupList) do
local countGroup = true
local countGroup = false
if socketGroup.enabled then
local activeGem = socketGroup.gemList[1]
local activeGrantedEffect = activeGem and (activeGem.grantedEffect or activeGem.gemData and activeGem.gemData.grantedEffect)
if activeGem and (activeGem.fromItem or activeGem.fromTree or activeGrantedEffect and (activeGrantedEffect.fromItem or activeGrantedEffect.fromTree)) then
countGroup = false
end
for _, gemInstance in ipairs(socketGroup.gemList) do
if gemInstance.enabled and not countGroup then
local grantedEffect = gemInstance.grantedEffect or gemInstance.gemData and gemInstance.gemData.grantedEffect
local provided = gemInstance.fromItem or gemInstance.fromTree or
grantedEffect and (grantedEffect.fromItem or grantedEffect.fromTree)
countGroup = not provided
end
if gemInstance.gemData and gemInstance.enabled then
if GlobalGemAssignments[gemInstance.gemData.name] then
GlobalGemAssignments[gemInstance.gemData.name].count = GlobalGemAssignments[gemInstance.gemData.name].count + 1
Expand Down
Loading