Browse Source

Fix crash on applying necromancy when battle ended in a draw

Ivan Savenko 1 year ago
parent
commit
64ad57470c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/battles/BattleResultProcessor.cpp

+ 1 - 1
server/battles/BattleResultProcessor.cpp

@@ -544,7 +544,7 @@ void BattleResultProcessor::battleAfterLevelUp(const BattleID & battleID, const
 	// units will be given after casualties are taken
 	const SlotID necroSlot = raisedStack.type ? finishingBattle->winnerHero->getSlotFor(raisedStack.type) : SlotID();
 
-	if (necroSlot != SlotID())
+	if (necroSlot != SlotID() && !finishingBattle->isDraw())
 	{
 		finishingBattle->winnerHero->showNecromancyDialog(raisedStack, gameHandler->getRandomGenerator());
 		gameHandler->addToSlot(StackLocation(finishingBattle->winnerHero, necroSlot), raisedStack.type, raisedStack.count);