Skip to content

Conversation

@MikhailDeriabin
Copy link
Collaborator

Brief description

Online players now have a status field, which determines what player is doing or where he/she is in the game. The possible values of it are:

  • UI (player just online somewhere in UI)
  • BattleWait (player is waiting for a battle)
  • Battle (player is playing the battle)

Notice that if the status value is not specified in the /online-players/ping POST, the UI value is set by default

Change list

  • Added body with optional field status for /online-players/ping POST endpoint
  • Added status field in return of online-players GET endpoint
  • Refactored RedisService and the use of it in the onlinePlayers module

The class now supports searching for values, which keys has a specific pattern.
Also `getKeys` method is refactored to be more optimized for a large data sets.
@MikhailDeriabin MikhailDeriabin requested a review from PlayJeri as a code owner May 20, 2025 14:57
@MikhailDeriabin MikhailDeriabin enabled auto-merge May 20, 2025 14:57
@MikhailDeriabin MikhailDeriabin added change Change of the existing functionality PR Pull request labels May 20, 2025
@MikhailDeriabin MikhailDeriabin added this to the Battle queue milestone May 20, 2025
@MikhailDeriabin MikhailDeriabin linked an issue May 20, 2025 that may be closed by this pull request
2 tasks
Copy link
Member

@PlayJeri PlayJeri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@MikhailDeriabin MikhailDeriabin merged commit ab1e72d into dev May 20, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Altzone-Server May 20, 2025
@MikhailDeriabin MikhailDeriabin deleted the change/online-players-status-field-560 branch May 20, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change Change of the existing functionality PR Pull request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add status field to online players

3 participants