Przeglądaj źródła

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

Ivan Savenko 2 lat temu
rodzic
commit
560a1231a6
2 zmienionych plików z 1 dodań i 4 usunięć
  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