This need to change the code on other parts too (for example when kills a unit and advances, first delete the object then advances, and in the two last scenarios, when you pay 6 gold to a free advance), but from what i've seen in various parts of the code, the solution of using object is simpler than currently exists.
EDIT: Already tested and works
If you want, I can fix it in several parts and send a PR proposal @inferno8
A Dimensional Gate recover all of its advancements and the ability to level up simply by loading a savegame.
I'm wondering if this is because the unit advances have been edited directly instead of using [object]
Maybe this is a better alternative:
This need to change the code on other parts too (for example when kills a unit and advances, first delete the object then advances, and in the two last scenarios, when you pay 6 gold to a free advance), but from what i've seen in various parts of the code, the solution of using object is simpler than currently exists.
EDIT: Already tested and works
If you want, I can fix it in several parts and send a PR proposal @inferno8
This PR is related, because of it I discovered that neither my fix nor the original method works correctly: https://github.com/inferno8/wesnoth-To_Lands_Unknown/pull/17