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:
parent
4b307dc0e4
commit
119d51d1ef
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user