mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Place quest artifacts after all the treasures are already created.
This commit is contained in:
@ -16,6 +16,8 @@
|
||||
#include "RoadPlacer.h"
|
||||
#include "RiverPlacer.h"
|
||||
#include "WaterAdopter.h"
|
||||
#include "TreasurePlacer.h"
|
||||
#include "QuestArtifactPlacer.h"
|
||||
#include "../CCreatureHandler.h"
|
||||
#include "../mapObjects/CommonConstructors.h"
|
||||
#include "../mapObjects/MapObjects.h" //needed to resolve templates for CommonConstructors.h
|
||||
@ -379,6 +381,21 @@ void ObjectManager::placeObject(rmg::Object & object, bool guarded, bool updateD
|
||||
m->areaIsolated().add(instance->getVisitablePosition() + int3(0, -1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
switch (instance->object().ID)
|
||||
{
|
||||
case Obj::RANDOM_TREASURE_ART:
|
||||
case Obj::RANDOM_MINOR_ART: //In OH3 quest artifacts have higher value than normal arts
|
||||
{
|
||||
if (auto * qap = zone.getModificator<QuestArtifactPlacer>())
|
||||
{
|
||||
qap->rememberPotentialArtifactToReplace(&instance->object());
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(object.instances().front()->object().ID)
|
||||
|
Reference in New Issue
Block a user