This repository has been archived on 2024-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Gateserver/Manager/Handlers/NPCReqGroup.cs
2024-02-21 14:41:22 +08:00

47 lines
1.5 KiB
C#

namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
using System.ComponentModel.Design;
internal static class NPCReqGroup
{
//maybe useless
[Handler(CmdType.CmdGetNpcTakenRewardCsReq)]
public static void OnGetNpcTakenRewardCsReq(NetSession session, int cmdId, object data)
{
var npcRewardReq = data as GetNpcTakenRewardCsReq;
session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new GetNpcTakenRewardScRsp
{
NpcId = npcRewardReq.NpcId,
Retcode = 0
});
}
[Handler(CmdType.CmdGetFirstTalkByPerformanceNpcCsReq)]
public static void OnGetFirstTalkByPerformanceNpcCsReq(NetSession session, int cmdId, object data)
{
var npcPerformanceReq = data as GetFirstTalkByPerformanceNpcCsReq;
var response = new GetFirstTalkByPerformanceNpcScRsp
{
Retcode = 0
};
foreach(uint id in npcPerformanceReq.FirstTalkIdLists)
{
response.NpcMeetStatusLists.Add(new NpcMeetStatusInfo
{
IsMeet = true,
MeetId = id
});
}
session.Send(CmdType.CmdGetFirstTalkByPerformanceNpcScRsp, response);
}
}
}