fix: handle high spoofed mastery rank plus noDailyStandingLimits (#1201)
Some checks failed
Build / build (22) (push) Waiting to run
Build Docker image / docker (push) Waiting to run
Build / build (18) (push) Has been cancelled
Build / build (20) (push) Has been cancelled

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.

Reviewed-on: #1201
This commit is contained in:
Sainan 2025-03-16 04:33:12 -07:00
parent ecc2e35535
commit b7f05e851c

View File

@ -246,8 +246,9 @@ export const getInventoryResponse = async (
} }
if (config.noDailyStandingLimits) { if (config.noDailyStandingLimits) {
const spoofedDailyAffiliation = Math.max(999_999, 16000 + inventoryResponse.PlayerLevel * 500);
for (const key of allDailyAffiliationKeys) { for (const key of allDailyAffiliationKeys) {
inventoryResponse[key] = 999_999; inventoryResponse[key] = spoofedDailyAffiliation;
} }
} }