From 02f3e114d38b4d2a6787ae16ba4795afa9e167ee Mon Sep 17 00:00:00 2001 From: sven-n Date: Fri, 18 Oct 2024 20:37:51 +0200 Subject: [PATCH] Transmit max attack speed --- .../RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs index cffd101c9..80124d500 100644 --- a/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs +++ b/src/GameServer/RemoteView/Character/UpdateCharacterStatsExtendedPlugIn.cs @@ -37,6 +37,7 @@ public async ValueTask UpdateCharacterStatsAsync() return; } + var maxAttackSpeed = this._player.GameContext.Configuration.Attributes.FirstOrDefault(a => a == Stats.AttackSpeed)?.MaximumValue ?? 200; await connection.SendCharacterInformationExtendedAsync( this._player.Position.X, this._player.Position.Y, @@ -66,7 +67,7 @@ await connection.SendCharacterInformationExtendedAsync( this._player.SelectedCharacter.GetMaximumFruitPoints(), (ushort)this._player.Attributes[Stats.AttackSpeed], (ushort)this._player.Attributes[Stats.MagicSpeed], - 200, // todo: This is the maximum attack speed, make configurable. + (ushort)maxAttackSpeed, (byte)this._player.SelectedCharacter.InventoryExtensions) .ConfigureAwait(false);