Skip to content

Commit

Permalink
Merge pull request #466 from hanshino:fix/job
Browse files Browse the repository at this point in the history
Update Traditional Chinese translation
  • Loading branch information
hanshino authored Feb 5, 2024
2 parents b657a6d + 90f0b63 commit a12a202
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/locales/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
12 changes: 10 additions & 2 deletions app/src/controller/application/JobController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
};

/**
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a12a202

Please sign in to comment.