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(ModuleManager moduleManager, ExcelTables excelTables) : base(moduleManager) { _excelTables = excelTables; } [OnCommand(CmdType.CmdGetMissionDataCsReq)] public Task OnCmdGetMissionDataCsReq(PlayerSession session, ReadOnlyMemory _) { GetMissionDataScRsp rsp = new(); foreach (ExcelRow row in _excelTables.GetAllRows(ExcelType.MainMission)) { rsp.FinishedMainMissionIdList.Add(row.Id); } Send(session, CmdType.CmdGetMissionDataScRsp, rsp); return Task.CompletedTask; } }