From 94f5834b6169ec6462aefd98c911665424ebc72a Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 27 Jul 2022 19:44:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8B=9C=EB=82=98=EB=A6=AC=EC=98=A4=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=8B=9C=20=EC=84=B1=EA=B2=A9=EC=97=90=20cla?= =?UTF-8?q?ss=20prefix=20=EC=97=86=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Scenario/GeneralBuilder.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hwe/sammo/Scenario/GeneralBuilder.php b/hwe/sammo/Scenario/GeneralBuilder.php index ea375958..b0d352da 100644 --- a/hwe/sammo/Scenario/GeneralBuilder.php +++ b/hwe/sammo/Scenario/GeneralBuilder.php @@ -11,6 +11,9 @@ use \sammo\GameConst; use sammo\RandUtil; use \sammo\SpecialityHelper; use sammo\TimeUtil; + +use function sammo\getPersonalityClass; + class GeneralBuilder{ protected $generalID = null; @@ -161,7 +164,11 @@ class GeneralBuilder{ } public function setEgo(?string $ego):self{ - $this->ego = $ego; + if($ego === null){ + $this->ego = null; + return $this; + } + $this->ego = Util::getClassName(getPersonalityClass($ego)); return $this; }