1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

bulk move artifacts only equipped, only backpack

This commit is contained in:
SoundSSGood
2023-07-24 19:09:17 +03:00
parent c6a86d9a5f
commit a83f290e13
16 changed files with 99 additions and 53 deletions

View File

@@ -927,10 +927,10 @@ bool CMapLoaderH3M::loadArtifactToSlot(CGHeroInstance * hero, int slot)
// He has Shackles of War (normally - MISC slot artifact) in LEFT_HAND slot set in editor
// Artifact seems to be missing in game, so skip artifacts that don't fit target slot
auto * artifact = ArtifactUtils::createArtifact(map, artifactID);
auto artifactPos = ArtifactPosition(slot);
if(artifact->canBePutAt(ArtifactLocation(hero, artifactPos)))
auto dstLoc = ArtifactLocation(hero, ArtifactPosition(slot));
if(artifact->canBePutAt(dstLoc))
{
hero->putArtifact(artifactPos, artifact);
artifact->putAt(dstLoc);
}
else
{