瀏覽代碼

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

Ivan Savenko 2 年之前
父節點
當前提交
560a1231a6
共有 2 個文件被更改,包括 1 次插入4 次删除
  1. 0 3
      lib/CArtHandler.cpp
  2. 1 1
      lib/mapping/MapFeaturesH3M.cpp

+ 0 - 3
lib/CArtHandler.cpp

@@ -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
lib/mapping/MapFeaturesH3M.cpp

@@ -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