From cd1ccfadaf37d96bb776b803047e357c81f9bd10 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 27 Jan 2022 04:12:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=84=B8=EB=A0=A5=EC=9D=BC=EB=9E=8C=20?= =?UTF-8?q?=EB=B6=84=EC=84=9D=EC=97=90=EC=84=9C=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=EC=88=98=ED=96=89=ED=84=B4=EC=9D=84=20=EB=B0=98=EC=98=81?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_kingdomList.php | 3 ++- hwe/ts/extKingdoms.ts | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/hwe/a_kingdomList.php b/hwe/a_kingdomList.php index 38a38a89..c4977075 100644 --- a/hwe/a_kingdomList.php +++ b/hwe/a_kingdomList.php @@ -10,7 +10,7 @@ $userID = Session::getUserID(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); - +$gameStor->cacheValues(['killturn', 'autorun_user', 'turnterm']); increaseRefresh("세력일람", 2); $me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID); @@ -33,6 +33,7 @@ if ($con >= 2) { + getValues(['killturn', 'autorun_user', 'turnterm'])) ?> diff --git a/hwe/ts/extKingdoms.ts b/hwe/ts/extKingdoms.ts index c03b13ad..51b5d72d 100644 --- a/hwe/ts/extKingdoms.ts +++ b/hwe/ts/extKingdoms.ts @@ -3,6 +3,13 @@ import { unwrap } from '@util/unwrap'; import axios from 'axios'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; +declare const killturn: number; +declare const autorun_user: undefined|null|{ + limit_minutes: number; + options: Record; +}; +declare const turnterm: number; + type KingdomGeneral = { html: JQuery, 장수명: string @@ -83,6 +90,10 @@ $(function () { } const runAnalysis = async function () { + let realKillturn = killturn; + if(autorun_user && autorun_user.limit_minutes){ + realKillturn -= autorun_user.limit_minutes / turnterm; + } const $content = $('#on_mover .content'); try { const response = await axios({ url: 'a_genList.php', method: 'get', responseType: 'text' }); @@ -197,7 +208,7 @@ $(function () { //const 종능 = val.통 + val.무 + val.지; console.log(val); if (종류명 != '무능' && 종류명 != '무지') { - if (val.삭턴 >= 80 && !val.NPC) { + if (val.삭턴 >= realKillturn && !val.NPC) { 전투유저장수 += 1; 통솔합 += val.통; @@ -214,7 +225,7 @@ $(function () { const $obj2 = $(''); $obj.html(val.장수명); - if (!val.NPC && val.삭턴 < 80) { + if (!val.NPC && val.삭턴 < realKillturn) { $obj.css('text-decoration', 'line-through'); 삭턴장수 += 1; }