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); }