1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

altar sacrifice all fix

This commit is contained in:
SoundSSGood 2023-08-11 14:19:06 +03:00
parent b2de5d32d1
commit 213eda5e1e

View File

@ -1262,11 +1262,14 @@ void CAltarWindow::SacrificeAll()
}
else
{
for(const auto & aw : arts->visibleArtSet.artifactsWorn)
std::vector<ConstTransitivePtr<CArtifactInstance>> artsForMove;
for(const auto& slotInfo : arts->visibleArtSet.artifactsWorn)
{
if(!aw.second.locked)
moveArtToAltar(nullptr, aw.second.artifact);
if(!slotInfo.second.locked && slotInfo.second.artifact->artType->isTradable())
artsForMove.push_back(slotInfo.second.artifact);
}
for(auto artInst : artsForMove)
moveArtToAltar(nullptr, artInst);
arts->updateWornSlots();
SacrificeBackpack();
}