mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-10 00:43:59 +02:00
Update DefenceBehavior.cpp
Stop iterating over tasks when the curent hero has been found in one.
This commit is contained in:
parent
1d79946825
commit
2df9861076
@ -425,7 +425,10 @@ void DefenceBehavior::evaluateRecruitingHero(Goals::TGoalVec & tasks, const HitM
|
||||
if (auto recruitGoal = dynamic_cast<Goals::RecruitHero*>(task.get()))
|
||||
{
|
||||
if (recruitGoal->getHero() == hero)
|
||||
{
|
||||
heroAlreadyHiredInOtherTown = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (heroAlreadyHiredInOtherTown)
|
||||
|
Loading…
Reference in New Issue
Block a user