feat: set warship theme

This commit is contained in:
Naruse
2025-06-17 13:33:39 +08:00
parent 7f4e4b38c5
commit 981f2479d9
7 changed files with 31 additions and 65 deletions

View File

@@ -1,13 +0,0 @@
using KianaBH.GameServer.Server.Packet.Send.Test;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Recv.Test;
[Opcode(CmdIds.SetWarshipReq)]
public class HandlerSetWarshipReq : Handler
{
public override async Task OnHandle(Connection connection, byte[] header, byte[] data)
{
await connection.SendPacket(new PacketSetWarshipRsp());
}
}

View File

@@ -1,5 +1,4 @@
using KianaBH.GameServer.Server.Packet.Send.Player;
using KianaBH.GameServer.Server.Packet.Send.Warship;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Recv.Warship;

View File

@@ -0,0 +1,17 @@
using KianaBH.GameServer.Server.Packet.Send.Player;
using KianaBH.Proto;
namespace KianaBH.GameServer.Server.Packet.Recv.Warship;
[Opcode(CmdIds.SetWarshipReq)]
public class HandlerSetWarshipReq : Handler
{
public override async Task OnHandle(Connection connection, byte[] header, byte[] data)
{
var req = SetWarshipReq.Parser.ParseFrom(data);
connection.Player!.Data!.WarshipId = (int)req.WarshipId;
await connection.SendPacket(new PacketGetMainDataRsp(req.WarshipId));
await connection.SendPacket(CmdIds.SetWarshipRsp);
}
}