fix: 세력일람 분석에서 자동수행턴을 반영하지 않는 버그 수정

This commit is contained in:
2022-01-27 04:12:09 +09:00
parent 0f9a9f40cb
commit 319ae449fd
2 changed files with 15 additions and 3 deletions
+2 -1
View File
@@ -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
View File
@@ -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;
}