diff --git a/src/Classes/ImportTab.lua b/src/Classes/ImportTab.lua index 4dbab4dbb3..f955617745 100644 --- a/src/Classes/ImportTab.lua +++ b/src/Classes/ImportTab.lua @@ -1039,16 +1039,29 @@ function ImportTabClass:ImportSocketedItems(item, socketedItems, slotName) else local normalizedBasename, qualityType = self.build.skillsTab:GetBaseNameAndQuality(socketedItem.typeLine, nil) local gemId = self.build.data.gemForBaseName[normalizedBasename:lower()] + local enable1 = true + local enable2 = false if socketedItem.hybrid then -- Used by transfigured gems and dual-skill gems (currently just Stormbind) normalizedBasename, qualityType = self.build.skillsTab:GetBaseNameAndQuality(socketedItem.hybrid.baseTypeName, nil) gemId = self.build.data.gemForBaseName[normalizedBasename:lower()] if gemId and socketedItem.hybrid.isVaalGem then gemId = self.build.data.gemGrantedEffectIdForVaalGemId[self.build.data.gems[gemId].grantedEffectId] + + -- Turn off Vaal skills by default on import + enable1 = false + enable2 = true end end if gemId then - local gemInstance = { level = 20, quality = 0, enabled = true, enableGlobal1 = true, gemId = gemId } + -- if the gem is a guard gem, disable by default + local isGuard = false + if self.build.data.gems[gemId].tags.guard then + isGuard = true + end + local gemInstance = { + level = 20, quality = 0, enabled = not isGuard, enableGlobal1 = enable1, enableGlobal2 = enable2, gemId = gemId + } gemInstance.nameSpec = self.build.data.gems[gemId].name gemInstance.support = socketedItem.support gemInstance.qualityId = qualityType diff --git a/src/Modules/Build.lua b/src/Modules/Build.lua index 09fe063e60..bfde1209d7 100644 --- a/src/Modules/Build.lua +++ b/src/Modules/Build.lua @@ -456,7 +456,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin { }, { stat = "Devotion", label = "Devotion", color = colorCodes.RARE, fmt = "d" }, { }, - { stat = "TotalEHP", label = "Effective Hit Pool", fmt = ".0f", compPercent = true }, + { stat = "TotalEHP", label = "Effective Hit Pool", fmt = ".0f", compPercent = true}, { stat = "PvPTotalTakenHit", label = "PvP Hit Taken", fmt = ".1f", flag = "isPvP", lowerIsBetter = true }, { stat = "PhysicalMaximumHitTaken", label = "Phys Max Hit", fmt = ".0f", color = colorCodes.PHYS, compPercent = true, }, { stat = "LightningMaximumHitTaken", label = "Elemental Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken == o.ColdMaximumHitTaken and o.LightningMaximumHitTaken == o.FireMaximumHitTaken end }, @@ -1322,6 +1322,9 @@ function buildMode:OnFrame(inputEvents) if main.decimalSeparator ~= self.lastShowDecimalSeparator then self:RefreshStatList() end + if main.showEHPInBuildPanel ~= self.showEHPInBuildPanel then + self:RefreshStatList() + end if main.showTitlebarName ~= self.lastShowTitlebarName then self.spec:SetWindowTitleWithBuildClass() end @@ -1680,6 +1683,7 @@ function buildMode:FormatStat(statData, statVal, overCapStatVal, colorOverride) self.lastShowThousandsSeparators = main.showThousandsSeparators self.lastShowThousandsSeparator = main.thousandsSeparator self.lastShowDecimalSeparator = main.decimalSeparator + self.showEHPInBuildPanel = main.showEHPInBuildPanel self.lastShowTitlebarName = main.showTitlebarName return valStr end @@ -1701,6 +1705,11 @@ function buildMode:AddDisplayStatList(statList, actor) end if statVal and ((statData.condFunc and statData.condFunc(statVal,actor.output)) or (not statData.condFunc and statVal ~= 0)) then local overCapStatVal = actor.output[statData.overCapStat] or nil + + if statData.stat == "TotalEHP" then + statData.hideStat = not self.showEHPInBuildPanel + end + if statData.stat == "SkillDPS" then labelColor = colorCodes.CUSTOM table.sort(actor.output.SkillDPS, function(a,b) return (a.dps * a.count) > (b.dps * b.count) end) diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index b880ede279..ad5bd397a8 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -1589,8 +1589,12 @@ function calcs.initEnv(build, mode, override, specEnv) group.displayLabel = nil for _, gemInstance in ipairs(group.gemList) do local grantedEffect = gemInstance.gemData and gemInstance.gemData.grantedEffect or gemInstance.grantedEffect - if grantedEffect and not grantedEffect.support and gemInstance.enabled then - group.displayLabel = (group.displayLabel and group.displayLabel..", " or "") .. grantedEffect.name + if grantedEffect and not grantedEffect.support then + if gemInstance.enabled then + group.displayLabel = (group.displayLabel and group.displayLabel..", " or "") .. grantedEffect.name + else + group.displayLabel = (group.displayLabel and group.displayLabel..", " or "") .. "^x7F7F7F" .. grantedEffect.name .. " (Disabled)^xFFFFFF" + end end end group.displayLabel = group.displayLabel or "" diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index a3c93a0bea..b27d4b98f6 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -103,6 +103,7 @@ function main:Init() self.slotOnlyTooltips = true self.POESESSID = "" self.showPublicBuilds = true + self.showEHPInBuildPanel = false if self.userPath then self:ChangeUserPath(self.userPath, ignoreBuild) @@ -617,6 +618,9 @@ function main:LoadSettings(ignoreBuild) if node.attrib.showPublicBuilds then self.showPublicBuilds = node.attrib.showPublicBuilds == "true" end + if node.attrib.showEHPInBuildPanel then + self.showEHPInBuildPanel = node.attrib.showEHPInBuildPanel == "true" + end end end end @@ -727,7 +731,8 @@ function main:SaveSettings() POESESSID = self.POESESSID, invertSliderScrollDirection = tostring(self.invertSliderScrollDirection), disableDevAutoSave = tostring(self.disableDevAutoSave), - showPublicBuilds = tostring(self.showPublicBuilds) + showPublicBuilds = tostring(self.showPublicBuilds), + showEHPInBuildPanel = tostring(self.showEHPInBuildPanel) } }) local res, errMsg = common.xml.SaveXMLFile(setXML, self.userPath.."Settings.xml") if not res then @@ -975,6 +980,13 @@ function main:OpenOptionsPopup() controls.invertSliderScrollDirection.tooltipText = "Default scroll direction is:\nScroll Up = Move right\nScroll Down = Move left" controls.invertSliderScrollDirection.state = self.invertSliderScrollDirection + nextRow() + controls.showEHPInBuildPanel = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show EHP In Build Panel:", function(state) + self.showEHPInBuildPanel = state + end) + controls.showEHPInBuildPanel.tooltipText = "Display Effective Health Pool In The Left Build Panel" + controls.showEHPInBuildPanel.state = self.showEHPInBuildPanel + if launch.devMode then nextRow() controls.disableDevAutoSave = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Disable Dev AutoSave:", function(state)