Skip to content

Keep the bloodline when undoing tree changes - #10636

Open
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/bloodline-undo
Open

mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/bloodline-undo

Conversation

@mcagnion

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

In the Tree tab, pressing Ctrl+Z or Ctrl+Y reset the bloodline dropdown to None. The bloodline passives stayed allocated, and saving the build afterwards lost the bloodline. Copying a tree in Manage Passive Trees and converting a tree to a newer version did the same.

Undo states read the bloodline from secondaryAscendClassId, a field that is never set. They now read curSecondaryAscendClassId, like classId and ascendClassId next to it. Builds already saved without their bloodline are not repaired.

Steps taken to verify a working solution:

  • Added a test that selects a bloodline, then undoes and redoes, and checks that the bloodline is back. It fails without the change.
  • Opened the same Chieftain build with Delirious Bloodline on dev and on this branch, allocated one passive, then pressed Ctrl+Z and Ctrl+Y. On dev the bloodline went to None; on this branch it stayed.
  • On two bloodline builds (Aul and Delirious), copying the tree, converting it from 3.29 to 3.30, and saving then reloading after an undo now keep the bloodline; on dev each of them lost it.

Before screenshot:

Before: after Ctrl+Z the bloodline dropdown shows None

After screenshot:

After: after Ctrl+Z the bloodline dropdown keeps Delirious Bloodline

Undo states stored the bloodline from a field that is never set, so
Ctrl+Z, Ctrl+Y, copying a tree and converting a tree to a newer version
all reset the bloodline to None. The allocated bloodline passives stayed
allocated without a bloodline, and saving afterwards wrote no bloodline
to the build. Undo states now store the selected bloodline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant