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에서 }