WIP: fix: avoid pushing to quest progress in updateQuestStage #2847

Closed
Sainan wants to merge 7 commits from quest-fix into main
Showing only changes of commit f097b28e68 - Show all commits

View File

@ -329,6 +329,7 @@ export const giveKeyChainMessage = async (
keyChainInfo: IKeyChainRequest,
questKey: IQuestKeyDatabase
): Promise<void> => {
if (!questKey.Progress?.[keyChainInfo.ChainStage - 1]?.m) {
const keyChainMessage = getKeyChainMessage(keyChainInfo);
if ((questKey.Progress?.[0]?.c ?? 0) > 0) {
@ -339,6 +340,7 @@ export const giveKeyChainMessage = async (
await createMessage(inventory.accountOwnerId, [keyChainMessage]);
updateQuestStage(inventory, keyChainInfo, { m: true });
}
};
export const giveKeyChainMissionReward = async (