From: xangelo Date: Fri, 1 Sep 2023 17:43:03 +0000 (-0400) Subject: fix: skills not progressing with use X-Git-Tag: v0.3.2~1 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=36b7b7c45bec6603b637e3d1def8eacf7f963b3b;p=risinglegends.git fix: skills not progressing with use --- 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}'`); } });