From f9279de2ae213c9172f55a8e7f9cdc41cf648476 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 23 Mar 2022 23:40:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=97=90=EB=9F=AC=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EC=88=98=EC=A0=95=20-=20?= =?UTF-8?q?=EC=9E=84=EA=B4=80,=20=ED=95=98=EC=95=BC=20=EB=93=B1=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=83=91=EC=8A=B9=20=EB=B6=80=EB=8C=80=20=ED=95=B4?= =?UTF-8?q?=EC=A0=9C=20-=20=EC=99=B8=EA=B5=90=20=EC=84=9C=EC=8B=A0=20?= =?UTF-8?q?=ED=9A=8C=EC=88=98=EC=8B=9C=20warning=20-=20DummyGeneral?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=8A=A5=EB=A0=A5=EC=B9=98=20=EC=B0=B8?= =?UTF-8?q?=EC=A1=B0=20=EC=8B=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/j_diplomacy_rollback_letter.php | 4 +--- hwe/sammo/Command/General/che_임관.php | 2 ++ hwe/sammo/Command/General/che_하야.php | 12 ++++++++++++ hwe/sammo/DummyGeneral.php | 3 +++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/hwe/j_diplomacy_rollback_letter.php b/hwe/j_diplomacy_rollback_letter.php index 55446595..5649f252 100644 --- a/hwe/j_diplomacy_rollback_letter.php +++ b/hwe/j_diplomacy_rollback_letter.php @@ -41,8 +41,6 @@ if ($permission < 4) { ]); } -$reason = trim($reason); - $letter = $db->queryFirstRow('SELECT * FROM ng_diplomacy WHERE no=%i AND src_nation_id = %i AND state = \'proposed\'', $letterNo, $me['nation']); if(!$letter){ Json::die([ @@ -66,7 +64,7 @@ $unlimited = new \DateTime('9999-12-31'); $aux['reason'] = [ 'who'=>$me['no'], 'action'=>'cancelled', - 'reason'=>$reason + 'reason'=>'회수', ]; $db->update('ng_diplomacy', [ 'state'=>'cancelled', diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index c50447c5..5f5aae2a 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -162,6 +162,7 @@ class che_임관 extends Command\GeneralCommand $general->setVar('officer_level', 1); $general->setVar('officer_city', 0); $general->setVar('belong', 1); + $general->setVar('troop', 0); if ($this->destGeneralObj !== null) { $general->setVar('city', $this->destGeneralObj->getCityID()); @@ -200,6 +201,7 @@ class che_임관 extends Command\GeneralCommand $rawNationList = Util::convertArrayToDict($db->query('SELECT nation,`name`,color,gennum,`power` FROM nation'), 'nation'); $scoutMsgs = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'scout_msg'); + $nationList = []; foreach ($scoutMsgs as $destNationID => $scoutMsg) { $rawNationList[$destNationID]['scoutmsg'] = $scoutMsg; } diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 7bde8022..8da1abf9 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -62,6 +62,7 @@ class che_하야 extends Command\GeneralCommand{ $general = $this->generalObj; $date = $general->getTurnTime($general::TURNTIME_HM); + $generalID = $general->getID(); $generalName = $general->getName(); $josaYi = JosaUtil::pick($generalName, '이'); @@ -101,6 +102,17 @@ class che_하야 extends Command\GeneralCommand{ $general->setVar('officer_city', 0); $general->setVar('belong', 0); $general->setVar('makelimit', 12); + + //부대장일 경우 + if($general->getVar('troop') == $generalID){ + // 모두 탈퇴 + $db->update('general', [ + 'troop'=>0, + ], 'troop = %i', $generalID); + $db->delete('troop', 'troop_leader=%i', $generalID); + } + $general->setVar('troop', 0); + $general->increaseInheritancePoint('active_action', 1); $this->setResultTurn(new LastTurn(static::getName(), $this->arg)); diff --git a/hwe/sammo/DummyGeneral.php b/hwe/sammo/DummyGeneral.php index 64e20023..4470b2ea 100644 --- a/hwe/sammo/DummyGeneral.php +++ b/hwe/sammo/DummyGeneral.php @@ -16,6 +16,9 @@ class DummyGeneral extends General{ 'dedication'=>0, 'gold'=>0, 'rice'=>0, + 'leadership'=>10, + 'strength'=>10, + 'intel'=>10, ]; $this->raw = $raw;