mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Centralize GHOST state handling
This commit is contained in:
@ -189,7 +189,7 @@ TStacks CBattleInfoEssentials::battleGetStacksIf(TStackFilter predicate, bool in
|
||||
RETURN_IF_NOT_BATTLE(ret);
|
||||
|
||||
vstd::copy_if(getBattle()->stacks, std::back_inserter(ret), [=](const CStack * s){
|
||||
return predicate(s) && (!vstd::contains(s->state, EBattleStackState::GHOST)) && (includeTurrets || !(s->type->idNumber == CreatureID::ARROW_TOWERS));
|
||||
return predicate(s) && (!s->isGhost()) && (includeTurrets || !(s->type->idNumber == CreatureID::ARROW_TOWERS));
|
||||
});
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user