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

This commit is contained in:
Ivan Savenko committed 2023-11-27 14:08:49 +02:00
1 parent 60ca6f968c
commit 560a1231a6
2 files changed
+1 -4

No files matched your search

-3
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;
+1 -1
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