Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Comment thread
nolt marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions src/Network/Packets/ServerToClient/ConnectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </remarks>
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)
{
Expand Down Expand Up @@ -3298,6 +3298,7 @@ int WritePacket()
packet.UsedNegativeFruitPoints = @usedNegativeFruitPoints;
packet.MaxNegativeFruitPoints = @maxNegativeFruitPoints;
packet.InventoryExtensions = @inventoryExtensions;
packet.Resets = @resets;

return packet.Header.Length;
}
Expand Down Expand Up @@ -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.
/// </remarks>
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)
{
Expand Down Expand Up @@ -3430,6 +3431,7 @@ int WritePacket()
packet.MagicSpeed = @magicSpeed;
packet.MaximumAttackSpeed = @maximumAttackSpeed;
packet.InventoryExtensions = @inventoryExtensions;
packet.Resets = @resets;

return packet.Header.Length;
}
Expand Down
18 changes: 18 additions & 0 deletions src/Network/Packets/ServerToClient/ServerToClientPacketsRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16052,6 +16052,15 @@ public byte InventoryExtensions
set => this._data[68] = value;
}

/// <summary>
/// Gets or sets the resets.
/// </summary>
public ushort Resets
{
get => ReadUInt16LittleEndian(this._data[69..]);
set => WriteUInt16LittleEndian(this._data[69..], value);
}
Comment thread
nolt marked this conversation as resolved.
Outdated

/// <summary>
/// Performs an implicit conversion from a Span of bytes to a <see cref="CharacterInformation"/>.
/// </summary>
Expand Down Expand Up @@ -16566,6 +16575,15 @@ public byte InventoryExtensions
set => this._data[88] = value;
}

/// <summary>
/// Gets or sets the resets.
/// </summary>
public uint Resets
{
get => ReadUInt32LittleEndian(this._data[89..]);
set => WriteUInt32LittleEndian(this._data[89..], value);
}

/// <summary>
/// Performs an implicit conversion from a Span of bytes to a <see cref="CharacterInformationExtended"/>.
/// </summary>
Expand Down