1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

putArtifact, removeArtifact

This commit is contained in:
SoundSSGood
2023-05-17 17:01:22 +03:00
parent 021f94a579
commit f0feeeac6e
3 changed files with 58 additions and 124 deletions

View File

@@ -1936,7 +1936,6 @@ void AssembledArtifact::applyGs(CGameState *gs)
//move constituent from hero to be part of new, combined artifact
constituentInstance->removeFrom(ArtifactLocation(al.artHolder, pos));
combinedArt->addAsConstituent(constituentInstance, pos);
if(combineEquipped)
{
if(!vstd::contains(combinedArt->artType->possibleSlots[artSet->bearerType()], al.slot)
@@ -1947,6 +1946,9 @@ void AssembledArtifact::applyGs(CGameState *gs)
{
al.slot = std::min(al.slot, pos);
}
if(al.slot == pos)
pos = ArtifactPosition::PRE_FIRST;
combinedArt->addAsConstituent(constituentInstance, pos);
}
//put new combined artifacts