From 96bd755660a17f27570bf315dd3a386b1c520684 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 1 May 2020 15:27:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=A0=EC=96=91=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index 59fc0480..287c3837 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1670,12 +1670,16 @@ function nextRuler(General $general) { 'officer_level'=>12, 'officer_city'=>0, ], 'no=%i', $nextRulerID); + if($db->affectedRows()){ + throw new \RuntimeException('선양되지 않음'); + } $josaYi = JosaUtil::pick($nextRulerName, '이'); - $logger = $general->getLogger(); - $logger->pushGlobalHistoryLog("【유지】{$nextRulerName}{$josaYi} {$nationName}의 유지를 이어 받았습니다"); - $logger->pushGlobalHistoryLog("【유지】{$nextRulerName}{$josaYi} {$nationName}의 유지를 이어 받음."); + $nextRulerLogger = new ActionLogger($nextRulerID, $nationID, $year, $month); + $nextRulerLogger->pushGlobalHistoryLog("【유지】{$nextRulerName}{$josaYi} {$nationName}의 유지를 이어 받았습니다"); + $nextRulerLogger->pushGeneralHistoryLog("【유지】{$nextRulerName}{$josaYi} {$nationName}의 유지를 이어 받음."); + $nextRulerLogger->flush(); // 장수 삭제 및 부대처리는 checkTurn에서 }