diff --git a/hwe/sammo/Event/Action/RegNPC.php b/hwe/sammo/Event/Action/RegNPC.php index 8d3bc4a1..e4ac3f8a 100644 --- a/hwe/sammo/Event/Action/RegNPC.php +++ b/hwe/sammo/Event/Action/RegNPC.php @@ -3,6 +3,8 @@ namespace sammo\Event\Action; use sammo\LiteHashDRBG; use sammo\RandUtil; +use sammo\UniqueConst; +use sammo\Util; //이전 RegNPC 함수를 EventAction으로 재구성 class RegNPC extends \sammo\Event\Action{ @@ -26,7 +28,15 @@ class RegNPC extends \sammo\Event\Action{ $text = '' ){ - $rng = new RandUtil(new LiteHashDRBG(bin2hex(random_bytes(16)))); + $rng = new RandUtil(new LiteHashDRBG(Util::simpleSerialize( + UniqueConst::$hiddenSeed, + 'RegNPC', + $name, + $nationID, + $leadership, + $strength, + $intel, + ))); $this->npc=(new \sammo\Scenario\GeneralBuilder( $rng, $name, diff --git a/hwe/sammo/Event/Action/RegNeutralNPC.php b/hwe/sammo/Event/Action/RegNeutralNPC.php index 1c4d51ac..64c26e74 100644 --- a/hwe/sammo/Event/Action/RegNeutralNPC.php +++ b/hwe/sammo/Event/Action/RegNeutralNPC.php @@ -26,8 +26,15 @@ class RegNeutralNPC extends \sammo\Event\Action{ $char = '', $text = '' ){ - - $rng = new RandUtil(new LiteHashDRBG(bin2hex(random_bytes(16)))); + $rng = new RandUtil(new LiteHashDRBG(Util::simpleSerialize( + UniqueConst::$hiddenSeed, + 'RegNeutralNPC', + $name, + $nationID, + $leadership, + $strength, + $intel, + ))); $this->npc=(new \sammo\Scenario\GeneralBuilder( $rng, $name,