ship skin comamnd and changing skin

This commit is contained in:
rfi
2024-02-23 14:35:50 +07:00
parent c560bd8d7b
commit 529d404c12
15 changed files with 232033 additions and 11 deletions

View File

@@ -113,7 +113,7 @@ namespace BLHX.Server.Game.Handlers
connection.Send(rsp);
}
[PacketHandler(Command.Cs10100)]
[PacketHandler(Command.Cs10100, IsNotifyHandler = true)]
static void HeartbeatHandler(Connection connection, Packet packet)
{
connection.Send(new Sc10101() { State = 1 });

View File

@@ -1,4 +1,6 @@
using BLHX.Server.Common.Proto;
using BLHX.Server.Common.Data;
using BLHX.Server.Common.Proto;
using BLHX.Server.Common.Proto.common;
using BLHX.Server.Common.Proto.p12;
namespace BLHX.Server.Game.Handlers
@@ -18,6 +20,16 @@ namespace BLHX.Server.Game.Handlers
connection.Send(new Sc12103());
}
[PacketHandler(Command.Cs12202, SaveDataAfterRun = true)]
static void SetShipSkinHandler(Connection connection, Packet packet)
{
var req = packet.Decode<Cs12202>();
if (connection.player.Ships.Any(x => x.Id == req.ShipId))
connection.player.Ships.First(x => x.Id == req.ShipId).SkinId = req.SkinId;
connection.Send(new Sc12203());
}
}
static class P12ConnectionNotifyExtensions
@@ -35,7 +47,7 @@ namespace BLHX.Server.Game.Handlers
public static void NotifyShipSkinData(this Connection connection)
{
connection.Send(new Sc12201());
connection.Send(new Sc12201() { SkinLists = connection.player.ShipSkins });
}
public static void NotifyFleetData(this Connection connection)

View File

@@ -0,0 +1,18 @@
using BLHX.Server.Common.Proto.p33;
namespace BLHX.Server.Game.Handlers
{
internal class P33
{
}
static class P33ConnectionNotifyExtensions
{
public static void NotifyWorldData(this Connection connection)
{
connection.Send(new Sc33114()
{
IsWorldOpen = 1
});
}
}
}

View File

@@ -14,5 +14,11 @@ namespace BLHX.Server.Game.Handlers
MetaShipLists = req.GroupIds.Select(x => new MetaShipInfo() { GroupId = x }).ToList()
});
}
[PacketHandler(Command.Cs34501)]
static void GetWorldBossHandler(Connection connection, Packet packet)
{
connection.Send(new Sc34502());
}
}
}