warship & nick change

This commit is contained in:
rafi1212122
2023-06-01 15:55:13 +07:00
parent 7ab7fae2bf
commit 35313b8787
8 changed files with 435 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using Common.Resources.Proto;
namespace PemukulPaku.GameServer.Handlers
{
[PacketCmdId(CmdId.SetWarshipReq)]
internal class SetWarshipReqHandler : IPacketHandler
{
public void Handle(Session session, Packet packet)
{
SetWarshipReq Data = packet.GetDecodedBody<SetWarshipReq>();
session.Player.User.WarshipId = (int)Data.WarshipId;
GetMainDataRsp MainDataRsp = new()
{
retcode = GetMainDataRsp.Retcode.Succ,
WarshipTheme = new() { WarshipId = (uint)session.Player.User.WarshipId }
};
SetWarshipRsp Rsp = new() { retcode = SetWarshipRsp.Retcode.Succ };
session.Send(Packet.FromProto(MainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(Rsp, CmdId.SetWarshipRsp));
}
}
}