diff --git a/src/Classes/EditControl.lua b/src/Classes/EditControl.lua index 2964057ad..1169e719e 100644 --- a/src/Classes/EditControl.lua +++ b/src/Classes/EditControl.lua @@ -67,9 +67,16 @@ local EditClass = newClass("EditControl", "ControlHost", "Control", "UndoHandler self.controls.buttonDown = new("ButtonControl", {"RIGHT",self,"RIGHT"}, {-2, 0, buttonSize, buttonSize}, "-", function() self:OnKeyUp("DOWN") end) + self.controls.buttonDown.enabled = function() + return self:IsEnabled() + end + self.controls.buttonUp = new("ButtonControl", {"RIGHT",self.controls.buttonDown,"LEFT"}, {-1, 0, buttonSize, buttonSize}, "+", function() self:OnKeyUp("UP") end) + self.controls.buttonUp.enabled = function() + return self:IsEnabled() + end elseif clearable then self.controls.buttonClear = new("ButtonControl", {"RIGHT",self,"RIGHT"}, {-2, 0, buttonSize, buttonSize}, "x", function() self:SetText("", true) @@ -277,10 +284,8 @@ function EditClass:Draw(viewPort, noTooltip) end textX = textX + DrawStringWidth(textHeight, self.font, self.prompt) + textHeight/2 end - if not enabled then - return - end - if mOver and not noTooltip then + + if enabled and mOver and not noTooltip then SetDrawLayer(nil, 100) self:DrawTooltip(x, y, width, height, viewPort) SetDrawLayer(nil, 0) @@ -290,7 +295,7 @@ function EditClass:Draw(viewPort, noTooltip) local marginR = self.controls.scrollBarV:IsShown() and 14 or 0 local marginB = self.controls.scrollBarH:IsShown() and 14 or 0 SetViewport(textX, textY, width - 4 - marginL - marginR, height - 4 - marginB) - if not self.hasFocus then + if not enabled or not self.hasFocus then if self.buf == '' and self.placeholder then SetDrawColor(self.disableCol) DrawString(-self.controls.scrollBarH.offset, -self.controls.scrollBarV.offset, "LEFT", textHeight, self.font, self.placeholder) diff --git a/src/Classes/GemSelectControl.lua b/src/Classes/GemSelectControl.lua index 42595188e..3495c76bb 100644 --- a/src/Classes/GemSelectControl.lua +++ b/src/Classes/GemSelectControl.lua @@ -492,24 +492,25 @@ function GemSelectClass:Draw(viewPort, noTooltip) self.tooltip:AddLine(16, "Only show Active gems") end - -- support shortcut - sx = x + width - 16 - 2 - SetDrawColor(colorS,colorS,colorS) - DrawImage(nil, sx, y+2, 16, height-4) - SetDrawColor(0,0,0) - DrawImage(nil, sx+1, y+2, 16-2, height-4) - SetDrawColor(colorS,colorS,colorS) - DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "S") - - -- active shortcut - sx = x + width - (16*2) - (2*2) - SetDrawColor(colorA,colorA,colorA) - DrawImage(nil, sx, y+2, 16, height-4) - SetDrawColor(0,0,0) - DrawImage(nil, sx+1, y+2, 16-2, height-4) - SetDrawColor(colorA,colorA,colorA) - DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "A") - + if self:IsEnabled() then + -- support shortcut + sx = x + width - 16 - 2 + SetDrawColor(colorS,colorS,colorS) + DrawImage(nil, sx, y+2, 16, height-4) + SetDrawColor(0,0,0) + DrawImage(nil, sx+1, y+2, 16-2, height-4) + SetDrawColor(colorS,colorS,colorS) + DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "S") + + -- active shortcut + sx = x + width - (16*2) - (2*2) + SetDrawColor(colorA,colorA,colorA) + DrawImage(nil, sx, y+2, 16, height-4) + SetDrawColor(0,0,0) + DrawImage(nil, sx+1, y+2, 16-2, height-4) + SetDrawColor(colorA,colorA,colorA) + DrawString(sx + 8, y, "CENTER_X", height - 2, "VAR", "A") + end SetDrawLayer(nil, 10) self.tooltip:Draw(x, y, width, height, viewPort) diff --git a/src/Classes/SkillListControl.lua b/src/Classes/SkillListControl.lua index 891f4374b..bbe80eae7 100644 --- a/src/Classes/SkillListControl.lua +++ b/src/Classes/SkillListControl.lua @@ -72,7 +72,7 @@ function SkillListClass:GetRowValue(column, index, socketGroup) if column == 1 then local label = socketGroup.displayLabel or "?" local currentMainSkill = self.skillsTab.build.mainSocketGroup == index - local disabled = not socketGroup.enabled or not socketGroup.slotEnabled + local disabled = not socketGroup.enabled if disabled then local colour = currentMainSkill and "" or "^x7F7F7F" label = colour .. label .. " (Disabled)" diff --git a/src/Classes/SkillsTab.lua b/src/Classes/SkillsTab.lua index 61c75826d..af9786245 100644 --- a/src/Classes/SkillsTab.lua +++ b/src/Classes/SkillsTab.lua @@ -85,6 +85,7 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont self.build = build self.socketGroupList = { } + self.removedSocketGroupList = { } self.sortGemsByDPS = true self.sortGemsByDPSField = "CombinedDPS" @@ -162,31 +163,28 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont self:AddUndoState() self.build.buildFlag = true end) - self.controls.groupSlotLabel = new("LabelControl", { "TOPLEFT", self.anchorGroupDetail, "TOPLEFT" }, { 0, 30, 0, 16 }, "^7Socketed in:") - self.controls.groupSlot = new("DropDownControl", { "TOPLEFT", self.anchorGroupDetail, "TOPLEFT" }, { 85, 28, 130, 20 }, groupSlotDropList, function(index, value) - self.displayGroup.slot = value.slotName + + self.controls.set1Enabled = new("CheckBoxControl", { "TOPLEFT", self.anchorGroupDetail, "TOPLEFT" }, { 42, 30, 20 }, "Set 1:", function(state) + self.displayGroup.set1 = state self:AddUndoState() self.build.buildFlag = true end) - self.controls.groupSlot.tooltipFunc = function(tooltip, mode, index, value) - tooltip:Clear() - if mode == "OUT" or index == 1 then - tooltip:AddLine(16, "Select the item in which this skill is socketed.") - tooltip:AddLine(16, "This will allow the skill to benefit from modifiers on the item that affect socketed gems.") - else - local slot = self.build.itemsTab.slots[value.slotName] - local ttItem = self.build.itemsTab.items[slot.selItemId] - if ttItem then - self.build.itemsTab:AddItemTooltip(tooltip, ttItem, slot) - else - tooltip:AddLine(16, "No item is equipped in this slot.") - end - end + + self.controls.set1Enabled.enabled = function() + return self.displayGroup.source == nil end - self.controls.groupSlot.enabled = function() + + self.controls.set2Enabled = new("CheckBoxControl", { "LEFT", self.controls.set1Enabled, "RIGHT" }, { 50, 0, 20 }, "Set 2:", function(state) + self.displayGroup.set2 = state + self:AddUndoState() + self.build.buildFlag = true + end) + + self.controls.set2Enabled.enabled = function() return self.displayGroup.source == nil end - self.controls.groupEnabled = new("CheckBoxControl", { "LEFT", self.controls.groupSlot, "RIGHT" }, { 70, 0, 20 }, "Enabled:", function(state) + + self.controls.groupEnabled = new("CheckBoxControl", { "LEFT", self.controls.set2Enabled, "RIGHT" }, { 70, 0, 20 }, "Enabled:", function(state) self.displayGroup.enabled = state self:AddUndoState() self.build.buildFlag = true @@ -208,10 +206,12 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont self.controls.groupCount.shown = function() return self.displayGroup.source ~= nil end - self.controls.sourceNote = new("LabelControl", { "TOPLEFT", self.controls.groupSlotLabel, "TOPLEFT" }, { 0, 30, 0, 16 }) + + self.controls.sourceNote = new("LabelControl", { "TOPLEFT", self.controls.groupLabel, "TOPLEFT" }, { 0, 30 + 28, 0, 16 }) self.controls.sourceNote.shown = function() - return self.displayGroup.source ~= nil + return self.displayGroup.explodeSources ~= nil end + self.controls.sourceNote.label = function() local label if self.displayGroup.explodeSources then @@ -221,25 +221,6 @@ which comes from the following sources:]] label = label .. "\n\t" .. colorCodes[source.rarity or "NORMAL"] .. (source.name or source.dn or "???") end label = label .. "^7\nYou cannot delete this group, but it will disappear if you lose the above sources." - else - local activeGem = self.displayGroup.gemList[1] - local sourceName - if self.displayGroup.sourceItem then - sourceName = "'" .. colorCodes[self.displayGroup.sourceItem.rarity] .. self.displayGroup.sourceItem.name - elseif self.displayGroup.sourceNode then - sourceName = "'" .. colorCodes["NORMAL"] .. self.displayGroup.sourceNode.name - else - sourceName = "'" .. colorCodes["NORMAL"] .. "?" - end - sourceName = sourceName .. "^7'" - label = [[^7This is a special group created for the ']] .. activeGem.color .. (activeGem.grantedEffect and activeGem.grantedEffect.name or activeGem.nameSpec) .. [[^7' skill, -which is being provided by ]] .. sourceName .. [[. -You cannot delete this group, but it will disappear if you ]] .. (self.displayGroup.sourceNode and [[un-allocate the node.]] or [[un-equip the item.]]) - if not self.displayGroup.noSupports then - label = label .. "\n\n" .. [[You cannot add support gems to this group, but support gems in -any other group socketed into ]] .. sourceName .. [[ -will automatically apply to the skill.]] - end end return label end @@ -274,8 +255,9 @@ function SkillsTabClass:LoadSkill(node, skillSetId) socketGroup.includeInFullDPS = node.attrib.includeInFullDPS and node.attrib.includeInFullDPS == "true" socketGroup.groupCount = tonumber(node.attrib.groupCount) socketGroup.label = node.attrib.label - socketGroup.slot = node.attrib.slot socketGroup.source = node.attrib.source + socketGroup.set1 = node.attrib.set1 and node.attrib.set1 == "true" + socketGroup.set2 = node.attrib.set2 and node.attrib.set2 == "true" socketGroup.mainActiveSkill = tonumber(node.attrib.mainActiveSkill) or 1 socketGroup.mainActiveSkillCalcs = tonumber(node.attrib.mainActiveSkillCalcs) or 1 socketGroup.gemList = { } @@ -430,8 +412,9 @@ function SkillsTabClass:Save(xml) includeInFullDPS = tostring(socketGroup.includeInFullDPS), groupCount = socketGroup.groupCount ~= nil and tostring(socketGroup.groupCount), label = socketGroup.label, - slot = socketGroup.slot, source = socketGroup.source, + set1 = tostring(socketGroup.set1 or true), + set2 = tostring(socketGroup.set2 or true), mainActiveSkill = tostring(socketGroup.mainActiveSkill), mainActiveSkillCalcs = tostring(socketGroup.mainActiveSkillCalcs), } } @@ -571,9 +554,6 @@ function SkillsTabClass:CopySocketGroup(socketGroup) if socketGroup.label and socketGroup.label:match("%S") then skillText = skillText .. "Label: " .. socketGroup.label .. "\r\n" end - if socketGroup.slot then - skillText = skillText .. "Slot: " .. socketGroup.slot .. "\r\n" - end for _, gemInstance in ipairs(socketGroup.gemList) do skillText = skillText .. string.format("%s %d/%d %s %d\r\n", gemInstance.nameSpec, gemInstance.level, gemInstance.quality, gemInstance.enabled and "" or "DISABLED", gemInstance.count or 1) end @@ -588,10 +568,6 @@ function SkillsTabClass:PasteSocketGroup(testInput) if label then newGroup.label = label end - local slot = skillText:match("Slot: (%C+)") - if slot then - newGroup.slot = slot - end for nameSpec, level, quality, state, count in skillText:gmatch("([ %a']+) (%d+)/(%d+) ?(%a*) (%d+)") do t_insert(newGroup.gemList, { nameSpec = nameSpec, @@ -645,9 +621,12 @@ function SkillsTabClass:CreateGemSlot(index) end) end slot.delete.shown = function() - return index <= #self.displayGroup.gemList + 1 and self.displayGroup.source == nil + return index <= #self.displayGroup.gemList + 1 and self.displayGroup.explodeSources == nil end slot.delete.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end return index <= #self.displayGroup.gemList end slot.delete.tooltipText = "Remove this gem." @@ -700,6 +679,12 @@ function SkillsTabClass:CreateGemSlot(index) end self.build.buildFlag = true end, true) + slot.nameSpec.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end + return true + end slot.nameSpec:AddToTabGroup(self.controls.groupLabel) self.controls["gemSlot"..index.."Name"] = slot.nameSpec @@ -721,6 +706,9 @@ function SkillsTabClass:CreateGemSlot(index) end) slot.level:AddToTabGroup(self.controls.groupLabel) slot.level.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end return index <= #self.displayGroup.gemList end self.controls["gemSlot"..index.."Level"] = slot.level @@ -802,6 +790,9 @@ function SkillsTabClass:CreateGemSlot(index) end slot.quality:AddToTabGroup(self.controls.groupLabel) slot.quality.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end return index <= #self.displayGroup.gemList end self.controls["gemSlot"..index.."Quality"] = slot.quality @@ -841,6 +832,9 @@ function SkillsTabClass:CreateGemSlot(index) end end slot.enabled.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end return index <= #self.displayGroup.gemList end self.controls["gemSlot"..index.."Enable"] = slot.enabled @@ -863,6 +857,9 @@ function SkillsTabClass:CreateGemSlot(index) self.build.buildFlag = true end) slot.count.shown = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end local gemInstance = self.displayGroup and self.displayGroup.gemList[index] if gemInstance then local grantedEffectList = gemInstance.gemData and gemInstance.gemData.grantedEffectList or { gemInstance.grantedEffect } @@ -882,6 +879,9 @@ function SkillsTabClass:CreateGemSlot(index) end end slot.count.enabled = function() + if index == 1 and self.displayGroup and (self.displayGroup.sourceItem or self.displayGroup.sourceNode) then + return false + end return index <= #self.displayGroup.gemList end self.controls["gemSlot"..index.."Count"] = slot.count @@ -1033,13 +1033,15 @@ function SkillsTabClass:ProcessSocketGroup(socketGroup) end elseif gemInstance.skillId then -- Specified by skill ID - -- Used for skills granted by items + -- Used for skills granted by items / nodes gemInstance.errMsg = nil - local gemId = data.gemForSkill[gemInstance.skillId] + local grantedEffect = data.skills[gemInstance.skillId] + local gemId = data.gemForSkill[grantedEffect] if gemId then gemInstance.gemData = data.gems[gemId] + gemInstance.nameSpec = gemInstance.gemData.name else - gemInstance.grantedEffect = data.skills[gemInstance.skillId] + gemInstance.grantedEffect = grantedEffect end if gemInstance.triggered and gemInstance.grantedEffect then if gemInstance.grantedEffect.levels[gemInstance.level] then @@ -1097,9 +1099,19 @@ function SkillsTabClass:SetDisplayGroup(socketGroup) -- Update the main controls self.controls.groupLabel:SetText(socketGroup.label) - self.controls.groupSlot:SelByValue(socketGroup.slot, "slotName") self.controls.groupEnabled.state = socketGroup.enabled self.controls.includeInFullDPS.state = socketGroup.includeInFullDPS and socketGroup.enabled + if socketGroup.sourceItem then + local swap = not not socketGroup.slot:find("Swap") + socketGroup.set1 = not swap + socketGroup.set2 = swap + elseif socketGroup.sourceNode then + socketGroup.set1 = true + socketGroup.set2 = true + end + + self.controls.set1Enabled.state = socketGroup.set1 == nil and true or socketGroup.set1 + self.controls.set2Enabled.state = socketGroup.set2 == nil and true or socketGroup.set2 self.controls.groupCount:SetText(socketGroup.groupCount or 1) -- Update the gem slot controls @@ -1123,9 +1135,6 @@ function SkillsTabClass:AddSocketGroupTooltip(tooltip, socketGroup) end return end - if socketGroup.enabled and not socketGroup.slotEnabled then - tooltip:AddLine(16, "^7Note: this group is disabled because it is socketed in the inactive weapon set.") - end local sourceSingle = socketGroup.sourceItem or socketGroup.sourceNode if sourceSingle then tooltip:AddLine(18, "^7Source: " .. colorCodes[sourceSingle.rarity or "NORMAL"] .. sourceSingle.name) @@ -1180,7 +1189,7 @@ function SkillsTabClass:AddSocketGroupTooltip(tooltip, socketGroup) reason = "(Unsupported)" elseif not gemInstance.enabled then reason = "(Disabled)" - elseif not socketGroup.enabled or not socketGroup.slotEnabled then + elseif not socketGroup.enabled then elseif grantedEffect.support then if displayEffect.superseded then reason = "(Superseded)" diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 3693de1c9..e3fba3abc 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -175,14 +175,24 @@ function calcs.buildModListForNode(env, node, incSmallPassiveSkill) t_insert(node.grantedSkills, { skillId = skill.skillId, level = skill.level, - noSupports = true, + noSupports = skill.noSupports, source = "Tree:"..node.id }) end end if modList:Flag(nil, "CanExplode") then - t_insert(env.explodeSources, node) + -- we need to filter because buildModListForNodeList call twice this method + local found = false + for _, n in ipairs(env.explodeSources) do + if n.id == node.id then + found = true + break + end + end + if not found then + t_insert(env.explodeSources, node) + end end for i, mod in ipairs(modList) do @@ -646,7 +656,21 @@ function calcs.initEnv(build, mode, override, specEnv) local allocatedMasteryTypeCount = env.spec.allocatedMasteryTypeCount local allocatedMasteryTypes = copyTable(env.spec.allocatedMasteryTypes) + -- Determine main skill group + if env.mode == "CALCS" then + env.calcsInput.skill_number = m_min(m_max(#build.skillsTab.socketGroupList, 1), env.calcsInput.skill_number or 1) + env.mainSocketGroup = env.calcsInput.skill_number + else + build.mainSocketGroup = m_min(m_max(#build.skillsTab.socketGroupList, 1), build.mainSocketGroup or 1) + env.mainSocketGroup = build.mainSocketGroup + end + -- alway use WeaponSet 1 for condition unless set 1 false and set 2 true + local mainSkill = build.skillsTab.socketGroupList[env.mainSocketGroup] + local usingSkillSet = mainSkill and not mainSkill.set1 and mainSkill.set2 and 2 or 1 + + env.usingSkillSet = usingSkillSet + modDB:NewMod("Condition:WeaponSet" .. usingSkillSet , "FLAG", true, "Weapon Set") if not accelerate.nodeAlloc then -- Build list of passive nodes @@ -714,9 +738,6 @@ function calcs.initEnv(build, mode, override, specEnv) modDB:NewMod("Multiplier:AllocatedLifeMastery", "BASE", allocatedMasteryTypes["Life Mastery"]) end - -- add Conditional WeaponSet# base on weapon set from item - modDB:NewMod("Condition:WeaponSet" .. (build.itemsTab.activeItemSet.useSecondWeaponSet and 2 or 1) , "FLAG", true, "Weapon Set") - -- Build and merge item modifiers, and create list of radius jewels if not accelerate.requirementsItems then local items = {} @@ -1291,6 +1312,22 @@ function calcs.initEnv(build, mode, override, specEnv) end end end + if not group then + for _, removeSocketGroup in pairs(build.skillsTab.removedSocketGroupList) do + if removeSocketGroup.source == grantedSkill.source and removeSocketGroup.slot == grantedSkill.slotName then + if removeSocketGroup.gemList[1] and removeSocketGroup.gemList[1].skillId == grantedSkill.skillId and (removeSocketGroup.gemList[1].level == grantedSkill.level or removeSocketGroup.gemList[1].level == getNormalizedSkillLevel(grantedSkill)) then + group = removeSocketGroup + break + end + end + end + + if group then + build.skillsTab.removedSocketGroupList[group.source] = nil + t_insert(build.skillsTab.socketGroupList, group) + markList[group] = true + end + end if not group then -- Create a new group for this skill group = { label = "", enabled = true, gemList = { }, source = grantedSkill.source, slot = grantedSkill.slotName } @@ -1315,8 +1352,7 @@ function calcs.initEnv(build, mode, override, specEnv) group.noSupports = grantedSkill.noSupports activeGemInstance.triggered = grantedSkill.triggered activeGemInstance.triggerChance = grantedSkill.triggerChance - wipeTable(group.gemList) - t_insert(group.gemList, activeGemInstance) + group.gemList[1] = activeGemInstance build.skillsTab:ProcessSocketGroup(group) end @@ -1368,10 +1404,14 @@ function calcs.initEnv(build, mode, override, specEnv) while build.skillsTab.socketGroupList[i] do local socketGroup = build.skillsTab.socketGroupList[i] if socketGroup.source and not markList[socketGroup] then - t_remove(build.skillsTab.socketGroupList, i) + build.skillsTab.socketGroupList[i].shown = false + local removed = t_remove(build.skillsTab.socketGroupList, i) if build.skillsTab.displayGroup == socketGroup then build.skillsTab.displayGroup = nil end + + -- add in the removed group to the list of groups to be removed + build.skillsTab.removedSocketGroupList[removed.source] = removed else i = i + 1 end @@ -1397,15 +1437,6 @@ function calcs.initEnv(build, mode, override, specEnv) env.player.weaponData2 = env.player.itemList["Weapon 2"].weaponData and env.player.itemList["Weapon 2"].weaponData[2] or { } end - -- Determine main skill group - if env.mode == "CALCS" then - env.calcsInput.skill_number = m_min(m_max(#build.skillsTab.socketGroupList, 1), env.calcsInput.skill_number or 1) - env.mainSocketGroup = env.calcsInput.skill_number - else - build.mainSocketGroup = m_min(m_max(#build.skillsTab.socketGroupList, 1), build.mainSocketGroup or 1) - env.mainSocketGroup = build.mainSocketGroup - end - -- Process supports and put them into the correct buckets env.crossLinkedSupportGroups = {} for _, mod in ipairs(env.modDB:Tabulate("LIST", nil, "LinkedSupport")) do @@ -1418,10 +1449,10 @@ function calcs.initEnv(build, mode, override, specEnv) local processedSockets = {} -- Process support gems adding them to applicable support lists for index, group in ipairs(build.skillsTab.socketGroupList) do - local slot = group.slot and build.itemsTab.slots[group.slot] - group.slotEnabled = not slot or not slot.weaponSet or slot.weaponSet == (build.itemsTab.activeItemSet.useSecondWeaponSet and 2 or 1) + group.usingSkillSet = not group.set1 and group.set2 and 2 or 1 + -- if group is main skill or group is enabled - if index == env.mainSocketGroup or (group.enabled and group.slotEnabled) then + if index == env.mainSocketGroup or (group.enabled and group.usingSkillSet == env.usingSkillSet) then local slotName = group.slot and group.slot:gsub(" Swap","") groupCfgList[slotName or "noSlot"] = groupCfgList[slotName or "noSlot"] or {} groupCfgList[slotName or "noSlot"][group] = groupCfgList[slotName or "noSlot"][group] or { @@ -1527,7 +1558,7 @@ function calcs.initEnv(build, mode, override, specEnv) -- Process active skills adding the applicable supports local socketGroupSkillListList = { } for index, group in ipairs(build.skillsTab.socketGroupList) do - if index == env.mainSocketGroup or (group.enabled and group.slotEnabled) then + if index == env.mainSocketGroup or (group.enabled and group.usingSkillSet == env.usingSkillSet) then local slotName = group.slot and group.slot:gsub(" Swap","") groupCfgList[slotName or "noSlot"][group] = groupCfgList[slotName or "noSlot"][group] or { slotName = slotName, @@ -1655,7 +1686,7 @@ function calcs.initEnv(build, mode, override, specEnv) socketGroupSkillListList[slotName or "noSlot"] = socketGroupSkillListList[slotName or "noSlot"] or {} socketGroupSkillListList[slotName or "noSlot"][group] = socketGroupSkillListList[slotName or "noSlot"][group] or {} local socketGroupSkillList = socketGroupSkillListList[slotName or "noSlot"][group] - if index == env.mainSocketGroup or (group.enabled and group.slotEnabled) then + if index == env.mainSocketGroup or (group.enabled and group.usingSkillSet == env.usingSkillSet) then groupCfgList[slotName or "noSlot"][group] = groupCfgList[slotName or "noSlot"][group] or { slotName = slotName, propertyModList = env.modDB:Tabulate("LIST", {slotName = slotName}, "GemProperty") diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 909f9e19c..24bd6b336 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -3137,8 +3137,8 @@ local specialModList = { mod("ScoldsBridleSelfDamage", "LIST", {dmgMult = dmgMult, damageType = dmgType}) }end, -- Extra skill/support - ["grants skill: (%D+)"] = function(_, skill) return grantedExtraSkill(skill, 1) end, - ["grants skill: level (%d+) (.+)"] = function(num, _, skill) return grantedExtraSkill(skill, num) end, + ["grants skill: (%D+)"] = function(_, skill) return grantedExtraSkill(skill, 1, false) end, + ["grants skill: level (%d+) (.+)"] = function(num, _, skill) return grantedExtraSkill(skill, num, false) end, ["[ct][ar][si][tg]g?e?r?s? level (%d+) (.+) when equipped"] = function(num, _, skill) return triggerExtraSkill(skill, num) end, ["[ct][ar][si][tg]g?e?r?s? level (%d+) (.+) on %a+"] = function(num, _, skill) return triggerExtraSkill(skill, num) end, ["use level (%d+) (.+) on %a+"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,