forked from OpenWF/SpaceNinjaServer
fix: only refresh rewardSeed at EOM (#1957)
Fixes #1953 Reviewed-on: OpenWF/SpaceNinjaServer#1957 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
562ddd513f
commit
4926b2f2be
@ -63,7 +63,9 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
|
||||
missionReport.MissionStatus !== "GS_SUCCESS" &&
|
||||
!(missionReport.RewardInfo?.jobId || missionReport.RewardInfo?.challengeMissionId)
|
||||
) {
|
||||
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);
|
||||
|
||||
if (missionReport.EndOfMatchUpload) {
|
||||
inventory.RewardSeed = generateRewardSeed();
|
||||
}
|
||||
await inventory.save();
|
||||
const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user