1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fix regressions

This commit is contained in:
Ivan Savenko
2025-04-10 12:27:18 +03:00
parent e6a8e5d4bd
commit 912c2eae94
17 changed files with 94 additions and 98 deletions

View File

@@ -155,13 +155,12 @@ CBonusSystemNode & CArmedInstance::whatShouldBeAttached()
void CArmedInstance::attachToBonusSystem(CGameState * gs)
{
CArmedInstance::restoreBonusSystem(gs);
whatShouldBeAttached().attachTo(whereShouldBeAttached(gs));
}
void CArmedInstance::restoreBonusSystem(CGameState * gs)
{
whatShouldBeAttached().attachTo(whereShouldBeAttached(gs));
for(const auto & elem : stacks)
elem.second->artDeserializationFix(gs, elem.second.get());
}
@@ -169,14 +168,12 @@ void CArmedInstance::restoreBonusSystem(CGameState * gs)
void CArmedInstance::detachFromBonusSystem(CGameState * gs)
{
whatShouldBeAttached().detachFrom(whereShouldBeAttached(gs));
// TODO: the opposite
// for(const auto & elem : stacks)
// elem.second->artDeserializationFix(elem.second.get());
}
void CArmedInstance::attachUnitsToArmy()
{
assert(getArmy() != nullptr);
for(const auto & elem : stacks)
elem.second->attachTo(*getArmy());
}