Rework for C Interfaces to handle exceptions a bit better.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -39,14 +39,15 @@ void BattleSide::SetChoice(BaseTurnChoice* choice) {
|
||||
}
|
||||
|
||||
void BattleSide::SetCreature(Creature* creature, uint8_t index) {
|
||||
AssertNotNull(creature)
|
||||
auto old = _creatures[index];
|
||||
if (old != nullptr) {
|
||||
old->SetOnBattleField(false);
|
||||
}
|
||||
_creatures[index] = creature;
|
||||
creature->SetBattleData(_battle, this);
|
||||
creature->SetOnBattleField(true);
|
||||
if (creature != nullptr) {
|
||||
creature->SetBattleData(_battle, this);
|
||||
creature->SetOnBattleField(true);
|
||||
}
|
||||
if (_battle == nullptr)
|
||||
return;
|
||||
for (auto side : _battle->GetSides()) {
|
||||
|
||||
Reference in New Issue
Block a user