fix: 일부 자동 조사가 적용되지 않는 코드 반영

- 유산 관리
  - 유니크 이름 받아오는 코드 일부 수정
- 인사부
This commit is contained in:
2022-05-11 00:42:17 +09:00
parent 91b2cecb19
commit f003f38f74
3 changed files with 26 additions and 13 deletions
+11 -6
View File
@@ -208,6 +208,7 @@ import _ from "lodash";
import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue"; import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue";
import { SammoAPI } from "./SammoAPI"; import { SammoAPI } from "./SammoAPI";
import type { inheritBuffType } from "./defs/API/InheritAction"; import type { inheritBuffType } from "./defs/API/InheritAction";
import * as JosaUtil from '@/util/JosaUtil';
type InheritanceType = type InheritanceType =
| "previous" | "previous"
@@ -365,6 +366,7 @@ declare const availableUnique: Record<
string, string,
{ {
title: string; title: string;
rawName: string;
info: string; info: string;
} }
>; >;
@@ -427,8 +429,8 @@ export default defineComponent({
} }
const name = inheritBuffHelpText[buffKey].title; const name = inheritBuffHelpText[buffKey].title;
const josaUl = JosaUtil.pick(name, '을');
if (!confirm(`${name} ${level}등급으로 올릴까요? ${cost} 포인트가 소모됩니다.`)) { if (!confirm(`${name}${josaUl} ${level}등급으로 올릴까요? ${cost} 포인트가 소모됩니다.`)) {
return; return;
} }
@@ -497,8 +499,9 @@ export default defineComponent({
alert("유산 포인트가 부족합니다."); alert("유산 포인트가 부족합니다.");
return; return;
} }
//TODO: JosaUtil
if (!confirm(`${cost} 포인트로 다음 전특을 ${specialWarName}(으)로 고정하겠습니까?`)) { const josaRo = JosaUtil.pick(specialWarName, '로');
if (!confirm(`${cost} 포인트로 다음 전특을 ${specialWarName}${josaRo} 고정하겠습니까?`)) {
return; return;
} }
@@ -527,14 +530,16 @@ export default defineComponent({
alert(`잘못된 타입: ${this.specificUnique}`); alert(`잘못된 타입: ${this.specificUnique}`);
return; return;
} }
const uniqueRawName = this.availableUnique[this.specificUnique].rawName ?? undefined;
const amount = this.specificUniqueAmount; const amount = this.specificUniqueAmount;
if (this.items.previous < amount) { if (this.items.previous < amount) {
alert("유산 포인트가 부족합니다."); alert("유산 포인트가 부족합니다.");
return; return;
} }
//TODO: JosaUtil
if (!confirm(`${amount} 포인트로 ${uniqueName}(을)를 입찰하겠습니까?`)) { const josaUl = JosaUtil.pick(uniqueRawName, '을');
if (!confirm(`${amount} 포인트로 ${uniqueName}${josaUl} 입찰하겠습니까?`)) {
return; return;
} }
+14 -7
View File
@@ -4,6 +4,7 @@ import { convertFormData } from '@util/convertFormData';
import type { InvalidResponse } from '@/defs'; import type { InvalidResponse } from '@/defs';
import { unwrap_any } from '@util/unwrap_any'; import { unwrap_any } from '@util/unwrap_any';
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
import * as JosaUtil from '@/util/JosaUtil';
import 'bootstrap'; import 'bootstrap';
import 'select2/dist/js/select2.full.js' import 'select2/dist/js/select2.full.js'
@@ -118,7 +119,8 @@ $(function () {
return; return;
} }
const generalName = $kickSelect.data('name'); const generalName = $kickSelect.data('name');
if (!confirm(`${generalName}를 추방하시겠습니까?`)) { const josaUl = JosaUtil.pick(generalName, '을');
if (!confirm(`${generalName}${josaUl} 추방하시겠습니까?`)) {
return; return;
} }
@@ -146,7 +148,7 @@ $(function () {
alert(`추방하지 못했습니다. : ${result.reason}`); alert(`추방하지 못했습니다. : ${result.reason}`);
return; return;
} }
alert(`${generalName} 추방했습니다.`); alert(`${generalName}${josaUl} 추방했습니다.`);
location.reload(); location.reload();
}); });
@@ -172,11 +174,13 @@ $(function () {
return false; return false;
} }
} else if (generalOfficerLevel >= 5) { } else if (generalOfficerLevel >= 5) {
if (!confirm(`이미 수뇌인 ${generalName}을(를) ${officerLevelText}직에 임명하시겠습니까?`)) { const josaUl = JosaUtil.pick(generalName, '을');
if (!confirm(`이미 수뇌인 ${generalName}${josaUl} ${officerLevelText}직에 임명하시겠습니까?`)) {
return false; return false;
} }
} else { } else {
if (!confirm(`${generalName}을(를) ${officerLevelText}직에 임명하시겠습니까?`)) { const josaUl = JosaUtil.pick(generalName, '을');
if (!confirm(`${generalName}${josaUl} ${officerLevelText}직에 임명하시겠습니까?`)) {
return false; return false;
} }
} }
@@ -193,11 +197,13 @@ $(function () {
return false; return false;
} }
} else if (generalOfficerLevel >= 5) { } else if (generalOfficerLevel >= 5) {
if (!confirm(`수뇌인 ${generalName}을(를) ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { const josaUl = JosaUtil.pick(generalName, '을');
if (!confirm(`수뇌인 ${generalName}${josaUl} ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) {
return false; return false;
} }
} else { } else {
if (!confirm(`${generalName}을(를) ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) { const josaUl = JosaUtil.pick(generalName, '을');
if (!confirm(`${generalName}${josaUl} ${cityName} ${officerLevelText}직에 임명하시겠습니까?`)) {
return false; return false;
} }
} }
@@ -230,7 +236,8 @@ $(function () {
} }
if (generalID) { if (generalID) {
alert(`${generalName}을(를) 임명했습니다.`); const josaUl = JosaUtil.pick(generalName, '을');
alert(`${generalName}${josaUl} 임명했습니다.`);
} else { } else {
alert('관직을 비웠습니다.'); alert('관직을 비웠습니다.');
} }
+1
View File
@@ -53,6 +53,7 @@ foreach (GameConst::$allItems as $subItems) {
$itemObj = buildItemClass($itemKey); $itemObj = buildItemClass($itemKey);
$availableUnique[$itemKey] = [ $availableUnique[$itemKey] = [
'title' => $itemObj->getName(), 'title' => $itemObj->getName(),
'rawName' => $itemObj->getRawName(),
'info' => $itemObj->getInfo(), 'info' => $itemObj->getInfo(),
]; ];
} }