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