fix: only refresh rewardSeed at EOM
This commit is contained in:
parent
8f8bc5b364
commit
79bd447255
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user