From 218df461e1e29e1345642fc75a205dfbeb10606a Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:10:45 -0700 Subject: [PATCH] feat: send WiTW email when completing The New War or Heart of Deimos (#1749) At completion of either of the quests, check if the other has been completed, and if so, unlock WiTW. Closes #1748 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1749 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/questService.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/services/questService.ts b/src/services/questService.ts index 85cefa4b..d5ac28dc 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -216,6 +216,27 @@ const handleQuestCompletion = async ( setupKahlSyndicate(inventory); } + // Whispers in the Walls is unlocked once The New + Heart of Deimos are completed. + if ( + (questKey == "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain" && + inventory.QuestKeys.find( + x => x.ItemType == "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain" + )?.Completed) || + (questKey == "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain" && + inventory.QuestKeys.find(x => x.ItemType == "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain")?.Completed) + ) { + await createMessage(inventory.accountOwnerId, [ + { + sndr: "/Lotus/Language/Bosses/Loid", + msg: "/Lotus/Language/EntratiLab/EntratiQuest/WiTWQuestRecievedInboxBody", + att: ["/Lotus/Types/Keys/EntratiLab/EntratiQuestKeyChain"], + sub: "/Lotus/Language/EntratiLab/EntratiQuest/WiTWQuestRecievedInboxTitle", + icon: "/Lotus/Interface/Icons/Npcs/Entrati/Loid.png", + highPriority: true + } + ]); + } + const questCompletionItems = getQuestCompletionItems(questKey); logger.debug(`quest completion items`, questCompletionItems); if (questCompletionItems) {