From 3c28ceb7013b1f19b9b2cd1a5f3ca085840203dd Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Nov 2021 04:15:04 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20warning=20=EC=A0=9C=EA=B1=B0=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/TurnExecutionHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/sammo/TurnExecutionHelper.php b/hwe/sammo/TurnExecutionHelper.php index 24f862a3..b13058bb 100644 --- a/hwe/sammo/TurnExecutionHelper.php +++ b/hwe/sammo/TurnExecutionHelper.php @@ -267,7 +267,7 @@ class TurnExecutionHelper if ($general->getNPCType() >= 2){ $ai = new GeneralAI($turnObj->getGeneral()); } else { - $limitYearMonth = $general->getAuxVar('autorun_limit')??Util::joinYearMonth($startYear-2, $month); + $limitYearMonth = $general->getAuxVar('autorun_limit')??Util::joinYearMonth($year-2, $month); if(Util::joinYearMonth($year, $month) < $limitYearMonth){ $ai = new GeneralAI($turnObj->getGeneral()); } @@ -315,7 +315,7 @@ class TurnExecutionHelper $currentTurn = $general->getTurnTime(); $general->increaseVarWithLimit('myset', 3, null, 9); - if($autorun_user['limit_minutes'] && $general->getNPCType() < 2 && $hasReservedTurn){ + if(($autorun_user['limit_minutes']??false) && $general->getNPCType() < 2 && $hasReservedTurn){ $autorun_limit = Util::joinYearMonth($year, $month); $autorun_limit += intdiv($autorun_user['limit_minutes'], $turnterm);