Skip to content

Reset info in character details added#775

Merged
sven-n merged 4 commits into
MUnique:masterfrom
nolt:character-resets-server
May 20, 2026
Merged

Reset info in character details added#775
sven-n merged 4 commits into
MUnique:masterfrom
nolt:character-resets-server

Conversation

@nolt
Copy link
Copy Markdown
Contributor

@nolt nolt commented May 15, 2026

Summary

This PR adds reset info in character details.

mumain_resets

Related issues

sven-n/MuMain#361

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces functionality to track and transmit character reset information within the game server's character details. By updating the network communication layer and packet structures, the server can now reliably send reset data to the client, ensuring that character statistics are correctly synchronized and displayed.

Highlights

  • Character Reset Information: Added support for tracking and displaying character reset counts in the character details.
  • Network Protocol Updates: Updated character information packets (both standard and extended) to include the reset count field.
  • Data Serialization: Modified packet definitions to correctly read and write the new reset count attribute.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces character reset information into the server-to-client communication by adding a 'Resets' property to both standard and extended character information packets. The reviewer noted a type inconsistency where 'Resets' is defined as a ushort in the standard packet but as a uint in the extended version, which could lead to data truncation if reset counts exceed 65,535.

Comment thread src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs Outdated
@itayalroy
Copy link
Copy Markdown
Contributor

I think we should probably make it optional in case OpenMU is configured with resets disabled

Copy link
Copy Markdown
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

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

It looks like you modified the packet code manually. Please adjust the CharacterStatsExtended packet in the ServerToClientPackets.xml file. The code is generated based on this file.
And I think using ushort is enough for the number of resets, too.
See:

<Packet>
<HeaderType>C3HeaderWithSubCode</HeaderType>
<Code>F3</Code>
<SubCode>03</SubCode>
<Name>CharacterInformationExtended</Name>
<Length>96</Length>
<Direction>ServerToClient</Direction>
<SentWhen>After the character was selected by the player and entered the game.</SentWhen>
<CausedReaction>The characters enters the game world.</CausedReaction>
<Fields>
<Field>
<Index>4</Index>
<Type>Byte</Type>
<Name>X</Name>
</Field>
<Field>
<Index>5</Index>
<Type>Byte</Type>
<Name>Y</Name>
</Field>
<Field>
<Index>6</Index>
<Type>ShortLittleEndian</Type>
<Name>MapId</Name>
</Field>
<Field>
<Index>8</Index>
<Type>LongBigEndian</Type>
<Name>CurrentExperience</Name>
</Field>
<Field>
<Index>16</Index>
<Type>LongBigEndian</Type>
<Name>ExperienceForNextLevel</Name>
</Field>
<Field>
<Index>24</Index>
<Type>ShortLittleEndian</Type>
<Name>LevelUpPoints</Name>
</Field>
<Field>
<Index>26</Index>
<Type>ShortLittleEndian</Type>
<Name>Strength</Name>
</Field>
<Field>
<Index>28</Index>
<Type>ShortLittleEndian</Type>
<Name>Agility</Name>
</Field>
<Field>
<Index>30</Index>
<Type>ShortLittleEndian</Type>
<Name>Vitality</Name>
</Field>
<Field>
<Index>32</Index>
<Type>ShortLittleEndian</Type>
<Name>Energy</Name>
</Field>
<Field>
<Index>34</Index>
<Type>ShortLittleEndian</Type>
<Name>Leadership</Name>
</Field>
<Field>
<Index>36</Index>
<Type>IntegerLittleEndian</Type>
<Name>CurrentHealth</Name>
</Field>
<Field>
<Index>40</Index>
<Type>IntegerLittleEndian</Type>
<Name>MaximumHealth</Name>
</Field>
<Field>
<Index>44</Index>
<Type>IntegerLittleEndian</Type>
<Name>CurrentMana</Name>
</Field>
<Field>
<Index>48</Index>
<Type>IntegerLittleEndian</Type>
<Name>MaximumMana</Name>
</Field>
<Field>
<Index>52</Index>
<Type>IntegerLittleEndian</Type>
<Name>CurrentShield</Name>
</Field>
<Field>
<Index>56</Index>
<Type>IntegerLittleEndian</Type>
<Name>MaximumShield</Name>
</Field>
<Field>
<Index>60</Index>
<Type>IntegerLittleEndian</Type>
<Name>CurrentAbility</Name>
</Field>
<Field>
<Index>64</Index>
<Type>IntegerLittleEndian</Type>
<Name>MaximumAbility</Name>
</Field>
<Field>
<Index>68</Index>
<Type>IntegerLittleEndian</Type>
<Name>Money</Name>
</Field>
<Field>
<Index>72</Index>
<Type>Enum</Type>
<TypeName>CharacterHeroState</TypeName>
<Name>HeroState</Name>
</Field>
<Field>
<Index>73</Index>
<Type>Enum</Type>
<TypeName>CharacterStatus</TypeName>
<Name>Status</Name>
</Field>
<Field>
<Index>74</Index>
<Type>ShortLittleEndian</Type>
<Name>UsedFruitPoints</Name>
</Field>
<Field>
<Index>76</Index>
<Type>ShortLittleEndian</Type>
<Name>MaxFruitPoints</Name>
</Field>
<Field>
<Index>78</Index>
<Type>ShortLittleEndian</Type>
<Name>UsedNegativeFruitPoints</Name>
</Field>
<Field>
<Index>80</Index>
<Type>ShortLittleEndian</Type>
<Name>MaxNegativeFruitPoints</Name>
</Field>
<Field>
<Index>82</Index>
<Type>ShortLittleEndian</Type>
<Name>AttackSpeed</Name>
</Field>
<Field>
<Index>84</Index>
<Type>ShortLittleEndian</Type>
<Name>MagicSpeed</Name>
</Field>
<Field>
<Index>86</Index>
<Type>ShortLittleEndian</Type>
<Name>MaximumAttackSpeed</Name>
</Field>
<Field>
<Index>88</Index>
<Type>Byte</Type>
<Name>InventoryExtensions</Name>
</Field>
</Fields>
</Packet>

Comment thread src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs
@nolt
Copy link
Copy Markdown
Contributor Author

nolt commented May 17, 2026

I will made necessary change in ServerToClientPackets.xml + revert to ushort.

@nolt nolt requested a review from sven-n May 19, 2026 09:45
@sven-n sven-n merged commit b108137 into MUnique:master May 20, 2026
2 checks passed
@nolt nolt deleted the character-resets-server branch May 20, 2026 16:46
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.

3 participants