1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Forget objects that were already replaced iwth an artifact.

This commit is contained in:
Tomasz Zieliński
2023-05-05 07:16:38 +02:00
parent d325051213
commit 35ec720555

View File

@ -94,10 +94,15 @@ void QuestArtifactPlacer::placeQuestArtifacts(CRandomGenerator * rand)
artifactToReplace->appearance = templates.front();
//FIXME: Instance name is still "randomArtifact"
//FIXME: Every qap has its OWN collection of artifacts,
//which means different qaps can replace the same object many times
qap->dropReplacedArtifact(artifactToReplace);
for (auto z : map.getZones())
{
//Every qap has its OWN collection of artifacts
auto * localQap = zone->getModificator<QuestArtifactPlacer>();
if (localQap)
{
localQap->dropReplacedArtifact(artifactToReplace);
}
}
break;
}
}