1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Prevent RoE elemental dwellings from spawning.

This commit is contained in:
DjWarmonger
2014-07-08 11:57:02 +02:00
parent 82ccf240f0
commit d3f97829a1

View File

@@ -1451,7 +1451,14 @@ void CRmgTemplateZone::addAllPossibleObjects (CMapGenerator* gen)
//dwellings
for (auto secondaryID : VLC->objtypeh->knownSubObjects(Obj::CREATURE_GENERATOR1))
auto subObjects = VLC->objtypeh->knownSubObjects(Obj::CREATURE_GENERATOR1);
//don't spawn original "neutral" dwellings that got replaced by Conflux dwellings in AB
static int elementalConfluxROE[] = {7, 13, 16, 47};
for (int i = 0; i < 4; i++)
vstd::erase_if_present(subObjects, elementalConfluxROE[i]);
for (auto secondaryID : subObjects)
{
auto dwellingHandler = dynamic_cast<const CDwellingInstanceConstructor*>(VLC->objtypeh->getHandlerFor(Obj::CREATURE_GENERATOR1, secondaryID).get());
auto creatures = dwellingHandler->getProducedCreatures();