mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Give bonus experience for capturing a town even if the enemy hero escaped.
This commit is contained in:
		| @@ -241,13 +241,13 @@ void BattleResultProcessor::endBattle(const CBattleInfoCallback & battle) | ||||
| 			battleResult->exp[1] += 500; | ||||
| 		if(heroDefender) | ||||
| 			battleResult->exp[0] += 500; | ||||
|  | ||||
| 		// Give 500 exp to winner if a town was conquered during the battle | ||||
| 		const auto * defendedTown = battle.battleGetDefendedTown(); | ||||
| 		if (defendedTown && battleResult->winner == BattleSide::ATTACKER) | ||||
| 			battleResult->exp[BattleSide::ATTACKER] += 500; | ||||
| 	} | ||||
|  | ||||
| 	// Give 500 exp to winner if a town was conquered during the battle | ||||
| 	const auto * defendedTown = battle.battleGetDefendedTown(); | ||||
| 	if (defendedTown && battleResult->winner == BattleSide::ATTACKER) | ||||
| 		battleResult->exp[BattleSide::ATTACKER] += 500; | ||||
|  | ||||
| 	if(heroAttacker) | ||||
| 		battleResult->exp[0] = heroAttacker->calculateXp(battleResult->exp[0]);//scholar skill | ||||
| 	if(heroDefender) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user