fix: syndicate initiation
All checks were successful
Build / build (push) Successful in 1m13s
Build / build (pull_request) Successful in 1m9s

Was accidentially broken by 1979b20f8cc00b79f305478f1da3d69f90a3d43e
This commit is contained in:
Sainan 2025-06-12 13:51:16 +02:00
parent 1d813a1b1b
commit d97625f32f

View File

@ -20,8 +20,8 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
const oldLevel = syndicate.Title ?? 0;
const levelIncrease = data.SacrificeLevel - oldLevel;
if (levelIncrease < 1) {
throw new Error(`syndicate sacrifice needs an increase of at least 1`);
if (levelIncrease < 0) {
throw new Error(`syndicate sacrifice can not decrease level`);
}
if (levelIncrease > 1 && !data.AllowMultiple) {
throw new Error(`desired syndicate level is an increase of ${levelIncrease}, max. allowed increase is 1`);
@ -37,7 +37,7 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
// Process sacrifices and rewards for every level we're reaching
const manifest = ExportSyndicates[data.AffiliationTag];
for (let level = oldLevel + 1; level <= data.SacrificeLevel; ++level) {
for (let level = oldLevel + levelIncrease; level <= data.SacrificeLevel; ++level) {
let sacrifice: ISyndicateSacrifice | undefined;
if (level == 0) {
sacrifice = manifest.initiationSacrifice;