1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Do not remove hero if left only with commander

This commit is contained in:
Andrii Danylchenko
2022-04-23 16:45:38 +03:00
committed by Andrii Danylchenko
parent e0e3787748
commit 0d15089dd4
3 changed files with 12 additions and 5 deletions

View File

@@ -328,7 +328,7 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState)
bool lastHeroStackSelected = false;
if(selectedObj->stacksCount() == 1
&& owner->getSelection()->upg != upg
&& dynamic_cast<const CGHeroInstance*>(selectedObj))
&& selectedObj->needsLastStack())
{
lastHeroStackSelected = true;
}