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/MissionReqGroup.cs
2024-01-27 21:08:24 +08:00

52 lines
1.8 KiB
C#

namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
internal static class MissionReqGroup
{
[Handler(CmdType.CmdGetMissionStatusCsReq)]
public static void OnGetMissionStatusCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetMissionStatusCsReq;
GetMissionStatusScRsp response = new GetMissionStatusScRsp
{
Retcode = (uint)RetcodeStatus.RetSucc,
};
response.FinishedMainMissionIdLists = new uint[] {
1000101,1000112,1000113,1000201,1000202,1000204,1000301,1000401,1000402,1000410,1000510,1000601,1010301,
1010302,1010401,1010403,1010701,1011403,1010202,1010902,1011102,4010101 };
if (request.SubMissionIdLists != null)
{
foreach (uint id in request.SubMissionIdLists)
{
response.MissionEventStatusLists.Add(new Mission()
{
Id = id,
Progress = 0,
Status = MissionStatus.MissionFinish
});
}
}
if (request.MainMissionIdLists != null)
{
foreach (uint id in request.MainMissionIdLists)
{
response.SubMissionStatusLists.Add(new Mission()
{
Id = id,
Progress = 0,
Status = MissionStatus.MissionFinish
});
}
}
session.Send(CmdType.CmdGetMissionStatusScRsp, response);
}
}
}