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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user