1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

CHeroWindow: block dismiss button if there no other heroes and no towns

This one resolve mantis issue 530.
This commit is contained in:
ArseniyShestakov 2015-03-12 23:47:46 +03:00
parent 32009690eb
commit 4f3eb919e5

View File

@ -271,6 +271,10 @@ void CHeroWindow::update(const CGHeroInstance * hero, bool redrawNeeded /*= fals
if (dynamic_cast<CKingdomInterface*>(isa))
noDismiss = true;
}
//if player only have one hero and no towns
if(!LOCPLINT->cb->howManyTowns() && LOCPLINT->cb->howManyHeroes() == 1)
noDismiss = true;
dismissButton->block(!!curHero->visitedTown || noDismiss);
if(curHero->getSecSkillLevel(SecondarySkill::TACTICS) == 0)