30 lines
822 B
C#
30 lines
822 B
C#
|
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;
|
|||
|
|
|||
|
public MissionModule(ExcelTables excelTables)
|
|||
|
{
|
|||
|
_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;
|
|||
|
}
|
|||
|
}
|