Просмотр исходного кода

Fix hero kill mission not registered if target hero was the attacker

Ivan Savenko 1 год назад
Родитель
Сommit
a8b07477b4
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      server/battles/BattleResultProcessor.cpp

+ 2 - 2
server/battles/BattleResultProcessor.cpp

@@ -481,12 +481,12 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
 
 	if(finishingBattle->loserHero) //remove beaten hero
 	{
-		RemoveObject ro(finishingBattle->loserHero->id, battle.battleGetArmyObject(0)->getOwner());
+		RemoveObject ro(finishingBattle->loserHero->id, finishingBattle->victor);
 		gameHandler->sendAndApply(&ro);
 	}
 	if(finishingBattle->isDraw() && finishingBattle->winnerHero) //for draw case both heroes should be removed
 	{
-		RemoveObject ro(finishingBattle->winnerHero->id, battle.battleGetArmyObject(0)->getOwner());
+		RemoveObject ro(finishingBattle->winnerHero->id, finishingBattle->loser);
 		gameHandler->sendAndApply(&ro);
 	}