handlers folder re-strucutring

This commit is contained in:
rafi1212122
2023-06-05 13:18:07 +07:00
parent f822976f74
commit cb2bc9d56e
74 changed files with 31 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
using Common;
using Common.Resources.Proto;
namespace PemukulPaku.GameServer.Handlers
{
[PacketCmdId(CmdId.ClientReportReq)]
internal class ClientReportReqHandler : IPacketHandler
{
public void Handle(Session session, Packet packet)
{
ClientReportReq Data = packet.GetDecodedBody<ClientReportReq>();
if((int)Global.config.VerboseLevel > 0)
session.c.Warn($"ClientReport | {Data.ReportType} = {Data.ReportValue}");
session.Send(Packet.FromProto(new ClientReportRsp() { retcode = ClientReportRsp.Retcode.Succ }, CmdId.ClientReportRsp));
}
}
}

View File

@@ -0,0 +1,24 @@
using Common.Resources.Proto;
namespace PemukulPaku.GameServer.Handlers
{
[PacketCmdId(CmdId.GetAuthkeyReq)]
internal class GetAuthkeyReqHandler : IPacketHandler
{
public void Handle(Session session, Packet packet)
{
GetAuthkeyReq Data = packet.GetDecodedBody<GetAuthkeyReq>();
GetAuthkeyRsp Rsp = new()
{
retcode = GetAuthkeyRsp.Retcode.Succ,
AuthAppid = Data.AuthAppid,
Authkey = "0",
SignType = 2,
AuthkeyVer = 1
};
session.Send(Packet.FromProto(Rsp, CmdId.GetAuthkeyRsp));
}
}
}