mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-13 06:54:51 +01:00
add dorm and random stuff for fun
This commit is contained in:
@@ -34,9 +34,6 @@ namespace BLHX.Server.Game.Commands {
|
|||||||
|
|
||||||
List<PlayerShip> all_ships = all_ship_ids.Select(ship_id => CreateShipFromId((uint)ship_id, connection.player.Uid)).Take(amount).ToList();
|
List<PlayerShip> 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
|
all_ships.AddRange(GetDefaultShips(connection.player.Ships)); // add the defaults
|
||||||
connection.player.Ships = all_ships;
|
connection.player.Ships = all_ships;
|
||||||
connection.SendSystemMsg($"Added {amount} ships!");
|
connection.SendSystemMsg($"Added {amount} ships!");
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ namespace BLHX.Server.Game.Handlers {
|
|||||||
connection.Send(new Sc11010());
|
connection.Send(new Sc11010());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PacketHandler(Command.Cs11011, SaveDataAfterRun = true)]
|
||||||
|
static void ChangePlayerIconHandler(Connection connection, Packet packet) {
|
||||||
|
var req = packet.Decode<Cs11011>();
|
||||||
|
|
||||||
|
connection.Send(new Sc11012());
|
||||||
|
}
|
||||||
|
|
||||||
[PacketHandler(Command.Cs11013, SaveDataAfterRun = true)]
|
[PacketHandler(Command.Cs11013, SaveDataAfterRun = true)]
|
||||||
static void HarvestResourceHandler(Connection connection, Packet packet) {
|
static void HarvestResourceHandler(Connection connection, Packet packet) {
|
||||||
var req = packet.Decode<Cs11013>();
|
var req = packet.Decode<Cs11013>();
|
||||||
|
|||||||
@@ -1,12 +1,30 @@
|
|||||||
using BLHX.Server.Common.Proto.p15;
|
using BLHX.Server.Common.Proto.p15;
|
||||||
using BLHX.Server.Common.Data;
|
using BLHX.Server.Common.Data;
|
||||||
using BLHX.Server.Common.Utils;
|
using BLHX.Server.Common.Utils;
|
||||||
|
using BLHX.Server.Common.Proto;
|
||||||
|
|
||||||
namespace BLHX.Server.Game.Handlers {
|
namespace BLHX.Server.Game.Handlers {
|
||||||
internal static class P15 {
|
internal static class P15 {
|
||||||
|
[PacketHandler(Command.Cs15002, SaveDataAfterRun = true)]
|
||||||
|
static void UseFudaiItemHandler(Connection connection, Packet packet) {
|
||||||
|
var req = packet.Decode<Cs15002>();
|
||||||
|
|
||||||
|
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 {
|
static class P15ConnectionNotifyExtensions {
|
||||||
|
|
||||||
public static void NotifyBagData(this Connection connection) {
|
public static void NotifyBagData(this Connection connection) {
|
||||||
//List<int> AllItemsKeys = Data.ItemDataStatistics.Where(data => data.Value.Type == 2 && data.Value.Rarity >= 6).ToDictionary().Keys.ToList();
|
//List<int> AllItemsKeys = Data.ItemDataStatistics.Where(data => data.Value.Type == 2 && data.Value.Rarity >= 6).ToDictionary().Keys.ToList();
|
||||||
List<int> AllItemsKeys = Data.ItemDataStatistics.ToDictionary().Keys.ToList();
|
List<int> AllItemsKeys = Data.ItemDataStatistics.ToDictionary().Keys.ToList();
|
||||||
|
|||||||
@@ -1,27 +1,32 @@
|
|||||||
using BLHX.Server.Common.Proto;
|
using BLHX.Server.Common.Proto;
|
||||||
using BLHX.Server.Common.Proto.p16;
|
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<Cs16001>();
|
||||||
|
|
||||||
|
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)]
|
[PacketHandler(Command.Cs16104)]
|
||||||
static void GetChargeListHandler(Connection connection, Packet packet)
|
static void GetChargeListHandler(Connection connection, Packet packet) {
|
||||||
{
|
|
||||||
connection.Send(new Sc16105());
|
connection.Send(new Sc16105());
|
||||||
}
|
}
|
||||||
|
|
||||||
[PacketHandler(Command.Cs16106)]
|
[PacketHandler(Command.Cs16106)]
|
||||||
static void GetExchangeItemHandler(Connection connection, Packet packet)
|
static void GetExchangeItemHandler(Connection connection, Packet packet) {
|
||||||
{
|
|
||||||
connection.Send(new Sc16107());
|
connection.Send(new Sc16107());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class P16ConnectionNotifyExtensions
|
static class P16ConnectionNotifyExtensions {
|
||||||
{
|
public static void NotifyShopMonthData(this Connection connection) {
|
||||||
public static void NotifyShopMonthData(this Connection connection)
|
|
||||||
{
|
|
||||||
connection.Send(new Sc16200() { Month = (uint)DateTime.Now.Month });
|
connection.Send(new Sc16200() { Month = (uint)DateTime.Now.Month });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
namespace BLHX.Server.Game.Handlers {
|
||||||
{
|
internal static class P19 {
|
||||||
internal static class P19
|
[PacketHandler(Command.Cs19002, SaveDataAfterRun = true)]
|
||||||
{
|
static void AddShipHandler(Connection connection, Packet packet) {
|
||||||
|
var req = packet.Decode<Cs19002>();
|
||||||
|
|
||||||
|
Logger.c.Log("ShipId: " + req.ShipId);
|
||||||
|
Logger.c.Log("Type: " + req.Type);
|
||||||
|
|
||||||
|
connection.Send(new Sc19003() {});
|
||||||
|
connection.Send(new Sc19003() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
static class P19ConnectionNotifyExtensions
|
[PacketHandler(Command.Cs19004, SaveDataAfterRun = true)]
|
||||||
{
|
static void ShipExitHandler(Connection connection, Packet packet) {
|
||||||
public static void NotifyDormData(this Connection connection)
|
var req = packet.Decode<Cs19004>();
|
||||||
{
|
|
||||||
connection.Send(new Sc19001()
|
connection.Send(new Sc19005() { });
|
||||||
{
|
}
|
||||||
|
|
||||||
|
[PacketHandler(Command.Cs19103, SaveDataAfterRun = true)]
|
||||||
|
static void GetOSSArgsHandler(Connection connection, Packet packet) {
|
||||||
|
var req = packet.Decode<Cs19103>();
|
||||||
|
|
||||||
|
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() {
|
||||||
Lv = 1,
|
Lv = 1,
|
||||||
FloorNum = 1,
|
FloorNum = 1,
|
||||||
ExpPos = 2,
|
ExpPos = 2,
|
||||||
|
|||||||
@@ -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
|
namespace BLHX.Server.Game.Handlers {
|
||||||
{
|
internal class P33 {
|
||||||
internal class P33
|
[PacketHandler(Command.Cs33000, SaveDataAfterRun = true)]
|
||||||
{
|
static void ReqWorldCheckHandler(Connection connection, Packet packet) {
|
||||||
|
var req = packet.Decode<Cs33000>();
|
||||||
|
|
||||||
|
connection.Send(new Sc33001() {
|
||||||
|
IsWorldOpen = 0,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
static class P33ConnectionNotifyExtensions
|
|
||||||
{
|
}
|
||||||
public static void NotifyWorldData(this Connection connection)
|
static class P33ConnectionNotifyExtensions {
|
||||||
{
|
public static void NotifyWorldData(this Connection connection) {
|
||||||
connection.Send(new Sc33114()
|
connection.Send(new Sc33114() {
|
||||||
{
|
|
||||||
IsWorldOpen = 1
|
IsWorldOpen = 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user