fix: only refresh rewardSeed at EOM
All checks were successful
Build / build (pull_request) Successful in 51s
Build / build (push) Successful in 1m30s

This commit is contained in:
Sainan 2025-05-01 22:58:23 +02:00
parent 8f8bc5b364
commit 79bd447255

View File

@ -63,7 +63,9 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
missionReport.MissionStatus !== "GS_SUCCESS" &&
!(missionReport.RewardInfo?.jobId || missionReport.RewardInfo?.challengeMissionId)
) {
inventory.RewardSeed = generateRewardSeed();
if (missionReport.EndOfMatchUpload) {
inventory.RewardSeed = generateRewardSeed();
}
await inventory.save();
const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
res.json({
@ -82,7 +84,9 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
ConquestCompletedMissionsCount
} = await addMissionRewards(inventory, missionReport, firstCompletion);
inventory.RewardSeed = generateRewardSeed();
if (missionReport.EndOfMatchUpload) {
inventory.RewardSeed = generateRewardSeed();
}
await inventory.save();
const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);