fix: classical syndicate medallions don't use daily limit (#818)

This commit is contained in:
Sainan 2025-01-19 12:30:27 +01:00 committed by GitHub
parent 16922279f9
commit f310028e42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,14 +37,16 @@ export const syndicateStandingBonusController: RequestHandler = async (req, res)
if (syndicate.Standing + gainedStanding > max) {
gainedStanding = max - syndicate.Standing;
}
if (gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) {
gainedStanding = getStandingLimit(inventory, syndicateMeta.dailyLimitBin);
if (syndicateMeta.medallionsCappedByDailyLimit) {
if (gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) {
gainedStanding = getStandingLimit(inventory, syndicateMeta.dailyLimitBin);
}
updateStandingLimit(inventory, syndicateMeta.dailyLimitBin, gainedStanding);
}
syndicate.Standing += gainedStanding;
updateStandingLimit(inventory, syndicateMeta.dailyLimitBin, gainedStanding);
await inventory.save();
res.json({