Skip to content

Commit 9d30f11

Browse files
committed
fix tooltip text on tree compare
1 parent a718b61 commit 9d30f11

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/Classes/TreeTab.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,18 @@ local TreeTabClass = newClass("TreeTab", "ControlHost", function(self, build)
8383
end
8484
if respec > 0 or respecAscendancy > 0 then
8585
local goldCost = data.goldRespecPrices[build.characterLevel]
86-
tooltip:AddLine(16, "^xFFD700"..(respec * goldCost) .. " Gold ^7required to switch to this tree.")
87-
local nodeWord = respec == 1 and "node differs" or "nodes differ"
88-
local ascendWord = respecAscendancy == 1 and "node differs" or "nodes differ"
89-
tooltip:AddLine(16, string.format("^7\t%d Passive %s from your current tree.", respec, nodeWord))
90-
tooltip:AddLine(16, string.format("^7\t%d Ascendancy %s from your current tree.", respecAscendancy, ascendWord))
86+
local totalGold = (respec * goldCost) + (respecAscendancy * goldCost * 5)
87+
tooltip:AddLine(16, string.format("^xFFD700%d Gold ^7required to switch to this tree.", totalGold))
88+
89+
if respec > 0 then
90+
local nodeWord = respec == 1 and "Passive to be refunded" or "Passives to be refunded"
91+
tooltip:AddLine(16, string.format("^7\t%d %s.", respec, nodeWord))
92+
end
93+
94+
if respecAscendancy > 0 then
95+
local ascendWord = respecAscendancy == 1 and "Ascendancy node to be refunded" or "Ascendancy nodes to be refunded"
96+
tooltip:AddLine(16, string.format("^7\t%d %s.", respecAscendancy, ascendWord))
97+
end
9198
end
9299
end
93100
end

0 commit comments

Comments
 (0)