mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Default object limit to unlimited
This commit is contained in:
		| @@ -145,9 +145,15 @@ void ObjectConfig::serializeJson(JsonSerializeFormat & handler) | ||||
| 			// TODO: Use common code with default rmg config | ||||
| 			auto objectValue = rmg["value"].Integer(); | ||||
| 			auto objectProbability = rmg["rarity"].Integer(); | ||||
|  | ||||
| 			auto objectMaxPerZone = rmg["zoneLimit"].Integer(); | ||||
| 			if (objectMaxPerZone == 0) | ||||
| 			{ | ||||
| 				objectMaxPerZone = std::numeric_limits<int>::max(); | ||||
| 			} | ||||
|  | ||||
| 			VLC->objtypeh->resolveObjectCompoundId(objectName, | ||||
|  | ||||
| 				[this, objectValue, objectProbability, objectMaxPerZone](CompoundMapObjectID objid) | ||||
| 				{ | ||||
| 					ObjectInfo object(objid.primaryID, objid.secondaryID); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user