Home
/
risinglegends.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d44dcff
)
fix: empty skills usage causes fights to freeze
author
xangelo
<git@xangelo.ca>
Wed, 14 Jun 2023 08:08:47 +0000
(
04:08
-0400)
committer
xangelo
<git@xangelo.ca>
Wed, 14 Jun 2023 08:08:47 +0000
(
04:08
-0400)
src/server/skills.ts
patch
|
blob
|
history
diff --git
a/src/server/skills.ts
b/src/server/skills.ts
index 59d507508cdcab4c4990f15a3eff74883af52a7f..131c1415bd2f553a774e92117b121f77a65d99c4 100644
(file)
--- a/
src/server/skills.ts
+++ b/
src/server/skills.ts
@@
-27,5
+27,8
@@
export async function updatePlayerSkills(playerId: string, skills: Record<SkillI
sql.push(`update player_skills set exp = exp + ${val} where id = '${skillId}' and player_id = '${playerId}'`);
});
- await db.raw(sql.join(';'));
+ if(sql.length) {
+ await db.raw(sql.join(';'));
+ }
+
}