From c560bd8d7bcd5fdba4048bf85914c1bd740e5e8d Mon Sep 17 00:00:00 2001 From: rfi Date: Fri, 23 Feb 2024 09:51:01 +0700 Subject: [PATCH] eqip notifs --- BLHX.Server.Game/Commands/Command.cs | 3 ++- BLHX.Server.Game/Connection.cs | 2 ++ BLHX.Server.Game/Handlers/P14.cs | 29 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 BLHX.Server.Game/Handlers/P14.cs diff --git a/BLHX.Server.Game/Commands/Command.cs b/BLHX.Server.Game/Commands/Command.cs index 65bf50a..cc2d713 100644 --- a/BLHX.Server.Game/Commands/Command.cs +++ b/BLHX.Server.Game/Commands/Command.cs @@ -100,6 +100,7 @@ public static class CommandHandlerFactory static readonly Dictionary>> commandFunctions; static readonly Dictionary, Connection>> commandFunctionsConn; + private static readonly char[] separator = new[] { ' ' }; static CommandHandlerFactory() { @@ -133,7 +134,7 @@ public static class CommandHandlerFactory public static void HandleCommand(string commandLine, Connection? connection = null) { - var parts = commandLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + var parts = commandLine.Split(separator, StringSplitOptions.RemoveEmptyEntries); if (parts.Length == 0) return; diff --git a/BLHX.Server.Game/Connection.cs b/BLHX.Server.Game/Connection.cs index 16645a4..9b2f6d3 100644 --- a/BLHX.Server.Game/Connection.cs +++ b/BLHX.Server.Game/Connection.cs @@ -166,6 +166,8 @@ namespace BLHX.Server.Game this.NotifyShopMonthData(); this.NotifyChapterData(); this.NotifyBagData(); + this.NotifyEquipList(); + this.NotifyEquipSkinList(); this.NotifyBuildShipData(); this.NotifyActivityData(); this.NotifyDormData(); diff --git a/BLHX.Server.Game/Handlers/P14.cs b/BLHX.Server.Game/Handlers/P14.cs new file mode 100644 index 0000000..777c0b9 --- /dev/null +++ b/BLHX.Server.Game/Handlers/P14.cs @@ -0,0 +1,29 @@ +using BLHX.Server.Common.Proto.p14; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLHX.Server.Game.Handlers +{ + internal class P14 + { + } + + static class P14ConnectionNotifyExtensions + { + public static void NotifyEquipList(this Connection connection) + { + connection.Send(new Sc14001() + { + SpweaponBagSize = 150 + }); + } + + public static void NotifyEquipSkinList(this Connection connection) + { + connection.Send(new Sc14101()); + } + } +}