2024-01-19 14:45:18 +00:00
|
|
|
|
using RPG.GameCore.Excel;
|
|
|
|
|
using RPG.Network.Proto;
|
|
|
|
|
using RPG.Services.Gameserver.Modules.Attributes;
|
|
|
|
|
using RPG.Services.Gameserver.Session;
|
|
|
|
|
|
|
|
|
|
namespace RPG.Services.Gameserver.Modules;
|
|
|
|
|
internal class MissionModule : BaseModule
|
|
|
|
|
{
|
|
|
|
|
private readonly ExcelTables _excelTables;
|
|
|
|
|
|
2024-01-23 17:54:53 +00:00
|
|
|
|
public MissionModule(ModuleManager moduleManager, ExcelTables excelTables) : base(moduleManager)
|
2024-01-19 14:45:18 +00:00
|
|
|
|
{
|
|
|
|
|
_excelTables = excelTables;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[OnCommand(CmdType.CmdGetMissionDataCsReq)]
|
|
|
|
|
public Task OnCmdGetMissionDataCsReq(PlayerSession session, ReadOnlyMemory<byte> _)
|
|
|
|
|
{
|
|
|
|
|
GetMissionDataScRsp rsp = new();
|
|
|
|
|
|
|
|
|
|
foreach (ExcelRow row in _excelTables.GetAllRows(ExcelType.MainMission))
|
|
|
|
|
{
|
|
|
|
|
rsp.FinishedMainMissionIdList.Add(row.Id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Send(session, CmdType.CmdGetMissionDataScRsp, rsp);
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
}
|