Skip to content

Commit

Permalink
Fix: when upconverting between trees, if a Mastery lost a mod from it…
Browse files Browse the repository at this point in the history
…s pool that was allocated it would error (PathOfBuildingCommunity#4765)
  • Loading branch information
Nostrademous committed Aug 12, 2022
1 parent c819a68 commit 78d1390
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -852,11 +852,16 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
for id, node in pairs(self.nodes) do
if node.type == "Mastery" and self.masterySelections[id] then
local effect = self.tree.masteryEffects[self.masterySelections[id]]
node.sd = effect.sd
node.allMasteryOptions = false
node.reminderText = { "Tip: Right click to select a different effect" }
self.tree:ProcessStats(node)
self.allocatedMasteryCount = self.allocatedMasteryCount + 1
if effect then
node.sd = effect.sd
node.allMasteryOptions = false
node.reminderText = { "Tip: Right click to select a different effect" }
self.tree:ProcessStats(node)
self.allocatedMasteryCount = self.allocatedMasteryCount + 1
else
self.nodes[id].alloc = false
self.allocNodes[id] = nil
end
elseif node.type == "Mastery" then
self:AddMasteryEffectOptionsToNode(node)
elseif node.type == "Notable" and node.alloc then
Expand Down

0 comments on commit 78d1390

Please sign in to comment.