fix: allow manageQuests' deleteKey op to be used with any ItemType
This commit is contained in:
parent
28d7ca8ca0
commit
54a345edae
@ -56,15 +56,12 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
break;
|
||||
}
|
||||
case "deleteKey": {
|
||||
if (allQuestKeys.includes(questItemType)) {
|
||||
const questKey = inventory.QuestKeys.find(key => key.ItemType === questItemType);
|
||||
if (!questKey) {
|
||||
logger.error(`Quest key not found in inventory: ${questItemType}`);
|
||||
break;
|
||||
}
|
||||
|
||||
inventory.QuestKeys.pull({ ItemType: questItemType });
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "completeKey": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user