浏览代码

Fix crash on applying necromancy when battle ended in a draw

Ivan Savenko 1 年之前
父节点
当前提交
64ad57470c
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
 	// units will be given after casualties are taken
 	const SlotID necroSlot = raisedStack.type ? finishingBattle->winnerHero->getSlotFor(raisedStack.type) : SlotID();
 	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());
 		finishingBattle->winnerHero->showNecromancyDialog(raisedStack, gameHandler->getRandomGenerator());
 		gameHandler->addToSlot(StackLocation(finishingBattle->winnerHero, necroSlot), raisedStack.type, raisedStack.count);
 		gameHandler->addToSlot(StackLocation(finishingBattle->winnerHero, necroSlot), raisedStack.type, raisedStack.count);