mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Update DefenceBehavior.cpp
Stop iterating over tasks when the curent hero has been found in one.
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user