1
0
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:
AlexVinS
2016-02-28 01:35:23 +03:00
parent 9036d39241
commit 47b619a543
5 changed files with 16 additions and 13 deletions

View File

@ -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;