1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Refactoring: use cleaner CCreatureSet::stacksCount everywhere

This commit is contained in:
Arseniy Shestakov
2015-12-24 21:30:57 +03:00
parent 62bab27e7e
commit 6f5c52a229
7 changed files with 21 additions and 21 deletions

View File

@@ -1126,10 +1126,10 @@ void CGWhirlpool::teleportDialogAnswered(const CGHeroInstance *hero, ui32 answer
cb->moveHero(hero->id, dPos, true);
}
bool CGWhirlpool::isProtected( const CGHeroInstance * h )
bool CGWhirlpool::isProtected(const CGHeroInstance * h)
{
if(h->hasBonusOfType(Bonus::WHIRLPOOL_PROTECTION)
|| (h->Slots().size() == 1 && h->Slots().begin()->second->count == 1)) //we can't remove last unit
if(h->hasBonusOfType(Bonus::WHIRLPOOL_PROTECTION) ||
(h->stacksCount() == 1 && h->Slots().begin()->second->count == 1)) //we can't remove last unit
{
return true;
}