mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
Merge pull request #4421 from SoundSSGood/endBattleConfirm-fix
endBattleConfirm crash fix
This commit is contained in:
@ -447,7 +447,6 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
|
|||||||
addArtifactToTransfer(packCommander, artSlot.first, artSlot.second.getArt());
|
addArtifactToTransfer(packCommander, artSlot.first, artSlot.second.getArt());
|
||||||
sendArtifacts(packCommander);
|
sendArtifacts(packCommander);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
auto armyObj = battle.battleGetArmyObject(battle.otherSide(battleResult->winner));
|
auto armyObj = battle.battleGetArmyObject(battle.otherSide(battleResult->winner));
|
||||||
for(const auto & armySlot : armyObj->stacks)
|
for(const auto & armySlot : armyObj->stacks)
|
||||||
{
|
{
|
||||||
@ -458,6 +457,7 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
|
|||||||
addArtifactToTransfer(packsArmy, artSlot.first, armySlot.second->getArt(artSlot.first));
|
addArtifactToTransfer(packsArmy, artSlot.first, armySlot.second->getArt(artSlot.first));
|
||||||
sendArtifacts(packsArmy);
|
sendArtifacts(packsArmy);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Display loot
|
// Display loot
|
||||||
if(!arts.empty())
|
if(!arts.empty())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user