1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix loading of maps with Grail or Diplomat Suit placed on map

This commit is contained in:
Ivan Savenko 2023-11-26 18:54:45 +02:00
parent 60ca6f968c
commit 560a1231a6
2 changed files with 1 additions and 4 deletions

View File

@ -474,9 +474,6 @@ CArtifact * CArtHandler::loadFromJson(const std::string & scope, const JsonNode
// Necessary for objects added via mods that don't have any templates in H3
VLC->objtypeh->getHandlerFor(Obj::ARTIFACT, art->getIndex())->addTemplate(templ);
}
// object does not have any templates - this is not usable object (e.g. pseudo-art like lock)
if(VLC->objtypeh->getHandlerFor(Obj::ARTIFACT, art->getIndex())->getTemplates().empty())
VLC->objtypeh->removeSubObject(Obj::ARTIFACT, art->getIndex());
});
return art;

View File

@ -97,7 +97,7 @@ MapFormatFeaturesH3M MapFormatFeaturesH3M::getFeaturesSOD()
MapFormatFeaturesH3M result = getFeaturesAB();
result.levelSOD = true;
result.artifactsCount = 141; // + Combined artifacts
result.artifactsCount = 144; // + Combined artifacts + 3 unfinished artifacts (required for some maps)
result.artifactsBytes = 18;
result.heroesPortraitsCount = 163; // +Finneas +young Gem +young Sandro +young Yog