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; }