mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix endBattleConfirm
This commit is contained in:
parent
3c611ffa5b
commit
186c6098e8
@ -425,10 +425,13 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
|
||||
if(finishingBattle->loserHero)
|
||||
{
|
||||
packHero.srcArtHolder = finishingBattle->loserHero->id;
|
||||
for(const auto & artSlot : finishingBattle->loserHero->artifactsWorn)
|
||||
for(const auto & slot : ArtifactUtils::commonWornSlots())
|
||||
{
|
||||
if(ArtifactUtils::isArtRemovable(artSlot))
|
||||
addArtifactToTransfer(packHero, artSlot.first, artSlot.second.getArt());
|
||||
if(const auto artSlot = finishingBattle->loserHero->artifactsWorn.find(slot);
|
||||
artSlot != finishingBattle->loserHero->artifactsWorn.end() && ArtifactUtils::isArtRemovable(*artSlot))
|
||||
{
|
||||
addArtifactToTransfer(packHero, artSlot->first, artSlot->second.getArt());
|
||||
}
|
||||
}
|
||||
for(const auto & artSlot : finishingBattle->loserHero->artifactsInBackpack)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user