Pass battle pointer along with clone for battleside.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-04-13 22:45:48 +02:00
parent 8baa647940
commit 8a9a6af0af
3 changed files with 5 additions and 4 deletions

View File

@@ -123,8 +123,9 @@ bool BattleSide::SwapPositions(u8 a, u8 b) {
_battle->TriggerEventListener<SwapEvent>(_index, a, b);
return true;
}
BattleSide* BattleSide::CloneWithoutCreatures() const {
auto* side = new BattleSide(_index, _battle, _creaturesPerSide);
BattleSide *BattleSide::CloneWithoutCreatures(ArbUt::BorrowedPtr<Battle> battle) const {
auto *side = new BattleSide(_index, battle, _creaturesPerSide);
side->_choicesSet = _choicesSet;
_volatile.Clone(side->_volatile);
side->_hasFled = _hasFled;