From 55e2a99154c922f49cd7f08c6e46e6c271b911fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Sat, 21 Sep 2024 13:36:51 +0200 Subject: [PATCH] Default object limit to unlimited --- lib/rmg/ObjectConfig.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/rmg/ObjectConfig.cpp b/lib/rmg/ObjectConfig.cpp index 1931becd7..9ea127edf 100644 --- a/lib/rmg/ObjectConfig.cpp +++ b/lib/rmg/ObjectConfig.cpp @@ -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::max(); + } VLC->objtypeh->resolveObjectCompoundId(objectName, + [this, objectValue, objectProbability, objectMaxPerZone](CompoundMapObjectID objid) { ObjectInfo object(objid.primaryID, objid.secondaryID);