From 174cef80c0dc1e85565ffe5afabbe2ad6d2bb944 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 2 Apr 2021 14:39:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=A5=EC=88=98=EC=88=98=20=EC=B9=B4?= =?UTF-8?q?=EC=9A=B4=ED=8A=B8=EC=97=90=20"=EC=9D=98=EB=B3=91=EC=9E=A5"?= =?UTF-8?q?=EC=9D=84=20=ED=8F=AC=ED=95=A8=ED=95=98=EC=97=AC=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=ED=95=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/join_post.php | 4 ++-- hwe/sammo/Command/General/che_랜덤임관.php | 4 ++-- hwe/sammo/Command/General/che_인재탐색.php | 2 +- hwe/sammo/Event/Action/RaiseInvader.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hwe/join_post.php b/hwe/join_post.php index 3e343c27..423ecbf6 100644 --- a/hwe/join_post.php +++ b/hwe/join_post.php @@ -185,10 +185,10 @@ if($relYear < 3){ $experience = 0; } else{ - $expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 5'); + $expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 4'); $targetGenOrder = Util::round($expGenCount * 0.2); $experience = $db->queryFirstField( - 'SELECT experience FROM general WHERE nation != 0 AND npc < 5 ORDER BY experience ASC LIMIT %i, 1', + 'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1', $targetGenOrder - 1 ); $experience *= 0.8; diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index cb683ec9..e0dd31f9 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -178,14 +178,14 @@ class che_랜덤임관 extends Command\GeneralCommand{ $generalsCnt = []; if($notIn){ $rawGeneralsCnt = $db->query( - 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 5 AND nation.gennum < %i AND nation.scout=0 AND nation.nation NOT IN %li GROUP BY general.nation, general.npc', + 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 4 AND nation.gennum < %i AND nation.scout=0 AND nation.nation NOT IN %li GROUP BY general.nation, general.npc', $genLimit, $notIn ); } else{ $rawGeneralsCnt = $db->query( - 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 5 AND nation.gennum < %i AND nation.scout=0 GROUP BY general.nation, general.npc', + 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 4 AND nation.gennum < %i AND nation.scout=0 GROUP BY general.nation, general.npc', $genLimit ); } diff --git a/hwe/sammo/Command/General/che_인재탐색.php b/hwe/sammo/Command/General/che_인재탐색.php index 6e943128..7548455c 100644 --- a/hwe/sammo/Command/General/che_인재탐색.php +++ b/hwe/sammo/Command/General/che_인재탐색.php @@ -178,7 +178,7 @@ class che_인재탐색 extends Command\GeneralCommand $avgGen = $db->queryFirstRow( 'SELECT avg(dedication) as ded,avg(experience) as exp, avg(dex1+dex2+dex3+dex4) as dex_t, avg(age) as age, avg(dex5) as dex5 - from general where npc < 5' + from general where npc < 4' ); $pickTypeList = ['무' => 6, '지' => 6, '무지' => 3]; diff --git a/hwe/sammo/Event/Action/RaiseInvader.php b/hwe/sammo/Event/Action/RaiseInvader.php index 3806b678..30ed30d7 100644 --- a/hwe/sammo/Event/Action/RaiseInvader.php +++ b/hwe/sammo/Event/Action/RaiseInvader.php @@ -99,14 +99,14 @@ class RaiseInvader extends \sammo\Event\Action if ($npcEachCount < 0) { $npcEachCount = - $db->queryFirstField('SELECT count(no) from general where npc < 5') / count($cities); + $db->queryFirstField('SELECT count(no) from general where npc < 4') / count($cities); $npcEachCount *= -1 * $this->npcEachCount; } $npcEachCount = max(10, Util::toInt($npcEachCount)); $specAvg = $this->specAvg; if ($specAvg < 0) { - $specAvg = $db->queryFirstField('SELECT avg((`leadership` + `strength` + `intel`)/3) from general where npc < 5'); + $specAvg = $db->queryFirstField('SELECT avg((`leadership` + `strength` + `intel`)/3) from general where npc < 4'); $specAvg *= -1 * $this->specAvg; } $specAvg = Util::toInt($specAvg); @@ -119,7 +119,7 @@ class RaiseInvader extends \sammo\Event\Action $dex = $this->dex; if ($dex < 0) { - $dex = $db->queryFirstField("SELECT avg((dex1 + dex2 + dex3 + dex4 + dex5)/5) from general where npc < 5"); + $dex = $db->queryFirstField("SELECT avg((dex1 + dex2 + dex3 + dex4 + dex5)/5) from general where npc < 4"); $dex *= -1 * $this->dex; } $dex = Util::toInt($dex);