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(), ]; }