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
9 changes: 8 additions & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,14 @@ function PassiveSpecClass:AllocNode(node, altPath)

if node.isMultipleChoiceOption then
-- For multiple choice passives, make sure no other choices are allocated
local parent = node.linked[1]
local parent = nil
for _, possibleParent in ipairs(node.linked) do
if possibleParent.isMultipleChoice and possibleParent.alloc and possibleParent ~= node then
parent = possibleParent
break
end
end
assert(parent) -- If we're allocating a multiple choice option without an allocated parent, something has gone wrong
for _, optNode in ipairs(parent.linked) do
if optNode.isMultipleChoiceOption and optNode.alloc and optNode ~= node then
self:DeallocSingleNode(optNode)
Expand Down
8 changes: 4 additions & 4 deletions src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,16 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
goto endConnection
end

if node.ascendancyName ~= other.ascendancyName then
goto endConnection
end

if node.id == otherId then
goto endConnection
end

t_insert(other.linkedId, node.id)
t_insert(node.linkedId, otherId)

if node.ascendancyName ~= other.ascendancyName then
goto endConnection
end

if node.classesStart ~= nil or other.classesStart ~= nil then
goto endConnection
Expand Down
Loading