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"
|
| "ResetAll"
|
||||||
| "completeAllUnlocked"
|
| "completeAllUnlocked"
|
||||||
| "updateKey"
|
| "updateKey"
|
||||||
| "giveAllQuests";
|
| "giveAll";
|
||||||
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
|
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
|
||||||
|
|
||||||
const allQuestKeys: string[] = [];
|
const allQuestKeys: string[] = [];
|
||||||
@ -72,6 +72,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
for (const questKey of inventory.QuestKeys) {
|
for (const questKey of inventory.QuestKeys) {
|
||||||
questKey.Completed = false;
|
questKey.Completed = false;
|
||||||
questKey.Progress = [];
|
questKey.Progress = [];
|
||||||
|
questKey.CompletionDate = undefined;
|
||||||
}
|
}
|
||||||
inventory.ActiveQuest = "";
|
inventory.ActiveQuest = "";
|
||||||
break;
|
break;
|
||||||
@ -79,7 +80,6 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
case "completeAllUnlocked": {
|
case "completeAllUnlocked": {
|
||||||
logger.info("completing all unlocked quests..");
|
logger.info("completing all unlocked quests..");
|
||||||
for (const questKey of inventory.QuestKeys) {
|
for (const questKey of inventory.QuestKeys) {
|
||||||
console.log("size of questkeys", inventory.QuestKeys.length);
|
|
||||||
try {
|
try {
|
||||||
await completeQuest(inventory, questKey.ItemType);
|
await completeQuest(inventory, questKey.ItemType);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -106,7 +106,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
inventory.ActiveQuest = "";
|
inventory.ActiveQuest = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "giveAllQuests": {
|
case "giveAll": {
|
||||||
for (const questKey of allQuestKeys) {
|
for (const questKey of allQuestKeys) {
|
||||||
addQuestKey(inventory, { ItemType: questKey });
|
addQuestKey(inventory, { ItemType: questKey });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user