mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fixed several more cases of incorrect scope for identifiers resolving
This commit is contained in:
		| @@ -1053,7 +1053,7 @@ void CStackBasicDescriptor::serializeJson(JsonSerializeFormat & handler) | ||||
| 		std::string typeName(""); | ||||
| 		handler.serializeString("type", typeName); | ||||
| 		if(!typeName.empty()) | ||||
| 			setType(VLC->creh->getCreature(CModHandler::scopeBuiltin(), typeName)); | ||||
| 			setType(VLC->creh->getCreature(CModHandler::scopeMap(), typeName)); | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -267,7 +267,7 @@ std::vector<bool> CSkillHandler::getDefaultAllowed() const | ||||
|  | ||||
| si32 CSkillHandler::decodeSkill(const std::string & identifier) | ||||
| { | ||||
| 	auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeBuiltin(), "skill", identifier); | ||||
| 	auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeMap(), "skill", identifier); | ||||
| 	if(rawId) | ||||
| 		return rawId.get(); | ||||
| 	else | ||||
|   | ||||
| @@ -1466,7 +1466,7 @@ void CGTownInstance::serializeJsonOptions(JsonSerializeFormat & handler) | ||||
| 	{ | ||||
| 		auto decodeBuilding = [this](const std::string & identifier) -> si32 | ||||
| 		{ | ||||
| 			auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeBuiltin(), getTown()->getBuildingScope(), identifier); | ||||
| 			auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeMap(), getTown()->getBuildingScope(), identifier); | ||||
|  | ||||
| 			if(rawId) | ||||
| 				return rawId.get(); | ||||
|   | ||||
| @@ -1028,7 +1028,7 @@ void CGSeerHut::serializeJsonOptions(JsonSerializeFormat & handler) | ||||
|  | ||||
| 		if(doRequest) | ||||
| 		{ | ||||
| 			auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeBuiltin(), fullIdentifier, false); | ||||
| 			auto rawId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeMap(), fullIdentifier, false); | ||||
|  | ||||
| 			if(rawId) | ||||
| 			{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user