Skip to content

Commit

Permalink
fix for #538
Browse files Browse the repository at this point in the history
  • Loading branch information
Himyu committed Dec 13, 2023
1 parent cf3649a commit aa2ba9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controller/InGameState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,12 @@ export class InGameState {

private checkLevelUpdate(currentPlayerState: Player, id: number) {
if (this.gameState.player[id] === undefined || currentPlayerState.level <= this.gameState.player[id]?.level) return
if (!this.config.level.includes(currentPlayerState.level.toString())) return

this.gameState.player[id].level = currentPlayerState.level
this.updateState()

if (!this.config.level.includes(currentPlayerState.level.toString())) return

this.ctx.LPTE.emit({
meta: {
type: 'level-update',
Expand Down

0 comments on commit aa2ba9f

Please sign in to comment.