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

fix: allow manageQuests' deleteKey op to be used with any ItemType (#1653)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1653 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

1 个文件 +5 -8
Modified src/controllers/custom/manageQuestsController.ts +5 -8
@@ -56,15 +56,12 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
56 56 break;
57 57 }
58 58 case "deleteKey": {
59 if (allQuestKeys.includes(questItemType)) {
60 const questKey = inventory.QuestKeys.find(key => key.ItemType === questItemType);
61 if (!questKey) {
62 logger.error(`Quest key not found in inventory: ${questItemType}`);
63 break;
64 }
65
66 inventory.QuestKeys.pull({ ItemType: questItemType });
59 const questKey = inventory.QuestKeys.find(key => key.ItemType === questItemType);
60 if (!questKey) {
61 logger.error(`Quest key not found in inventory: ${questItemType}`);
62 break;
67 63 }
64 inventory.QuestKeys.pull({ ItemType: questItemType });
68 65 break;
69 66 }
70 67 case "completeKey": {