1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Moved DwellingInstanceConstructor to a new file

This commit is contained in:
Ivan Savenko
2023-06-08 17:29:29 +03:00
parent 77b58bc66d
commit 58661fc8ec
9 changed files with 204 additions and 160 deletions

View File

@@ -22,7 +22,7 @@
#include "../../ArtifactUtils.h"
#include "../../mapObjectConstructors/AObjectTypeHandler.h"
#include "../../mapObjectConstructors/CObjectClassesHandler.h"
#include "../../mapObjectConstructors/CommonConstructors.h"
#include "../../mapObjectConstructors/DwellingInstanceConstructor.h"
#include "../../mapObjects/CGHeroInstance.h"
#include "../../mapObjects/CGPandoraBox.h"
#include "../../CCreatureHandler.h"
@@ -172,7 +172,7 @@ void TreasurePlacer::addAllPossibleObjects()
for(auto secondaryID : subObjects)
{
const auto * dwellingHandler = dynamic_cast<const CDwellingInstanceConstructor *>(VLC->objtypeh->getHandlerFor(dwellingType, secondaryID).get());
const auto * dwellingHandler = dynamic_cast<const DwellingInstanceConstructor *>(VLC->objtypeh->getHandlerFor(dwellingType, secondaryID).get());
auto creatures = dwellingHandler->getProducedCreatures();
if(creatures.empty())
continue;