mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Correctly count the number of wandering heroes when moving hero off garrison.
This commit is contained in:
@@ -1838,7 +1838,7 @@ bool CGameHandler::garrisonSwap( si32 tid )
|
|||||||
else if (town->garrisonHero && !town->visitingHero) //move hero out of the garrison
|
else if (town->garrisonHero && !town->visitingHero) //move hero out of the garrison
|
||||||
{
|
{
|
||||||
//check if moving hero out of town will break 8 wandering heroes limit
|
//check if moving hero out of town will break 8 wandering heroes limit
|
||||||
if(getHeroCount(town->garrisonHero->tempOwner,true) >= 8)
|
if(getHeroCount(town->garrisonHero->tempOwner,false) >= 8)
|
||||||
{
|
{
|
||||||
complain("Cannot move hero out of the garrison, there are already 8 wandering heroes!");
|
complain("Cannot move hero out of the garrison, there are already 8 wandering heroes!");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user