72 lines
4.3 KiB
Rust
72 lines
4.3 KiB
Rust
use super::*;
|
|
|
|
static FINISHED_MAIN_MISSIONS: [u32; 365] = [
|
|
1000101, 1000111, 1000112, 1000113, 1000114, 1000201, 1000202, 1000203, 1000204, 1000300,
|
|
1000301, 1000302, 1000303, 1000304, 1000400, 1000401, 1000402, 1000410, 1000500, 1000501,
|
|
1000502, 1000503, 1000504, 1000505, 1000510, 1000511, 1010001, 1010002, 1010101, 1010201,
|
|
1010202, 1010203, 1010204, 1010205, 1010206, 1010301, 1010302, 1010303, 1010401, 1010405,
|
|
1010402, 1010403, 1010500, 1010501, 1010502, 1010503, 1010601, 1010602, 1010700, 1010701,
|
|
1010801, 1010802, 1010901, 1010902, 1011001, 1011002, 1011003, 1011100, 1011101, 1011102,
|
|
1011103, 1011201, 1011202, 1011301, 1011400, 1011401, 1011402, 1011403, 1011501, 1011502,
|
|
1011503, 1020101, 1020201, 1020302, 1020301, 1020400, 1020401, 1020402, 1020403, 1020501,
|
|
1020601, 1020701, 1020702, 1020801, 1020901, 1021001, 1021101, 1021201, 1021301, 1021401,
|
|
1021501, 1021601, 1021702, 1021703, 1030101, 1030102, 1030201, 1030202, 1030301, 1030302,
|
|
1030303, 1030304, 1030401, 1030402, 1030403, 1030501, 1030601, 1030701, 1030702, 1030801,
|
|
2000001, 2000002, 2000003, 2000004, 2000100, 2000101, 2000131, 2000132, 2000133, 2000110,
|
|
2000111, 2000301, 2000103, 2000112, 2000108, 2000104, 2000102, 2000105, 2000106, 2000107,
|
|
2000313, 2000314, 2000109, 2000113, 2000116, 2000118, 2000119, 2000120, 2000122, 2000302,
|
|
2000303, 2000304, 2000305, 2000310, 2000311, 2000312, 2000320, 2000701, 2000702, 2000703,
|
|
2000704, 2000705, 2000706, 2000707, 2000801, 2000802, 2000803, 2000901, 2000902, 2000903,
|
|
2001001, 2001002, 2001003, 2010005, 2010301, 2010302, 2011103, 2011104, 2011409, 2010401,
|
|
2010402, 2010405, 2010502, 2010503, 2010701, 2010708, 2010709, 2010720, 2010730, 2010731,
|
|
2010732, 2010733, 2010734, 2010735, 2010904, 2011101, 2011102, 2011105, 2011301, 2011302,
|
|
2011303, 2011501, 2011502, 2010909, 2010910, 2011601, 2011701, 2011801, 2011901, 2011902,
|
|
2011903, 2011904, 2011905, 2011906, 2020301, 2020302, 2020304, 2020316, 2020317, 2020318,
|
|
2020319, 2020401, 2020402, 2020403, 2020404, 2020405, 2020406, 2020407, 2020303, 2020103,
|
|
2020104, 2020105, 2020106, 2020107, 2020108, 2020109, 2020110, 2020111, 2020201, 2020202,
|
|
2020203, 2020204, 2020205, 2000201, 2000202, 2000203, 2000204, 2000205, 2000206, 2000207,
|
|
2000208, 2000209, 2000211, 2000212, 2010201, 2010202, 2010203, 2010204, 2010205, 2010206,
|
|
2010500, 2010501, 2010705, 2010706, 2010901, 2010902, 2010903, 2010702, 2010703, 2011400,
|
|
2011401, 2011406, 2011402, 2011403, 2011404, 2011405, 2011407, 2011408, 2011410, 2011411,
|
|
2011412, 2011413, 2010905, 2010906, 2010907, 2010908, 2010911, 2010912, 2020305, 2020306,
|
|
2020309, 2020307, 2020308, 2020701, 2020702, 2020703, 2020313, 2020314, 2020315, 6020101,
|
|
6020201, 6020202, 2020501, 2020502, 2020503, 2020504, 2020505, 2020506, 2020507, 2020601,
|
|
2020602, 2020603, 2020604, 2020801, 2020802, 2020901, 2021001, 2021002, 2021009, 2021601,
|
|
2021602, 2021701, 2021702, 2021703, 2021704, 2021705, 2021801, 2021802, 2021803, 2030001,
|
|
2030002, 2030003, 2030101, 2030102, 2030201, 2030202, 2030203, 2030301, 2030302, 3000201,
|
|
3000202, 3000203, 3000211, 3000212, 3000213, 3000301, 3000302, 3000303, 3000522, 3000523,
|
|
3000524, 3000525, 3000526, 3000527, 3000601, 3000602, 3000603, 3000604, 3000701, 3000702,
|
|
3000703, 3000704, 3000705, 3000800, 3000801, 3000802, 3000803, 3010102, 3010103, 3010104,
|
|
3010105, 3010201, 3010202, 3010203, 3010204,
|
|
];
|
|
|
|
pub async fn on_get_mission_status_cs_req(
|
|
session: &PlayerSession,
|
|
body: &GetMissionStatusCsReq,
|
|
) -> Result<()> {
|
|
let rsp = GetMissionStatusScRsp {
|
|
retcode: 0,
|
|
finished_main_mission_id_list: FINISHED_MAIN_MISSIONS.to_vec(),
|
|
sub_mission_status_list: body
|
|
.main_mission_id_list
|
|
.iter()
|
|
.map(|id| Mission {
|
|
id: *id,
|
|
progress: 0,
|
|
status: MissionStatus::MissionFinish.into(),
|
|
})
|
|
.collect(),
|
|
mission_event_status_list: body
|
|
.mission_event_id_list
|
|
.iter()
|
|
.map(|id| Mission {
|
|
id: *id,
|
|
progress: 0,
|
|
status: MissionStatus::MissionFinish.into(),
|
|
})
|
|
.collect(),
|
|
..Default::default()
|
|
};
|
|
|
|
session.send(CMD_GET_MISSION_STATUS_SC_RSP, rsp).await
|
|
}
|