From 36b7b7c45bec6603b637e3d1def8eacf7f963b3b Mon Sep 17 00:00:00 2001 From: xangelo Date: Fri, 1 Sep 2023 13:43:03 -0400 Subject: [PATCH] fix: skills not progressing with use --- src/server/skills.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/skills.ts b/src/server/skills.ts index 80a6405..17ef69c 100644 --- a/src/server/skills.ts +++ b/src/server/skills.ts @@ -21,7 +21,6 @@ export async function getPlayerSkillsAsObject(playerId: string): Promise, skillExpDiff: Record) { - const sql = []; each(skillExpDiff, (val, skillId: SkillID) => { const skill = playerSkills.get(skillId); @@ -31,8 +30,8 @@ export async function updatePlayerSkills(playerId: string, playerSkills:Map= def.expToLevel(skill.level + 1)) { skill.level++; skill.exp -= def.expToLevel(skill.level); - sql.push(`update player_skills set exp = ${skill.exp}, level = ${skill.level} where id = '${skillId}' and player_id = '${playerId}'`); } + sql.push(`update player_skills set exp = ${skill.exp}, level = ${skill.level} where id = '${skillId}' and player_id = '${playerId}'`); } }); -- 2.25.1