Send transformed players to the open-source client in its extended layout - #997
Merged
sven-n merged 2 commits intoSep 28, 2026
Merged
Conversation
… extended layout The open-source client (106.3) gets its appearance data from AppearanceSerializerExtended, which needs 27 bytes. Transformed players were still sent through AddTransformedCharactersToScope, whose appearance field holds 18 bytes, so WriteAppearanceData threw: nothing was sent, and the exception also dropped every player after it in the same scope update, with their shops and guild info. Players wearing a transformation ring were invisible to that client. - AddTransformedCharacterToScopeExtended (C2 45): one character, followed by the appearance data of the serializer and the effects, as the client's PCREATE_TRANSFORM_EXTENDED reads them. - NewPlayersInScopePlugIn.SendTransformedCharacterAsync is protected virtual; NewPlayersInScopeExtendedPlugIn overrides it. - Tests for both layouts and for players following a transformed one.
…tements Codacy (SonarC# S1121) flags the assignment inside the expression.
This was referenced Sep 28, 2026
alandarev
marked this pull request as ready for review
September 28, 2026 16:18
Member
|
Reviewed and tested. Looks good to merge. Verification (PR head merged locally onto current
Layout check against the client ( Code notes:
As the description says, transformed players only show up once sven-n/MuMain#654 is also merged. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #996.
What
Players wearing a transformation ring were invisible to the open-source client (106.3): the
extended appearance data (27 bytes) was written into the 18-byte appearance field of
AddTransformedCharactersToScope, which threw, so nothing was sent and the rest of the scopeupdate was lost too (details in #996).
AddTransformedCharacterToScopeExtended(C2 45) with one character perpacket, followed by the appearance data of the serializer and the effect ids, like
AddCharacterToScopeExtendeddoes for C2 12. The fields match the client'sPCREATE_TRANSFORM_EXTENDED. Structs,ConnectionExtensions, generated tests and packet docsare regenerated from the XML.
NewPlayersInScopePlugIn.SendTransformedCharacterAsyncis nowprotected virtual(moved before the private method for StyleCop), andNewPlayersInScopeExtendedPlugInoverrides it with the new packet. Older clients keep theexisting packet.
SendCharactersAsyncas two statements;Codacy flags the moved lines with S1121 otherwise.
Client side
The client also needs sven-n/MuMain#654: it required every C2 45 entry to have room for 16
buffs, so it dropped the entries this server sends. With only one of the two fixes, transformed
players stay invisible.
Testing
tests/MUnique.OpenMU.Tests/NewPlayersInScopeRemoteViewTests.cs: the extended layout (readback through the packet struct, and as raw bytes at the client's offsets with and without the
spawn flag and with effects), the standard layout for older clients, and a normal player after a
transformed one in the same update. Four of the five fail on master with the exception above.
MUnique.OpenMU.Network.Packets.Tests608/608,MUnique.OpenMU.Tests1068/1068; the Dockerimage builds without warnings in the changed files.
the open-source client (with the client fix): the skeleton is shown with the character's name,
and the server logs no errors.
docs/Packets/C2-45-AddTransformedCharacterToScopeExtended_by-server.md. The markdown generatorwrites every packet document that way.
Written with AI assistance and tested by hand, per CONTRIBUTING.