From 94bb4302bb3f2202de0f227fcde1f9041e1ba842 Mon Sep 17 00:00:00 2001 From: xangelo Date: Fri, 29 Sep 2023 14:32:18 -0400 Subject: [PATCH] fix: count current dungeon run Dungeon completion was triggered after the count of number of runs instead of before allowing users to get 1 extra run in. --- src/server/locations/dungeon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/locations/dungeon.ts b/src/server/locations/dungeon.ts index 26f7460..2b45096 100644 --- a/src/server/locations/dungeon.ts +++ b/src/server/locations/dungeon.ts @@ -161,6 +161,7 @@ router.post('/city/dungeon/:dungeon_id/complete', authEndpoint, async (req, res) }); } + await completeDungeon(req.player.id); // if this is not the first completion, lets give them diminishing returns const completionsToday = await getEventHistoryToday(req.player.id, 'DUNGEON_COMPLETE'); @@ -179,7 +180,6 @@ router.post('/city/dungeon/:dungeon_id/complete', authEndpoint, async (req, res) } // delete the tracking for this dungeon-run - await completeDungeon(req.player.id); await updatePlayer(req.player); res.send(dungeonRewards(dungeon, rewards, completionsToday.length)); -- 2.25.1