Archived
1
0
Fork 0
forked from Moux23333/FreeSR
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Gateserver/Manager/Handlers/NPCReqGroup.cs

48 lines
1.5 KiB
C#
Raw Normal View History

2024-01-27 13:06:07 +00:00
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
2024-01-27 13:08:24 +00:00
[Handler(CmdType.CmdGetNpcTakenRewardCsReq)]
2024-01-27 13:06:07 +00:00
public static void OnGetNpcTakenRewardCsReq(NetSession session, int cmdId, object data)
{
2024-02-21 06:41:22 +00:00
var npcRewardReq = data as GetNpcTakenRewardCsReq;
2024-01-27 13:06:07 +00:00
2024-02-21 06:41:22 +00:00
session.Send(CmdType.CmdGetNpcTakenRewardScRsp, new GetNpcTakenRewardScRsp
2024-01-27 13:06:07 +00:00
{
2024-02-21 06:41:22 +00:00
NpcId = npcRewardReq.NpcId,
Retcode = 0
2024-01-27 13:06:07 +00:00
});
}
2024-01-27 13:08:24 +00:00
[Handler(CmdType.CmdGetFirstTalkByPerformanceNpcCsReq)]
2024-01-27 13:06:07 +00:00
public static void OnGetFirstTalkByPerformanceNpcCsReq(NetSession session, int cmdId, object data)
{
2024-02-21 06:41:22 +00:00
var npcPerformanceReq = data as GetFirstTalkByPerformanceNpcCsReq;
2024-01-27 13:08:24 +00:00
2024-02-21 06:41:22 +00:00
var response = new GetFirstTalkByPerformanceNpcScRsp
2024-01-27 13:08:24 +00:00
{
2024-02-21 06:41:22 +00:00
Retcode = 0
2024-01-27 13:08:24 +00:00
};
2024-02-21 06:41:22 +00:00
foreach(uint id in npcPerformanceReq.FirstTalkIdLists)
2024-01-27 13:06:07 +00:00
{
2024-02-21 06:41:22 +00:00
response.NpcMeetStatusLists.Add(new NpcMeetStatusInfo
2024-01-27 13:06:07 +00:00
{
2024-02-21 06:41:22 +00:00
IsMeet = true,
MeetId = id
2024-01-27 13:08:24 +00:00
});
}
session.Send(CmdType.CmdGetFirstTalkByPerformanceNpcScRsp, response);
2024-01-27 13:06:07 +00:00
}
}
}