From 90f0b63a232d6378275f6aad9cfd8eff5f229a4f Mon Sep 17 00:00:00 2001 From: hanshino Date: Mon, 5 Feb 2024 18:17:48 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=B9=81=E9=AB=94=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E7=BF=BB=E8=AD=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/locales/zh_tw.json | 4 +++- app/src/controller/application/JobController.js | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/locales/zh_tw.json b/app/locales/zh_tw.json index aefa4d0a..3353a978 100644 --- a/app/locales/zh_tw.json +++ b/app/locales/zh_tw.json @@ -262,7 +262,9 @@ "swordman_start_job_mission": "已開始進行劍士的轉職任務,限時 10 分鐘", "mage_start_job_mission": "已開始進行法師的轉職任務,限時 10 分鐘", "mage_start_job_mission_help": "那麼就先從火元素開始詠唱吧~", - "thief_start_job_mission": "已開始進行盜賊的轉職任務,限時 10 分鐘,請摸走三個有價值的錢包" + "thief_start_job_mission": "已開始進行盜賊的轉職任務,限時 10 分鐘", + "thief_start_job_mission_help": "那麼找出三個有價值的錢包吧~", + "change_job_level_limit": "至少要到達 30 等才能進行轉職" } }, "advancement": { diff --git a/app/src/controller/application/JobController.js b/app/src/controller/application/JobController.js index d25c05f3..46bae153 100644 --- a/app/src/controller/application/JobController.js +++ b/app/src/controller/application/JobController.js @@ -119,7 +119,10 @@ exports.startThiefChangeJobMission = async function (context) { context.replyText(i18n.__("message.rpg.thief_start_job_mission"), { sender: { name: "系統提示" }, }); - return await context.replyFlex("盜賊轉職考驗", JobTemplate.thiefMission); + context.replyFlex("盜賊轉職考驗", JobTemplate.thiefMission); + return await context.replyText(i18n.__("message.rpg.thief_start_job_mission_help"), { + sender: thiefTeacher, + }); }; /** @@ -361,12 +364,17 @@ async function isUserCanAcceptMission(context) { const { userId } = context.event.source; const { changeJobMission } = context.state; - const { job_class_advancement: classAdv } = await minigameService.findByUserId(userId); + const { job_class_advancement: classAdv, level = 0 } = await minigameService.findByUserId(userId); if (classAdv !== 0) { context.replyText(i18n.__("message.rpg.change_job_already")); return false; } + if (level < 30) { + context.replyText(i18n.__("message.rpg.change_job_level_limit")); + return false; + } + const now = moment(); if (changeJobMission && now.isBefore(changeJobMission.endTime)) { return false;