diff --git a/spec/System/TestTreeTab_spec.lua b/spec/System/TestTreeTab_spec.lua index 8374496d410..f93f39694e4 100644 --- a/spec/System/TestTreeTab_spec.lua +++ b/spec/System/TestTreeTab_spec.lua @@ -100,6 +100,18 @@ describe("TreeTab", function() assert.are.same("Two Hand Mastery: Gain 10 Damage", report[2].name) end) + it("restores the bloodline on redo", function() + local spec = build.spec + local bloodlineId = assert(next(spec.tree.alternate_ascendancies)) + spec:ResetUndo() + spec:SelectSecondaryAscendClass(bloodlineId) + spec:AddUndoState() + spec:Undo() + spec:Redo() + + assert.are.equals(bloodlineId, spec.curSecondaryAscendClassId) + end) + describe("CopyTree", function() it("Copies a tree spec with a new name", function() local newTitle = "Copied Tree" diff --git a/src/Classes/PassiveSpec.lua b/src/Classes/PassiveSpec.lua index 89dd9e754a1..d3b24cdc220 100644 --- a/src/Classes/PassiveSpec.lua +++ b/src/Classes/PassiveSpec.lua @@ -2433,7 +2433,7 @@ function PassiveSpecClass:CreateUndoState() return { classId = self.curClassId, ascendClassId = self.curAscendClassId, - secondaryAscendClassId = self.secondaryAscendClassId, + secondaryAscendClassId = self.curSecondaryAscendClassId, hashList = allocNodeIdList, hashOverrides = hashOverridesCopy, masteryEffects = selections,