forked from devsam/core
fix: 세력일람 분석에서 자동수행턴을 반영하지 않는 버그 수정
This commit is contained in:
@@ -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) {
|
||||
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
|
||||
<?= WebUtil::printDist('ts', ['common', 'extKingdoms']) ?>
|
||||
<?= WebUtil::printStaticValues($gameStor->getValues(['killturn', 'autorun_user', 'turnterm'])) ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
+13
-2
@@ -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<string, number>;
|
||||
};
|
||||
declare const turnterm: number;
|
||||
|
||||
type KingdomGeneral = {
|
||||
html: JQuery<HTMLElement>,
|
||||
장수명: 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 = $('<span></span>');
|
||||
$obj.html(val.장수명);
|
||||
|
||||
if (!val.NPC && val.삭턴 < 80) {
|
||||
if (!val.NPC && val.삭턴 < realKillturn) {
|
||||
$obj.css('text-decoration', 'line-through');
|
||||
삭턴장수 += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user