Skip to content
Open
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
14 changes: 13 additions & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ function PassiveSpecClass:ImportFromNodeList(classId, ascendClassId, secondaryAs
self:BuildAllDependsAndPaths()
end

function PassiveSpecClass:IsTattooBlocked(tattooNode)
local blockingPassive = tattooNode and tattooNode.blockingPassive
if blockingPassive then
for passiveId in pairs(blockingPassive) do
if self.allocNodes[passiveId] then
return true
end
end
end
return false
end

function PassiveSpecClass:AllocateDecodedNodes(nodes, isCluster, endian)
for i = 1, #nodes - 1, 2 do
local id
Expand Down Expand Up @@ -1142,7 +1154,7 @@ function PassiveSpecClass:BuildAllDependsAndPaths()

for id, node in pairs(self.nodes) do
-- If node is tattooed, replace it
if self.hashOverrides[node.id] then
if self.hashOverrides[node.id] and not self:IsTattooBlocked(self.hashOverrides[node.id]) then
self:ReplaceNode(node, self.hashOverrides[node.id])
end

Expand Down
20 changes: 12 additions & 8 deletions src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
end
self.skillSprites = self.sprites
end
for type, data in pairs(self.skillSprites) do
for spriteType, data in pairs(self.skillSprites) do
local maxZoom
if not self.imageZoomLevels then
maxZoom = data
Expand All @@ -277,14 +277,18 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
if not self.spriteMap[name] then
self.spriteMap[name] = { }
end
self.spriteMap[name][type] = {
local x = type(coords.x) == "table" and coords.x[#coords.x] or coords.x
local y = type(coords.y) == "table" and coords.y[#coords.y] or coords.y
local w = type(coords.w) == "table" and coords.w[#coords.w] or coords.w
local h = type(coords.h) == "table" and coords.h[#coords.h] or coords.h
self.spriteMap[name][spriteType] = {
handle = sheet.handle,
width = coords.w,
height = coords.h,
[1] = coords.x / sheet.width,
[2] = coords.y / sheet.height,
[3] = (coords.x + coords.w) / sheet.width,
[4] = (coords.y + coords.h) / sheet.height
width = w,
height = h,
[1] = x / sheet.width,
[2] = y / sheet.height,
[3] = (x + w) / sheet.width,
[4] = (y + h) / sheet.height
}
end
end
Expand Down
2 changes: 2 additions & 0 deletions src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
elseif hoverNode and (hoverNode.isTattoo
or (hoverNode.type == "Normal" and (hoverNode.dn == "Strength" or hoverNode.dn == "Dexterity" or hoverNode.dn == "Intelligence"))
or (hoverNode.type == "Notable" and #hoverNode.sd > 0 and (hoverNode.sd[1]:match("+30 to Dexterity") or hoverNode.sd[1]:match("+30 to Strength") or hoverNode.sd[1]:match("+30 to Intelligence")))
or (hoverNode.type == "Notable" and hoverNode.ascendancyName)
or hoverNode.type == "Keystone") and not hoverNode.expansionSkill
then
build.treeTab:ModifyNodePopup(hoverNode, viewPort)
Expand Down Expand Up @@ -1500,6 +1501,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 == "Notable" and node.ascendancyName)
or (node.type == "Keystone") or (node.type == "Mastery"))
and not node.expansionSkill
then
Expand Down
10 changes: 6 additions & 4 deletions src/Classes/TreeTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,10 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
for id, node in pairs(self.build.spec.tree.tattoo.nodes) do
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 == nil or node.legacy == false) or node.legacy == self.showLegacyTattoo) then
or (node.targetType == "Keystone" and treeNodes[selectedNode.id].type == node.targetType)
or (node.targetType == "Ascendancy Notable" and treeNodes[selectedNode.id].type == "Notable" and selectedNode.ascendancyName))
and node.MinimumConnected <= numLinkedNodes and ((node.legacy == nil or node.legacy == false) or node.legacy == self.showLegacyTattoo)
and not self.build.spec:IsTattooBlocked(node) 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 All @@ -875,7 +877,7 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
end
end
table.sort(modGroups, function(a, b) return a.label < b.label end)
end
end
local function addModifier(selectedNode)
local newTattooNode = self.build.spec.tree.tattoo.nodes[modGroups[controls.modSelect.selIndex].id]
newTattooNode.id = selectedNode.id
Expand Down Expand Up @@ -951,7 +953,7 @@ function TreeTabClass:ModifyNodePopup(selectedNode)
local tattooSdMap = { }

for _, node in pairs(self.build.spec.hashOverrides) do
if node.isTattoo and not node.dn:find("Runegraft") then
if node.isTattoo and not self.build.spec:IsTattooBlocked(node) and not node.dn:find("Runegraft") then
if tooltip then
local combined = ""
for _, line in ipairs(node.sd) do
Expand Down
Loading
Loading