From ebf9b4b75d0986973a8ef8e2280923c8de6c7ed3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 30 Apr 2018 00:15:43 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=80=EC=83=81=20=EC=83=81=EC=84=B1?= =?UTF-8?q?=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=EC=83=88=20=EC=9E=A5=EC=88=98?= =?UTF-8?q?=EB=8A=94=20=EC=9E=AC=EC=95=BC=EC=9E=84.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Scenario/NPC.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hwe/sammo/Scenario/NPC.php b/hwe/sammo/Scenario/NPC.php index 54b13f87..80000859 100644 --- a/hwe/sammo/Scenario/NPC.php +++ b/hwe/sammo/Scenario/NPC.php @@ -86,10 +86,6 @@ class NPC{ public function build($env=[]){ //scenario에 life==1인 경우 수명 제한이 없어지는 모양. - $nationID = $this->nationID; - if(!\sammo\getNationStaticInfo($nationID)){ - $nationID = 0; - }; $isFictionMode = (Util::array_get($env['fiction'], 0)!=0); @@ -105,9 +101,21 @@ class NPC{ return false; //예약. } + $isNewGeneral = ($age == \sammo\GameConst::$adultAge); + + $nationID = $this->nationID; + if($isFictionMode && $isNewGeneral){ + $nationID = 0; + } + + if(!\sammo\getNationStaticInfo($nationID)){ + $nationID = 0; + }; + + $db = DB::db(); - if($age == \sammo\GameConst::$adultAge){ + if($isNewGeneral){ \sammo\pushWorldHistory(["●{$month}월:{$name}(이)가 성인이 되어 등장했습니다."], $year, $month); }