Browse Source

Assembling in backpack fixed

SoundSSGood 1 year ago
parent
commit
8d4b74b441
2 changed files with 3 additions and 3 deletions
  1. 1 1
      lib/CArtHandler.cpp
  2. 2 2
      server/CGameHandler.cpp

+ 1 - 1
lib/CArtHandler.cpp

@@ -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;
 		}

+ 2 - 2
server/CGameHandler.cpp

@@ -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!");
 		}