Skip to content

Commit

Permalink
fix more crashes with converting trees
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Dec 1, 2023
1 parent 5fa38a1 commit 4ec1f25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@ function PassiveSpecClass:SelectAscendClass(ascendClassId)
end

function PassiveSpecClass:SelectSecondaryAscendClass(ascendClassId)
-- if Secondary Ascendencies do not exist on this tree version

Check warning on line 559 in src/Classes/PassiveSpec.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Ascendencies)
if not self.tree.alternate_ascendancies then
return
end
if self.curSecondaryAscendClassId then
-- Deallocate the current ascendancy class's start node
local ascendClass = self.tree.alternate_ascendancies[self.curSecondaryAscendClassId]
Expand All @@ -572,7 +576,7 @@ function PassiveSpecClass:SelectSecondaryAscendClass(ascendClassId)
if ascendClassId == 0 then
self.curSecondaryAscendClass = nil
self.curSecondaryAscendClassName = "None"
else
elseif self.tree.alternate_ascendancies[self.curSecondaryAscendClassId] then
local ascendClass = self.tree.alternate_ascendancies[self.curSecondaryAscendClassId]
self.curSecondaryAscendClass = ascendClass
self.curSecondaryAscendClassName = ascendClass.name
Expand Down

0 comments on commit 4ec1f25

Please sign in to comment.