mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
fix old vcmi format map loading crash
This commit is contained in:
@@ -278,9 +278,9 @@ public:
|
||||
const IGameSettings & getSettings() const;
|
||||
|
||||
void saveCompatibilityStoreAllocatedArtifactID();
|
||||
void parseUidCounter();
|
||||
|
||||
private:
|
||||
void parseUidCounter();
|
||||
|
||||
/// a 3-dimensional array of terrain tiles, access is as follows: x, y, level. where level=1 is underground
|
||||
boost::multi_array<TerrainTile, 3> terrain;
|
||||
|
||||
@@ -1086,7 +1086,7 @@ void CMapLoaderJson::MapObjectLoader::configure()
|
||||
spellID = 0;
|
||||
artID = ArtifactID::SPELL_SCROLL;
|
||||
}
|
||||
else if(art->ID == Obj::ARTIFACT)
|
||||
else if (art->ID == Obj::ARTIFACT || (art->ID >= Obj::RANDOM_ART && art->ID <= Obj::RANDOM_RELIC_ART))
|
||||
{
|
||||
//specific artifact
|
||||
artID = art->getArtifactType();
|
||||
@@ -1132,6 +1132,7 @@ void CMapLoaderJson::readObjects()
|
||||
|
||||
debugHeroesOnMap.insert(hero->getHeroTypeID());
|
||||
}
|
||||
map->parseUidCounter();
|
||||
}
|
||||
|
||||
void CMapLoaderJson::readTranslations()
|
||||
|
||||
Reference in New Issue
Block a user