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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user