fix: syndicate rank up from negative levels
All checks were successful
Build / build (push) Successful in 43s
Build / build (pull_request) Successful in 1m30s

For level <= 0, SacrificeLevel is the current level.
This commit is contained in:
Sainan 2025-06-13 14:07:33 +02:00
parent 71d1b6094c
commit 6a26defac6

View File

@ -31,7 +31,7 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
AffiliationTag: data.AffiliationTag, AffiliationTag: data.AffiliationTag,
InventoryChanges: {}, InventoryChanges: {},
Level: data.SacrificeLevel, Level: data.SacrificeLevel,
LevelIncrease: levelIncrease, LevelIncrease: data.SacrificeLevel < 0 ? 1 : levelIncrease,
NewEpisodeReward: false NewEpisodeReward: false
}; };
@ -94,7 +94,7 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
} }
// Commit // Commit
syndicate.Title = data.SacrificeLevel; syndicate.Title = data.SacrificeLevel < 0 ? data.SacrificeLevel + 1 : data.SacrificeLevel;
await inventory.save(); await inventory.save();
response.json(res); response.json(res);