From f003f38f7454be6da83fd99a09e199613cddd17d Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 11 May 2022 00:42:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=BC=EB=B6=80=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=20=EC=A1=B0=EC=82=AC=EA=B0=80=20=EC=A0=81=EC=9A=A9=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EB=B0=98?= =?UTF-8?q?=EC=98=81=20-=20=EC=9C=A0=EC=82=B0=20=EA=B4=80=EB=A6=AC=20=20?= =?UTF-8?q?=20-=20=EC=9C=A0=EB=8B=88=ED=81=AC=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B0=9B=EC=95=84=EC=98=A4=EB=8A=94=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=EC=88=98=EC=A0=95=20-=20=EC=9D=B8?= =?UTF-8?q?=EC=82=AC=EB=B6=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/PageInheritPoint.vue | 17 +++++++++++------ hwe/ts/bossInfo.ts | 21 ++++++++++++++------- hwe/v_inheritPoint.php | 1 + 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/hwe/ts/PageInheritPoint.vue b/hwe/ts/PageInheritPoint.vue index aaa11f91..a0086396 100644 --- a/hwe/ts/PageInheritPoint.vue +++ b/hwe/ts/PageInheritPoint.vue @@ -208,6 +208,7 @@ import _ from "lodash"; import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue"; import { SammoAPI } from "./SammoAPI"; import type { inheritBuffType } from "./defs/API/InheritAction"; +import * as JosaUtil from '@/util/JosaUtil'; type InheritanceType = | "previous" @@ -365,6 +366,7 @@ declare const availableUnique: Record< string, { title: string; + rawName: string; info: string; } >; @@ -427,8 +429,8 @@ export default defineComponent({ } const name = inheritBuffHelpText[buffKey].title; - - if (!confirm(`${name}를 ${level}등급으로 올릴까요? ${cost} 포인트가 소모됩니다.`)) { + const josaUl = JosaUtil.pick(name, '을'); + if (!confirm(`${name}${josaUl} ${level}등급으로 올릴까요? ${cost} 포인트가 소모됩니다.`)) { return; } @@ -497,8 +499,9 @@ export default defineComponent({ alert("유산 포인트가 부족합니다."); return; } - //TODO: JosaUtil - if (!confirm(`${cost} 포인트로 다음 전특을 ${specialWarName}(으)로 고정하겠습니까?`)) { + + const josaRo = JosaUtil.pick(specialWarName, '로'); + if (!confirm(`${cost} 포인트로 다음 전특을 ${specialWarName}${josaRo} 고정하겠습니까?`)) { return; } @@ -527,14 +530,16 @@ export default defineComponent({ alert(`잘못된 타입: ${this.specificUnique}`); return; } + const uniqueRawName = this.availableUnique[this.specificUnique].rawName ?? undefined; const amount = this.specificUniqueAmount; if (this.items.previous < amount) { alert("유산 포인트가 부족합니다."); return; } - //TODO: JosaUtil - if (!confirm(`${amount} 포인트로 ${uniqueName}(을)를 입찰하겠습니까?`)) { + + const josaUl = JosaUtil.pick(uniqueRawName, '을'); + if (!confirm(`${amount} 포인트로 ${uniqueName}${josaUl} 입찰하겠습니까?`)) { return; } diff --git a/hwe/ts/bossInfo.ts b/hwe/ts/bossInfo.ts index 637bb667..588ebc73 100644 --- a/hwe/ts/bossInfo.ts +++ b/hwe/ts/bossInfo.ts @@ -4,6 +4,7 @@ import { convertFormData } from '@util/convertFormData'; import type { InvalidResponse } from '@/defs'; import { unwrap_any } from '@util/unwrap_any'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; +import * as JosaUtil from '@/util/JosaUtil'; import 'bootstrap'; import 'select2/dist/js/select2.full.js' @@ -118,7 +119,8 @@ $(function () { return; } const generalName = $kickSelect.data('name'); - if (!confirm(`${generalName}를 추방하시겠습니까?`)) { + const josaUl = JosaUtil.pick(generalName, '을'); + if (!confirm(`${generalName}${josaUl} 추방하시겠습니까?`)) { return; } @@ -146,7 +148,7 @@ $(function () { alert(`추방하지 못했습니다. : ${result.reason}`); return; } - alert(`${generalName}를 추방했습니다.`); + alert(`${generalName}${josaUl} 추방했습니다.`); location.reload(); }); @@ -172,11 +174,13 @@ $(function () { return false; } } else if (generalOfficerLevel >= 5) { - if (!confirm(`이미 수뇌인 ${generalName}을(를) ${officerLevelText}직에 임명하시겠습니까?`)) { + const josaUl = JosaUtil.pick(generalName, '을'); + if (!confirm(`이미 수뇌인 ${generalName}${josaUl} ${officerLevelText}직에 임명하시겠습니까?`)) { return false; } } else { - if (!confirm(`${generalName}을(를) ${officerLevelText}직에 임명하시겠습니까?`)) { + const josaUl = JosaUtil.pick(generalName, '을'); + if (!confirm(`${generalName}${josaUl} ${officerLevelText}직에 임명하시겠습니까?`)) { return false; } } @@ -193,11 +197,13 @@ $(function () { return false; } } else if (generalOfficerLevel >= 5) { - if (!confirm(`수뇌인 ${generalName}을(를) ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { + const josaUl = JosaUtil.pick(generalName, '을'); + if (!confirm(`수뇌인 ${generalName}${josaUl} ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { return false; } } else { - if (!confirm(`${generalName}을(를) ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { + const josaUl = JosaUtil.pick(generalName, '을'); + if (!confirm(`${generalName}${josaUl} ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { return false; } } @@ -230,7 +236,8 @@ $(function () { } if (generalID) { - alert(`${generalName}을(를) 임명했습니다.`); + const josaUl = JosaUtil.pick(generalName, '을'); + alert(`${generalName}${josaUl} 임명했습니다.`); } else { alert('관직을 비웠습니다.'); } diff --git a/hwe/v_inheritPoint.php b/hwe/v_inheritPoint.php index c19a53ca..0ec24200 100644 --- a/hwe/v_inheritPoint.php +++ b/hwe/v_inheritPoint.php @@ -53,6 +53,7 @@ foreach (GameConst::$allItems as $subItems) { $itemObj = buildItemClass($itemKey); $availableUnique[$itemKey] = [ 'title' => $itemObj->getName(), + 'rawName' => $itemObj->getRawName(), 'info' => $itemObj->getInfo(), ]; }