From f65d1b9d18ef49d93513f64d67aad6119c17d59d Mon Sep 17 00:00:00 2001 From: Mygod Date: Wed, 28 Feb 2024 22:24:31 -0500 Subject: [PATCH] fix: no more hard limits for pois - fixes #956 - i'm so nice --- server/src/services/DbCheck.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/src/services/DbCheck.js b/server/src/services/DbCheck.js index 8ef2d777b..9b2fd680e 100644 --- a/server/src/services/DbCheck.js +++ b/server/src/services/DbCheck.js @@ -441,7 +441,21 @@ module.exports = class DbCheck { let deDuped = [] let count = 0 let distance = softLimit - const max = model === 'Pokemon' ? hardLimit / 2 : hardLimit + let max = hardLimit + switch (model) { + case 'Pokemon': + max = hardLimit / 2 + break + case 'Gym': + case 'Nest': + case 'Pokestop': + case 'Portal': + case 'Route': + max = Infinity + break + default: + break + } const startTime = Date.now() while (deDuped.length < this.searchLimit) { const loopTime = Date.now()