XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

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>

218df461
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +21 -0
Modified src/services/questService.ts +21 -0
@@ -216,6 +216,27 @@ const handleQuestCompletion = async (
216 216 setupKahlSyndicate(inventory);
217 217 }
218 218
219 // Whispers in the Walls is unlocked once The New + Heart of Deimos are completed.
220 if (
221 (questKey == "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain" &&
222 inventory.QuestKeys.find(
223 x => x.ItemType == "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain"
224 )?.Completed) ||
225 (questKey == "/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain" &&
226 inventory.QuestKeys.find(x => x.ItemType == "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain")?.Completed)
227 ) {
228 await createMessage(inventory.accountOwnerId, [
229 {
230 sndr: "/Lotus/Language/Bosses/Loid",
231 msg: "/Lotus/Language/EntratiLab/EntratiQuest/WiTWQuestRecievedInboxBody",
232 att: ["/Lotus/Types/Keys/EntratiLab/EntratiQuestKeyChain"],
233 sub: "/Lotus/Language/EntratiLab/EntratiQuest/WiTWQuestRecievedInboxTitle",
234 icon: "/Lotus/Interface/Icons/Npcs/Entrati/Loid.png",
235 highPriority: true
236 }
237 ]);
238 }
239
219 240 const questCompletionItems = getQuestCompletionItems(questKey);
220 241 logger.debug(`quest completion items`, questCompletionItems);
221 242 if (questCompletionItems) {