mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +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:
parent
32009690eb
commit
4f3eb919e5
@ -271,6 +271,10 @@ void CHeroWindow::update(const CGHeroInstance * hero, bool redrawNeeded /*= fals
|
|||||||
if (dynamic_cast<CKingdomInterface*>(isa))
|
if (dynamic_cast<CKingdomInterface*>(isa))
|
||||||
noDismiss = true;
|
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);
|
dismissButton->block(!!curHero->visitedTown || noDismiss);
|
||||||
|
|
||||||
if(curHero->getSecSkillLevel(SecondarySkill::TACTICS) == 0)
|
if(curHero->getSecSkillLevel(SecondarySkill::TACTICS) == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user