1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed summoned units not being removed after battle

This commit is contained in:
AlexVinS 2018-02-23 21:58:05 +03:00
parent 6d8536b12a
commit 080a81db3a
2 changed files with 3 additions and 2 deletions

View File

@ -53,9 +53,10 @@ StackWithBonuses::StackWithBonuses(const HypotheticBattle * Owner, const battle:
player = Owner->getSidePlayer(side);
localInit(Owner);
position = info.position;
summoned = info.summoned;
localInit(Owner);
}
StackWithBonuses::~StackWithBonuses() = default;

View File

@ -797,8 +797,8 @@ void BattleInfo::addUnit(uint32_t id, const JsonNode & data)
auto ret = new CStack(&base, owner, info.id, info.side, SlotID::SUMMONED_SLOT_PLACEHOLDER);
ret->initialPosition = info.position;
stacks.push_back(ret);
ret->summoned = info.summoned;
ret->localInit(this);
ret->summoned = info.summoned;
}
void BattleInfo::moveUnit(uint32_t id, BattleHex destination)