1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Assembling in backpack fixed

This commit is contained in:
SoundSSGood 2024-01-18 12:49:08 +02:00
parent e849e4170a
commit 8d4b74b441
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ bool CArtifact::canBePutAt(const CArtifactSet * artSet, ArtifactPosition slot, b
{
if(ArtifactUtils::isSlotBackpack(slot))
{
if(isBig() || !ArtifactUtils::isBackpackFreeSlots(artSet))
if(isBig() || (!assumeDestRemoved && !ArtifactUtils::isBackpackFreeSlots(artSet)))
return false;
return true;
}

View File

@ -2870,8 +2870,8 @@ bool CGameHandler::assembleArtifacts(ObjectInstanceID heroID, ArtifactPosition a
{
COMPLAIN_RET("assembleArtifacts: It's impossible to assemble requested artifact!");
}
if(!destArtifact->canBePutAt(hero, artifactSlot)
&& !destArtifact->canBePutAt(hero, ArtifactPosition::BACKPACK_START))
if(!destArtifact->canBePutAt(hero, artifactSlot, true)
&& !destArtifact->canBePutAt(hero, ArtifactPosition::BACKPACK_START, true))
{
COMPLAIN_RET("assembleArtifacts: It's impossible to give the artholder requested artifact!");
}