From 143e1f593c443c856dd5b55b154ee2023a5fbb2f Mon Sep 17 00:00:00 2001 From: Sainan Date: Sat, 15 Mar 2025 18:21:25 +0100 Subject: [PATCH] fix: handle high spoofed mastery rank plus noDailyStandingLimits In case the spoofed mastery rank is so high that 999,999 is *less* than the assumed maximum value for daily affiliation bins, we'll just use that so that the bar is always (at least) 100% full. --- src/controllers/api/inventoryController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 40d13d4c..10079ab6 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -246,8 +246,9 @@ export const getInventoryResponse = async ( } if (config.noDailyStandingLimits) { + const spoofedDailyAffiliation = Math.max(999_999, 16000 + inventoryResponse.PlayerLevel * 500); for (const key of allDailyAffiliationKeys) { - inventoryResponse[key] = 999_999; + inventoryResponse[key] = spoofedDailyAffiliation; } }