1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Do not remove battle stacks, make them ghosts instead.

* exclude ghost stacks from (hopefully all) get* results for now
This commit is contained in:
AlexVinS
2016-02-28 01:08:56 +03:00
parent 5d5ad99436
commit 9036d39241
6 changed files with 19 additions and 70 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) && (includeTurrets || !(s->type->idNumber == CreatureID::ARROW_TOWERS));
return predicate(s) && (!vstd::contains(s->state, EBattleStackState::GHOST)) && (includeTurrets || !(s->type->idNumber == CreatureID::ARROW_TOWERS));
});
return ret;