From ae693110238f36f5424ee85cbdc49bc68d13fa09 Mon Sep 17 00:00:00 2001 From: Andrii Danylchenko Date: Sat, 20 Apr 2024 15:26:25 +0300 Subject: [PATCH] #3788 - fix passing wirlpool with only commander alive --- lib/mapObjects/MiscObjects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index 5bab35198..827c21991 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -709,7 +709,8 @@ void CGWhirlpool::teleportDialogAnswered(const CGHeroInstance *hero, ui32 answer bool CGWhirlpool::isProtected(const CGHeroInstance * h) { return h->hasBonusOfType(BonusType::WHIRLPOOL_PROTECTION) - || (h->stacksCount() == 1 && h->Slots().begin()->second->count == 1); + || (h->stacksCount() == 1 && h->Slots().begin()->second->count == 1) + || (h->stacksCount() == 0 && h->commander && h->commander->alive); } ArtifactID CGArtifact::getArtifact() const