1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Correctly count the number of wandering heroes when moving hero off garrison.

This commit is contained in:
Frank Zago 2009-06-24 03:14:46 +00:00
parent a42b77b682
commit 6cf3823154

View File

@ -1838,7 +1838,7 @@ bool CGameHandler::garrisonSwap( si32 tid )
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
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!");
return false;