From 87d98b041fee6edb00793a61fd46206d7b63eb82 Mon Sep 17 00:00:00 2001 From: GanyusLeftHorn <1244229+GanyusLeftHorn@users.noreply.github.com> Date: Tue, 2 Aug 2022 01:41:17 +0200 Subject: [PATCH] Enable Game Features and UI (#11) * Handle GetShopListCsReq and make NPCs interactable. * Add utils for shop excels. * Enable game features/UI. Co-authored-by: memetrollsXD --- src/server/packets/GetMissionDataCsReq.ts | 2 +- src/server/packets/GetMissionStatusCsReq.ts | 29 ++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/server/packets/GetMissionDataCsReq.ts b/src/server/packets/GetMissionDataCsReq.ts index 93cae07..982eb01 100644 --- a/src/server/packets/GetMissionDataCsReq.ts +++ b/src/server/packets/GetMissionDataCsReq.ts @@ -6,5 +6,5 @@ export default async function handle(session: Session, packet: Packet) { session.send("GetMissionDataScRsp", { retcode: 0, missionList: [] - } as unknown as GetMissionDataScRsp); + } as GetMissionDataScRsp); } \ No newline at end of file diff --git a/src/server/packets/GetMissionStatusCsReq.ts b/src/server/packets/GetMissionStatusCsReq.ts index 6a99fc3..6bf1c29 100644 --- a/src/server/packets/GetMissionStatusCsReq.ts +++ b/src/server/packets/GetMissionStatusCsReq.ts @@ -7,7 +7,30 @@ export default async function handle(session: Session, packet: Packet) { const dataObj = { retcode: 0, - finishedMainMissionIdList: [], + finishedMainMissionIdList: [ + 1000101, + 1000112, + 1000113, + 1000201, + 1000202, + 1000204, + 1000301, + 1000401, + 1000402, + 1000410, + 1000510, + 1000601, + 1010301, + 1010302, + 1010401, + 1010403, + 1010701, + 1011403, + 1010202, + 1010902, + 1011102, + 4010101 + ], missionEventStatusList: [], subMissionStatusList: [], unfinishedMainMissionIdList: [] @@ -19,7 +42,7 @@ export default async function handle(session: Session, packet: Packet) { dataObj.missionEventStatusList.push({ id: id, progress: 0, - status: MissionStatus.MISSION_DOING + status: MissionStatus.MISSION_FINISH }); }); @@ -27,7 +50,7 @@ export default async function handle(session: Session, packet: Packet) { dataObj.subMissionStatusList.push({ id: id, progress: 0, - status: MissionStatus.MISSION_DOING + status: MissionStatus.MISSION_FINISH }); });