fix
All checks were successful
Build / build (18) (push) Successful in 37s
Build / build (22) (push) Successful in 1m15s
Build / build (18) (pull_request) Successful in 35s
Build / build (20) (push) Successful in 57s
Build / build (20) (pull_request) Successful in 56s
Build / build (22) (pull_request) Successful in 1m14s
All checks were successful
Build / build (18) (push) Successful in 37s
Build / build (22) (push) Successful in 1m15s
Build / build (18) (pull_request) Successful in 35s
Build / build (20) (push) Successful in 57s
Build / build (20) (pull_request) Successful in 56s
Build / build (22) (pull_request) Successful in 1m14s
This commit is contained in:
parent
229910cf2a
commit
59ad58a968
@ -39,7 +39,16 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
case "completeAll": {
|
||||
logger.info("completing all quests..");
|
||||
for (const questKey of allQuestKeys) {
|
||||
await completeQuest(inventory, questKey);
|
||||
try {
|
||||
await completeQuest(inventory, questKey);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
logger.error(
|
||||
`Something went wrong completing quest ${questKey}, probably could not add some item`
|
||||
);
|
||||
logger.error(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
//Skip "Watch The Maker"
|
||||
if (questKey === "/Lotus/Types/Keys/NewWarIntroQuest/NewWarIntroKeyChain") {
|
||||
@ -70,7 +79,16 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
logger.info("completing all unlocked quests..");
|
||||
for (const questKey of inventory.QuestKeys) {
|
||||
console.log("size of questkeys", inventory.QuestKeys.length);
|
||||
await completeQuest(inventory, questKey.ItemType);
|
||||
try {
|
||||
await completeQuest(inventory, questKey.ItemType);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
logger.error(
|
||||
`Something went wrong completing quest ${questKey.ItemType}, probably could not add some item`
|
||||
);
|
||||
logger.error(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
//Skip "Watch The Maker"
|
||||
if (questKey.ItemType === "/Lotus/Types/Keys/NewWarIntroQuest/NewWarIntroKeyChain") {
|
||||
|
@ -367,7 +367,7 @@ export const addItem = async (
|
||||
};
|
||||
}
|
||||
if (typeName in ExportKeys) {
|
||||
// Note: "/Lotus/Types/Keys/" contains some EmailItems and ShipFeatureItems
|
||||
// Note: "/Lotus/Types/Keys/" contains some EmailItems
|
||||
inventory.QuestKeys.push({ ItemType: typeName });
|
||||
return {
|
||||
InventoryChanges: {
|
||||
@ -519,9 +519,7 @@ export const addItem = async (
|
||||
}
|
||||
break;
|
||||
}
|
||||
const errorMessage = `unable to add item: ${typeName}`;
|
||||
logger.error(errorMessage);
|
||||
return { InventoryChanges: { Error: [{ Error: errorMessage }] } };
|
||||
throw new Error(`unable to add item: ${typeName}`);
|
||||
};
|
||||
|
||||
export const addItems = async (
|
||||
|
Loading…
x
Reference in New Issue
Block a user