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:
parent
e849e4170a
commit
8d4b74b441
@ -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;
|
||||
}
|
||||
|
@ -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!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user