Adds creature Switch event.
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:
@@ -62,13 +62,14 @@ void BattleSide::SetCreature(ArbUt::BorrowedPtr<Creature> creature, uint8_t inde
|
||||
for (auto side : _battle->GetSides()) {
|
||||
if (side == this)
|
||||
continue;
|
||||
for (auto c : side->GetCreatures()) {
|
||||
for (const auto& c : side->GetCreatures()) {
|
||||
if (c != nullptr) {
|
||||
c->MarkOpponentAsSeen(creature);
|
||||
creature->MarkOpponentAsSeen(c.GetRaw());
|
||||
}
|
||||
}
|
||||
}
|
||||
_battle->TriggerEventListener<SwitchEvent>(CreatureIndex(this->_index, index), creature);
|
||||
}
|
||||
|
||||
bool BattleSide::CreatureOnSide(const ArbUt::BorrowedPtr<Creature>& creature) const {
|
||||
|
||||
Reference in New Issue
Block a user