From 3c68070493f607413cd2611c4b11e43691a7cdff Mon Sep 17 00:00:00 2001 From: nolt Date: Fri, 15 May 2026 12:03:43 +0000 Subject: [PATCH 1/4] reset info in character details --- .../UpdateCharacterStatsExtendedPlugIn.cs | 3 ++- .../Character/UpdateCharacterStatsPlugIn.cs | 3 ++- .../ServerToClient/ConnectionExtensions.cs | 6 ++++-- .../ServerToClient/ServerToClientPacketsRef.cs | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs index 346de1d2f..cdb8dfd61 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs @@ -69,7 +69,8 @@ await connection.SendCharacterInformationExtendedAsync( (ushort)this._player.Attributes[Stats.AttackSpeed], (ushort)this._player.Attributes[Stats.MagicSpeed], (ushort)maxAttackSpeed, - (byte)this._player.SelectedCharacter.InventoryExtensions) + (byte)this._player.SelectedCharacter.InventoryExtensions, + (uint)this._player.Attributes[Stats.Resets]) .ConfigureAwait(false); if (this._player.SelectedCharacter.CharacterClass!.IsMasterClass) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs index 8048900f1..6be97b865 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs @@ -65,7 +65,8 @@ await connection.SendCharacterInformationAsync( (ushort)this._player.Attributes[Stats.BaseLeadership], (ushort)this._player.SelectedCharacter.UsedNegFruitPoints, this._player.SelectedCharacter.GetMaximumFruitPoints(), - (byte)this._player.SelectedCharacter.InventoryExtensions) + (byte)this._player.SelectedCharacter.InventoryExtensions, + (ushort)this._player.Attributes[Stats.Resets]) .ConfigureAwait(false); if (this._player.SelectedCharacter.CharacterClass!.IsMasterClass) diff --git a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs index df5bd00e6..b5be92300 100644 --- a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs +++ b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs @@ -3260,7 +3260,7 @@ int WritePacket() /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. /// - public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions) + public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions, ushort @resets) { if (connection is null) { @@ -3298,6 +3298,7 @@ int WritePacket() packet.UsedNegativeFruitPoints = @usedNegativeFruitPoints; packet.MaxNegativeFruitPoints = @maxNegativeFruitPoints; packet.InventoryExtensions = @inventoryExtensions; + packet.Resets = @resets; return packet.Header.Length; } @@ -3389,7 +3390,7 @@ int WritePacket() /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. /// - public static async ValueTask SendCharacterInformationExtendedAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @leadership, uint @currentHealth, uint @maximumHealth, uint @currentMana, uint @maximumMana, uint @currentShield, uint @maximumShield, uint @currentAbility, uint @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, ushort @attackSpeed, ushort @magicSpeed, ushort @maximumAttackSpeed, byte @inventoryExtensions) + public static async ValueTask SendCharacterInformationExtendedAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @leadership, uint @currentHealth, uint @maximumHealth, uint @currentMana, uint @maximumMana, uint @currentShield, uint @maximumShield, uint @currentAbility, uint @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, ushort @attackSpeed, ushort @magicSpeed, ushort @maximumAttackSpeed, byte @inventoryExtensions, uint @resets) { if (connection is null) { @@ -3430,6 +3431,7 @@ int WritePacket() packet.MagicSpeed = @magicSpeed; packet.MaximumAttackSpeed = @maximumAttackSpeed; packet.InventoryExtensions = @inventoryExtensions; + packet.Resets = @resets; return packet.Header.Length; } diff --git a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs index 34e33aa2e..1c597fe1c 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs +++ b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs @@ -16052,6 +16052,15 @@ public byte InventoryExtensions set => this._data[68] = value; } + /// + /// Gets or sets the resets. + /// + public ushort Resets + { + get => ReadUInt16LittleEndian(this._data[69..]); + set => WriteUInt16LittleEndian(this._data[69..], value); + } + /// /// Performs an implicit conversion from a Span of bytes to a . /// @@ -16566,6 +16575,15 @@ public byte InventoryExtensions set => this._data[88] = value; } + /// + /// Gets or sets the resets. + /// + public uint Resets + { + get => ReadUInt32LittleEndian(this._data[89..]); + set => WriteUInt32LittleEndian(this._data[89..], value); + } + /// /// Performs an implicit conversion from a Span of bytes to a . /// From 028cac71299f343d3533a2be1153c6bc004a189d Mon Sep 17 00:00:00 2001 From: nolt Date: Fri, 15 May 2026 13:01:09 +0000 Subject: [PATCH 2/4] changed ushort to uint --- .../RemoteView/Character/UpdateCharacterStatsPlugIn.cs | 2 +- .../Packets/ServerToClient/ConnectionExtensions.cs | 2 +- .../Packets/ServerToClient/ServerToClientPacketsRef.cs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs index 6be97b865..768dbfc76 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs @@ -66,7 +66,7 @@ await connection.SendCharacterInformationAsync( (ushort)this._player.SelectedCharacter.UsedNegFruitPoints, this._player.SelectedCharacter.GetMaximumFruitPoints(), (byte)this._player.SelectedCharacter.InventoryExtensions, - (ushort)this._player.Attributes[Stats.Resets]) + (uint)this._player.Attributes[Stats.Resets]) .ConfigureAwait(false); if (this._player.SelectedCharacter.CharacterClass!.IsMasterClass) diff --git a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs index b5be92300..f968c80ce 100644 --- a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs +++ b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs @@ -3260,7 +3260,7 @@ int WritePacket() /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. /// - public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions, ushort @resets) + public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions, uint @resets) { if (connection is null) { diff --git a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs index 1c597fe1c..ae5550abc 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs +++ b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs @@ -15802,7 +15802,7 @@ private CharacterInformationRef(Span data, bool initialize) /// /// Gets the initial length of this data packet. When the size is dynamic, this value may be bigger than actually needed. /// - public static int Length => 72; + public static int Length => 73; /// /// Gets the header of this packet. @@ -16055,10 +16055,10 @@ public byte InventoryExtensions /// /// Gets or sets the resets. /// - public ushort Resets + public uint Resets { - get => ReadUInt16LittleEndian(this._data[69..]); - set => WriteUInt16LittleEndian(this._data[69..], value); + get => ReadUInt32LittleEndian(this._data[69..]); + set => WriteUInt32LittleEndian(this._data[69..], value); } /// From f017e439e134bd683389400ee8024f7cf28b3127 Mon Sep 17 00:00:00 2001 From: nolt Date: Sun, 17 May 2026 19:56:41 +0200 Subject: [PATCH 3/4] revert uint to ushort and ServerToClientPackets --- .../UpdateCharacterStatsExtendedPlugIn.cs | 2 +- .../Character/UpdateCharacterStatsPlugIn.cs | 3 +-- .../ServerToClient/ConnectionExtensions.cs | 5 ++--- .../ServerToClient/ServerToClientPackets.xml | 5 +++++ .../ServerToClient/ServerToClientPacketsRef.cs | 17 ++++------------- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs index cdb8dfd61..dce9a6331 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs @@ -70,7 +70,7 @@ await connection.SendCharacterInformationExtendedAsync( (ushort)this._player.Attributes[Stats.MagicSpeed], (ushort)maxAttackSpeed, (byte)this._player.SelectedCharacter.InventoryExtensions, - (uint)this._player.Attributes[Stats.Resets]) + (ushort)this._player.Attributes[Stats.Resets]) .ConfigureAwait(false); if (this._player.SelectedCharacter.CharacterClass!.IsMasterClass) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs index 768dbfc76..8048900f1 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsPlugIn.cs @@ -65,8 +65,7 @@ await connection.SendCharacterInformationAsync( (ushort)this._player.Attributes[Stats.BaseLeadership], (ushort)this._player.SelectedCharacter.UsedNegFruitPoints, this._player.SelectedCharacter.GetMaximumFruitPoints(), - (byte)this._player.SelectedCharacter.InventoryExtensions, - (uint)this._player.Attributes[Stats.Resets]) + (byte)this._player.SelectedCharacter.InventoryExtensions) .ConfigureAwait(false); if (this._player.SelectedCharacter.CharacterClass!.IsMasterClass) diff --git a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs index f968c80ce..647744728 100644 --- a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs +++ b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs @@ -3260,7 +3260,7 @@ int WritePacket() /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. /// - public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions, uint @resets) + public static async ValueTask SendCharacterInformationAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @currentHealth, ushort @maximumHealth, ushort @currentMana, ushort @maximumMana, ushort @currentShield, ushort @maximumShield, ushort @currentAbility, ushort @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @leadership, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, byte @inventoryExtensions) { if (connection is null) { @@ -3298,7 +3298,6 @@ int WritePacket() packet.UsedNegativeFruitPoints = @usedNegativeFruitPoints; packet.MaxNegativeFruitPoints = @maxNegativeFruitPoints; packet.InventoryExtensions = @inventoryExtensions; - packet.Resets = @resets; return packet.Header.Length; } @@ -3390,7 +3389,7 @@ int WritePacket() /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. /// - public static async ValueTask SendCharacterInformationExtendedAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @leadership, uint @currentHealth, uint @maximumHealth, uint @currentMana, uint @maximumMana, uint @currentShield, uint @maximumShield, uint @currentAbility, uint @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, ushort @attackSpeed, ushort @magicSpeed, ushort @maximumAttackSpeed, byte @inventoryExtensions, uint @resets) + public static async ValueTask SendCharacterInformationExtendedAsync(this IConnection? connection, byte @x, byte @y, ushort @mapId, ulong @currentExperience, ulong @experienceForNextLevel, ushort @levelUpPoints, ushort @strength, ushort @agility, ushort @vitality, ushort @energy, ushort @leadership, uint @currentHealth, uint @maximumHealth, uint @currentMana, uint @maximumMana, uint @currentShield, uint @maximumShield, uint @currentAbility, uint @maximumAbility, uint @money, CharacterHeroState @heroState, CharacterStatus @status, ushort @usedFruitPoints, ushort @maxFruitPoints, ushort @usedNegativeFruitPoints, ushort @maxNegativeFruitPoints, ushort @attackSpeed, ushort @magicSpeed, ushort @maximumAttackSpeed, byte @inventoryExtensions, ushort @resets) { if (connection is null) { diff --git a/src/Network/Packets/ServerToClient/ServerToClientPackets.xml b/src/Network/Packets/ServerToClient/ServerToClientPackets.xml index 23880ef22..914edc392 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPackets.xml +++ b/src/Network/Packets/ServerToClient/ServerToClientPackets.xml @@ -6479,6 +6479,11 @@ Byte InventoryExtensions + + 89 + ShortLittleEndian + Resets + diff --git a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs index ae5550abc..f802bfdf9 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs +++ b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs @@ -15802,7 +15802,7 @@ private CharacterInformationRef(Span data, bool initialize) /// /// Gets the initial length of this data packet. When the size is dynamic, this value may be bigger than actually needed. /// - public static int Length => 73; + public static int Length => 72; /// /// Gets the header of this packet. @@ -16052,15 +16052,6 @@ public byte InventoryExtensions set => this._data[68] = value; } - /// - /// Gets or sets the resets. - /// - public uint Resets - { - get => ReadUInt32LittleEndian(this._data[69..]); - set => WriteUInt32LittleEndian(this._data[69..], value); - } - /// /// Performs an implicit conversion from a Span of bytes to a . /// @@ -16578,10 +16569,10 @@ public byte InventoryExtensions /// /// Gets or sets the resets. /// - public uint Resets + public ushort Resets { - get => ReadUInt32LittleEndian(this._data[89..]); - set => WriteUInt32LittleEndian(this._data[89..], value); + get => ReadUInt16LittleEndian(this._data[89..]); + set => WriteUInt16LittleEndian(this._data[89..], value); } /// From b2627efffce5ae75f2baecd481aa1192ea533deb Mon Sep 17 00:00:00 2001 From: sven-n Date: Tue, 19 May 2026 22:10:27 +0200 Subject: [PATCH 4/4] Auto generated packet code --- ...C3-F3-03-CharacterInformationExtended_by-server.md | 3 ++- .../Packets/ServerToClient/ConnectionExtensions.cs | 1 + .../Packets/ServerToClient/ServerToClientPackets.cs | 11 ++++++++++- .../Packets/ServerToClient/ServerToClientPackets.xml | 5 +++-- .../ServerToClient/ServerToClientPacketsRef.cs | 6 +++--- .../ServerToClientPacketTests.cs | 6 +++++- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/Packets/C3-F3-03-CharacterInformationExtended_by-server.md b/docs/Packets/C3-F3-03-CharacterInformationExtended_by-server.md index af4ababc7..d2a263db0 100644 --- a/docs/Packets/C3-F3-03-CharacterInformationExtended_by-server.md +++ b/docs/Packets/C3-F3-03-CharacterInformationExtended_by-server.md @@ -13,7 +13,7 @@ The characters enters the game world. | Index | Length | Data Type | Value | Description | |-------|--------|-----------|-------|-------------| | 0 | 1 | Byte | 0xC3 | [Packet type](PacketTypes.md) | -| 1 | 1 | Byte | 96 | Packet header - length of the packet | +| 1 | 1 | Byte | 92 | Packet header - length of the packet | | 2 | 1 | Byte | 0xF3 | Packet header - packet type identifier | | 3 | 1 | Byte | 0x03 | Packet header - sub packet type identifier | | 4 | 1 | Byte | | X | @@ -46,6 +46,7 @@ The characters enters the game world. | 84 | 2 | ShortLittleEndian | | MagicSpeed | | 86 | 2 | ShortLittleEndian | | MaximumAttackSpeed | | 88 | 1 | Byte | | InventoryExtensions | +| 90 | 2 | ShortLittleEndian | | Resets | ### CharacterHeroState Enum diff --git a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs index 647744728..c953fa6cb 100644 --- a/src/Network/Packets/ServerToClient/ConnectionExtensions.cs +++ b/src/Network/Packets/ServerToClient/ConnectionExtensions.cs @@ -3385,6 +3385,7 @@ int WritePacket() /// The magic speed. /// The maximum attack speed. /// The inventory extensions. + /// The resets. /// /// Is sent by the server when: After the character was selected by the player and entered the game. /// Causes reaction on client side: The characters enters the game world. diff --git a/src/Network/Packets/ServerToClient/ServerToClientPackets.cs b/src/Network/Packets/ServerToClient/ServerToClientPackets.cs index 5963596c2..a179ce06d 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPackets.cs +++ b/src/Network/Packets/ServerToClient/ServerToClientPackets.cs @@ -17141,7 +17141,7 @@ private CharacterInformationExtended(Memory data, bool initialize) /// /// Gets the initial length of this data packet. When the size is dynamic, this value may be bigger than actually needed. /// - public static int Length => 96; + public static int Length => 92; /// /// Gets the header of this packet. @@ -17418,6 +17418,15 @@ public byte InventoryExtensions set => this._data.Span[88] = value; } + /// + /// Gets or sets the resets. + /// + public ushort Resets + { + get => ReadUInt16LittleEndian(this._data.Span[90..]); + set => WriteUInt16LittleEndian(this._data.Span[90..], value); + } + /// /// Performs an implicit conversion from a Memory of bytes to a . /// diff --git a/src/Network/Packets/ServerToClient/ServerToClientPackets.xml b/src/Network/Packets/ServerToClient/ServerToClientPackets.xml index 914edc392..0da077bec 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPackets.xml +++ b/src/Network/Packets/ServerToClient/ServerToClientPackets.xml @@ -6322,7 +6322,7 @@ F3 03 CharacterInformationExtended - 96 + 92 ServerToClient After the character was selected by the player and entered the game. The characters enters the game world. @@ -6479,8 +6479,9 @@ Byte InventoryExtensions + - 89 + 90 ShortLittleEndian Resets diff --git a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs index f802bfdf9..a3fb53205 100644 --- a/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs +++ b/src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs @@ -16289,7 +16289,7 @@ private CharacterInformationExtendedRef(Span data, bool initialize) /// /// Gets the initial length of this data packet. When the size is dynamic, this value may be bigger than actually needed. /// - public static int Length => 96; + public static int Length => 92; /// /// Gets the header of this packet. @@ -16571,8 +16571,8 @@ public byte InventoryExtensions /// public ushort Resets { - get => ReadUInt16LittleEndian(this._data[89..]); - set => WriteUInt16LittleEndian(this._data[89..], value); + get => ReadUInt16LittleEndian(this._data[90..]); + set => WriteUInt16LittleEndian(this._data[90..], value); } /// diff --git a/tests/MUnique.OpenMU.Network.Packets.Tests/ServerToClientPacketTests.cs b/tests/MUnique.OpenMU.Network.Packets.Tests/ServerToClientPacketTests.cs index 07c1acdcc..a9fa18ad4 100644 --- a/tests/MUnique.OpenMU.Network.Packets.Tests/ServerToClientPacketTests.cs +++ b/tests/MUnique.OpenMU.Network.Packets.Tests/ServerToClientPacketTests.cs @@ -3423,7 +3423,7 @@ public void CharacterLevelUpdateExtended_PacketSizeValidation() public void CharacterInformationExtended_PacketSizeValidation() { // Fixed-length packet validation - const int expectedLength = 96; + const int expectedLength = 92; var actualLength = CharacterInformationExtendedRef.Length; Assert.That(actualLength, Is.EqualTo(expectedLength), @@ -3548,6 +3548,10 @@ public void CharacterInformationExtended_PacketSizeValidation() // Validate field 'InventoryExtensions' boundary Assert.That(88 + 1, Is.LessThanOrEqualTo(expectedLength), "Field 'InventoryExtensions' exceeds packet boundary"); + + // Validate field 'Resets' boundary + Assert.That(90 + 2, Is.LessThanOrEqualTo(expectedLength), + "Field 'Resets' exceeds packet boundary"); } ///