1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fixed CID 1375681

This commit is contained in:
AlexVinS 2017-05-28 15:16:40 +03:00
parent fa6a7bd1b5
commit fc55efb72d

View File

@ -1328,9 +1328,17 @@ void CMapLoaderH3M::readObjects()
CSpecObjInfo * spec = nullptr;
switch(objTempl.id)
{
break; case Obj::RANDOM_DWELLING: spec = new CCreGenLeveledCastleInfo();
break; case Obj::RANDOM_DWELLING_LVL: spec = new CCreGenAsCastleInfo();
break; case Obj::RANDOM_DWELLING_FACTION: spec = new CCreGenLeveledInfo();
case Obj::RANDOM_DWELLING:
spec = new CCreGenLeveledCastleInfo();
break;
case Obj::RANDOM_DWELLING_LVL:
spec = new CCreGenAsCastleInfo();
break;
case Obj::RANDOM_DWELLING_FACTION:
spec = new CCreGenLeveledInfo();
break;
default:
throw std::runtime_error("Invalid random dwelling format");
}
spec->owner = dwelling;