wtf
All checks were successful
Build / build (20) (push) Successful in 36s
Build / build (22) (push) Successful in 1m1s
Build / build (18) (push) Successful in 1m6s
Build / build (18) (pull_request) Successful in 38s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 1m2s
All checks were successful
Build / build (20) (push) Successful in 36s
Build / build (22) (push) Successful in 1m1s
Build / build (18) (push) Successful in 1m6s
Build / build (18) (pull_request) Successful in 38s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 1m2s
This commit is contained in:
parent
a9b54f8781
commit
ef416f0e43
@ -14,7 +14,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
| "ResetAll"
|
||||
| "completeAllUnlocked"
|
||||
| "updateKey"
|
||||
| "giveAllQuests";
|
||||
| "giveAll";
|
||||
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
|
||||
|
||||
const allQuestKeys: string[] = [];
|
||||
@ -72,6 +72,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
for (const questKey of inventory.QuestKeys) {
|
||||
questKey.Completed = false;
|
||||
questKey.Progress = [];
|
||||
questKey.CompletionDate = undefined;
|
||||
}
|
||||
inventory.ActiveQuest = "";
|
||||
break;
|
||||
@ -79,7 +80,6 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
case "completeAllUnlocked": {
|
||||
logger.info("completing all unlocked quests..");
|
||||
for (const questKey of inventory.QuestKeys) {
|
||||
console.log("size of questkeys", inventory.QuestKeys.length);
|
||||
try {
|
||||
await completeQuest(inventory, questKey.ItemType);
|
||||
} catch (error) {
|
||||
@ -106,7 +106,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
||||
inventory.ActiveQuest = "";
|
||||
break;
|
||||
}
|
||||
case "giveAllQuests": {
|
||||
case "giveAll": {
|
||||
for (const questKey of allQuestKeys) {
|
||||
addQuestKey(inventory, { ItemType: questKey });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user