mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-02 00:10:22 +02:00
fix artifact sort by slot crash
This commit is contained in:
parent
17dd8ffb48
commit
8d58066f69
@ -2773,11 +2773,7 @@ bool CGameHandler::manageBackpackArtifacts(const PlayerColor & player, const Obj
|
||||
makeSortBackpackRequest([](const ArtSlotInfo & inf) -> int32_t
|
||||
{
|
||||
auto possibleSlots = inf.getArt()->artType->getPossibleSlots();
|
||||
if (possibleSlots.find(ArtBearer::ALTAR) != possibleSlots.end() && !possibleSlots.at(ArtBearer::ALTAR).empty())
|
||||
{
|
||||
return -3;
|
||||
}
|
||||
else if (possibleSlots.find(ArtBearer::CREATURE) != possibleSlots.end() && !possibleSlots.at(ArtBearer::CREATURE).empty())
|
||||
if (possibleSlots.find(ArtBearer::CREATURE) != possibleSlots.end() && !possibleSlots.at(ArtBearer::CREATURE).empty())
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
@ -2792,7 +2788,7 @@ bool CGameHandler::manageBackpackArtifacts(const PlayerColor & player, const Obj
|
||||
else
|
||||
{
|
||||
logGlobal->error("Unable to get artifact %s slot.", inf.getArt()->artType->getNameTextID());
|
||||
return -4;
|
||||
return -3;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user