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
7 changes: 6 additions & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,11 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
if node.type == "Mastery" and self.masterySelections[id] then
local effect = self.tree.masteryEffects[self.masterySelections[id]]
if effect and self.allocNodes[id] then
node.sd = effect.sd
if self.hashOverrides and self.hashOverrides[id] then
self:ReplaceNode(node, self.hashOverrides[id])
else
node.sd = effect.sd
end
node.allMasteryOptions = false
node.reminderText = { "Tip: Right click to select a different effect" }
self.tree:ProcessStats(node)
Expand Down Expand Up @@ -1386,6 +1390,7 @@ function PassiveSpecClass:ReplaceNode(old, newNode)
end
old.dn = newNode.dn
old.sd = newNode.sd
old.name = newNode.name
old.mods = newNode.mods
old.modKey = newNode.modKey
old.modList = new("ModList")
Expand Down
41 changes: 27 additions & 14 deletions src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
elseif hoverNode and hoverNode.alloc and hoverNode.type == "Mastery" and hoverNode.masteryEffects then
build.treeTab:OpenMasteryPopup(hoverNode, viewPort)
build.buildFlag = true
elseif hoverNode and not hoverNode.alloc and hoverNode.type == "Mastery" and hoverNode.masteryEffects then
build.treeTab:ModifyNodePopup(hoverNode, viewPort)
build.buildFlag = true
end
end

Expand Down Expand Up @@ -527,21 +530,31 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
overlay = "JewelSocketActiveAltRed"
end
end
elseif node.type == "Mastery" then
-- This is the icon that appears in the center of many groups
if node.masteryEffects then
if isAlloc then
base = node.masterySprites.activeIcon.masteryActiveSelected
effect = node.masterySprites.activeEffectImage.masteryActiveEffect
elseif node == hoverNode then
base = node.masterySprites.inactiveIcon.masteryConnected
else
base = node.masterySprites.inactiveIcon.masteryInactive
end
elseif node.type == "Mastery" then
local override = spec.hashOverrides and spec.hashOverrides[node.id]
local hasOverride = override ~= nil

local sprites = hasOverride and tree.spriteMap[override.icon]
local effectSprites = hasOverride and tree.spriteMap[override.activeEffectImage]

if node.masteryEffects then
if isAlloc then
base = (sprites and sprites.masteryActiveSelected)
or (node.masterySprites and node.masterySprites.activeIcon and node.masterySprites.activeIcon.masteryActiveSelected)
effect = (effectSprites and effectSprites.masteryActiveEffect)
or (node.masterySprites and node.masterySprites.activeEffectImage and node.masterySprites.activeEffectImage.masteryActiveEffect)
elseif node == hoverNode then
base = (sprites and sprites.masteryConnected)
or (node.masterySprites and node.masterySprites.inactiveIcon and node.masterySprites.inactiveIcon.masteryConnected)
else
base = node.sprites.mastery
base = (sprites and sprites.masteryInactive)
or (node.masterySprites and node.masterySprites.inactiveIcon and node.masterySprites.inactiveIcon.masteryInactive)
end
SetDrawLayer(nil, 15)
else
base = (sprites and sprites.mastery)
or (node.sprites and node.sprites.mastery)
end
SetDrawLayer(nil, 15)
else
-- Normal node (includes keystones and notables)
if node.isTattoo and node.effectSprites then -- trees < 3.22.0 don't have effectSprites
Expand Down Expand Up @@ -1088,7 +1101,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build)
if node and (node.isTattoo
or (node.type == "Normal" and (node.dn == "Strength" or node.dn == "Dexterity" or node.dn == "Intelligence"))
or (node.type == "Notable" and #node.sd > 0 and (node.sd[1]:match("+30 to Dexterity") or node.sd[1]:match("+30 to Strength") or node.sd[1]:match("+30 to Intelligence")))
or node.type == "Keystone")
or (node.type == "Keystone") or (node.type == "Mastery") )
then
tooltip:AddSeparator(14)
tooltip:AddLine(14, colorCodes.TIP.."Tip: Right click to edit the tattoo for this node")
Expand Down
5 changes: 3 additions & 2 deletions src/Classes/TreeTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
if (nodeName:match(node.targetType:gsub("^Small ", "")) or (node.targetValue ~= "" and nodeValue:match(node.targetValue)) or
(node.targetType == "Small Attribute" and (nodeName == "Intelligence" or nodeName == "Strength" or nodeName == "Dexterity"))
or (node.targetType == "Keystone" and treeNodes[selectedNode.id].type == node.targetType))
and node.MinimumConnected <= numLinkedNodes and (node.legacy == false or node.legacy == self.showLegacyTattoo) then
and node.MinimumConnected <= numLinkedNodes and ((node.legacy == nil or node.legacy == false) or node.legacy == self.showLegacyTattoo) then
local combine = false
for id, desc in pairs(node.stats) do
combine = (id:match("^local_display.*") and #node.stats == (#node.sd - 1)) or combine
Expand Down Expand Up @@ -886,6 +886,7 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
self:RemoveTattooFromNode(selectedNode)
self.modFlag = true
self.build.buildFlag = true
self.defaultTattoo[nodeName] = nil
main:ClosePopup()
end)
controls.close = new("ButtonControl", nil, {90, 75, 80, 20}, "Cancel", function()
Expand All @@ -895,7 +896,7 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
local function getTattooCount()
local count = 0
for _, node in pairs(self.build.spec.hashOverrides) do
if node.isTattoo then
if node.isTattoo and not node.dn:find("Runegraft") then
count = count + 1
end
end
Expand Down
Loading