diff --git a/BLHX.Server.Game/Commands/ShipCommand.cs b/BLHX.Server.Game/Commands/ShipCommand.cs index c7ecfe3..bcac1ec 100644 --- a/BLHX.Server.Game/Commands/ShipCommand.cs +++ b/BLHX.Server.Game/Commands/ShipCommand.cs @@ -34,9 +34,6 @@ namespace BLHX.Server.Game.Commands { List all_ships = all_ship_ids.Select(ship_id => CreateShipFromId((uint)ship_id, connection.player.Uid)).Take(amount).ToList(); - foreach (int id in all_ship_ids) - Logger.c.Log(id + ""); - all_ships.AddRange(GetDefaultShips(connection.player.Ships)); // add the defaults connection.player.Ships = all_ships; connection.SendSystemMsg($"Added {amount} ships!"); diff --git a/BLHX.Server.Game/Handlers/P11.cs b/BLHX.Server.Game/Handlers/P11.cs index 6237e02..7fee4b0 100644 --- a/BLHX.Server.Game/Handlers/P11.cs +++ b/BLHX.Server.Game/Handlers/P11.cs @@ -22,6 +22,13 @@ namespace BLHX.Server.Game.Handlers { connection.Send(new Sc11010()); } + + [PacketHandler(Command.Cs11011, SaveDataAfterRun = true)] + static void ChangePlayerIconHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + connection.Send(new Sc11012()); + } [PacketHandler(Command.Cs11013, SaveDataAfterRun = true)] static void HarvestResourceHandler(Connection connection, Packet packet) { diff --git a/BLHX.Server.Game/Handlers/P15.cs b/BLHX.Server.Game/Handlers/P15.cs index 72e6e81..fc5da8e 100644 --- a/BLHX.Server.Game/Handlers/P15.cs +++ b/BLHX.Server.Game/Handlers/P15.cs @@ -1,12 +1,30 @@ using BLHX.Server.Common.Proto.p15; using BLHX.Server.Common.Data; using BLHX.Server.Common.Utils; +using BLHX.Server.Common.Proto; namespace BLHX.Server.Game.Handlers { internal static class P15 { + [PacketHandler(Command.Cs15002, SaveDataAfterRun = true)] + static void UseFudaiItemHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + Logger.c.Log("Arg: "); + + foreach (var arg in req.Args) + Logger.c.Log(arg + ""); + + Logger.c.Log(req.Count + ""); + Logger.c.Log(req.Id + ""); + + connection.Send(new Sc15003() { + DropLists = [], + }); + } } static class P15ConnectionNotifyExtensions { + public static void NotifyBagData(this Connection connection) { //List AllItemsKeys = Data.ItemDataStatistics.Where(data => data.Value.Type == 2 && data.Value.Rarity >= 6).ToDictionary().Keys.ToList(); List AllItemsKeys = Data.ItemDataStatistics.ToDictionary().Keys.ToList(); diff --git a/BLHX.Server.Game/Handlers/P16.cs b/BLHX.Server.Game/Handlers/P16.cs index 7de16d6..84d8de8 100644 --- a/BLHX.Server.Game/Handlers/P16.cs +++ b/BLHX.Server.Game/Handlers/P16.cs @@ -1,27 +1,32 @@ using BLHX.Server.Common.Proto; using BLHX.Server.Common.Proto.p16; +using BLHX.Server.Common.Utils; + +namespace BLHX.Server.Game.Handlers { + internal static class P16 { + [PacketHandler(Command.Cs16001, SaveDataAfterRun = true)] + static void DormTrainShoppingHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + Logger.c.Log("Id: " + req.Id); + Logger.c.Log("Number: " + req.Number); + + connection.Send(new Sc16002() { }); + } -namespace BLHX.Server.Game.Handlers -{ - internal static class P16 - { [PacketHandler(Command.Cs16104)] - static void GetChargeListHandler(Connection connection, Packet packet) - { + static void GetChargeListHandler(Connection connection, Packet packet) { connection.Send(new Sc16105()); } [PacketHandler(Command.Cs16106)] - static void GetExchangeItemHandler(Connection connection, Packet packet) - { + static void GetExchangeItemHandler(Connection connection, Packet packet) { connection.Send(new Sc16107()); } } - static class P16ConnectionNotifyExtensions - { - public static void NotifyShopMonthData(this Connection connection) - { + static class P16ConnectionNotifyExtensions { + public static void NotifyShopMonthData(this Connection connection) { connection.Send(new Sc16200() { Month = (uint)DateTime.Now.Month }); } } diff --git a/BLHX.Server.Game/Handlers/P19.cs b/BLHX.Server.Game/Handlers/P19.cs index 63ffac0..5ce0759 100644 --- a/BLHX.Server.Game/Handlers/P19.cs +++ b/BLHX.Server.Game/Handlers/P19.cs @@ -1,17 +1,45 @@ -using BLHX.Server.Common.Proto.p19; +using BLHX.Server.Common.Proto; +using BLHX.Server.Common.Proto.p19; +using BLHX.Server.Common.Utils; -namespace BLHX.Server.Game.Handlers -{ - internal static class P19 - { +namespace BLHX.Server.Game.Handlers { + internal static class P19 { + [PacketHandler(Command.Cs19002, SaveDataAfterRun = true)] + static void AddShipHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + Logger.c.Log("ShipId: " + req.ShipId); + Logger.c.Log("Type: " + req.Type); + + connection.Send(new Sc19003() {}); + connection.Send(new Sc19003() {}); + } + + [PacketHandler(Command.Cs19004, SaveDataAfterRun = true)] + static void ShipExitHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + connection.Send(new Sc19005() { }); + } + + [PacketHandler(Command.Cs19103, SaveDataAfterRun = true)] + static void GetOSSArgsHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + Logger.c.Log("Typ: " + req.Typ); + + connection.Send(new Sc19104() { + AccessId = "1", + AccessSecret = "1", + ExpireTime = (uint)new DateTimeOffset(DateTime.Now.AddDays(31)).ToUnixTimeSeconds(), + SecurityToken = "3874839" + }); + } } - static class P19ConnectionNotifyExtensions - { - public static void NotifyDormData(this Connection connection) - { - connection.Send(new Sc19001() - { + static class P19ConnectionNotifyExtensions { + public static void NotifyDormData(this Connection connection) { + connection.Send(new Sc19001() { Lv = 1, FloorNum = 1, ExpPos = 2, diff --git a/BLHX.Server.Game/Handlers/P33.cs b/BLHX.Server.Game/Handlers/P33.cs index 45d1537..aa6caff 100644 --- a/BLHX.Server.Game/Handlers/P33.cs +++ b/BLHX.Server.Game/Handlers/P33.cs @@ -1,16 +1,21 @@ -using BLHX.Server.Common.Proto.p33; +using BLHX.Server.Common.Proto; +using BLHX.Server.Common.Proto.p33; -namespace BLHX.Server.Game.Handlers -{ - internal class P33 - { +namespace BLHX.Server.Game.Handlers { + internal class P33 { + [PacketHandler(Command.Cs33000, SaveDataAfterRun = true)] + static void ReqWorldCheckHandler(Connection connection, Packet packet) { + var req = packet.Decode(); + + connection.Send(new Sc33001() { + IsWorldOpen = 0, + }); + } + } - static class P33ConnectionNotifyExtensions - { - public static void NotifyWorldData(this Connection connection) - { - connection.Send(new Sc33114() - { + static class P33ConnectionNotifyExtensions { + public static void NotifyWorldData(this Connection connection) { + connection.Send(new Sc33114() { IsWorldOpen = 1 }); }