Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored stats update #547

Merged
merged 3 commits into from
Dec 8, 2024
Merged

Refactored stats update #547

merged 3 commits into from
Dec 8, 2024

Conversation

sven-n
Copy link
Member

@sven-n sven-n commented Dec 5, 2024

The IUpdateStatsPlugIn (view-plugin) implementations are responsible to inform the client about changes in certain stats like Health, Mana etc.
Previously, only a fixed subset of the available stats were available for updates. Now we support to update all stats - the implementation can decide which stat it wants to send to the client.
Because some messages include more than one stat, and they can change in short amount of time, I implemented a mechanism which sends the update after a short delay of 16 ms. This results in less network messages. Additionally, I removed the periodically sending of the messages, when nothing changed.

The IUpdateStatsPlugIn (view-plugin) implementations are responsible to inform the client about changes in certain stats like Health, Mana etc. Previously, only a fixed subset of the available stats were available for updates. Now we support to update all stats - the implementation can decide which stat it wants to send to the client.
Because some messages include more than one stat, and they can change in short amount of time, I implemented a mechanism which sends the update after a short delay of 16 ms. This results in less network messages.
Additionally, I removed the periodically sending of the messages, when nothing changed.
@sven-n sven-n merged commit 9442bf1 into master Dec 8, 2024
3 checks passed
@sven-n sven-n deleted the dev/refactor-stats-update branch December 8, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant