fix: 내부 이벤트 중 deterministic seed를 사용하지 않는 부분 수정
This commit is contained in:
@@ -3,6 +3,8 @@ namespace sammo\Event\Action;
|
|||||||
|
|
||||||
use sammo\LiteHashDRBG;
|
use sammo\LiteHashDRBG;
|
||||||
use sammo\RandUtil;
|
use sammo\RandUtil;
|
||||||
|
use sammo\UniqueConst;
|
||||||
|
use sammo\Util;
|
||||||
|
|
||||||
//이전 RegNPC 함수를 EventAction으로 재구성
|
//이전 RegNPC 함수를 EventAction으로 재구성
|
||||||
class RegNPC extends \sammo\Event\Action{
|
class RegNPC extends \sammo\Event\Action{
|
||||||
@@ -26,7 +28,15 @@ class RegNPC extends \sammo\Event\Action{
|
|||||||
$text = ''
|
$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(
|
$this->npc=(new \sammo\Scenario\GeneralBuilder(
|
||||||
$rng,
|
$rng,
|
||||||
$name,
|
$name,
|
||||||
|
|||||||
@@ -26,8 +26,15 @@ class RegNeutralNPC extends \sammo\Event\Action{
|
|||||||
$char = '',
|
$char = '',
|
||||||
$text = ''
|
$text = ''
|
||||||
){
|
){
|
||||||
|
$rng = new RandUtil(new LiteHashDRBG(Util::simpleSerialize(
|
||||||
$rng = new RandUtil(new LiteHashDRBG(bin2hex(random_bytes(16))));
|
UniqueConst::$hiddenSeed,
|
||||||
|
'RegNeutralNPC',
|
||||||
|
$name,
|
||||||
|
$nationID,
|
||||||
|
$leadership,
|
||||||
|
$strength,
|
||||||
|
$intel,
|
||||||
|
)));
|
||||||
$this->npc=(new \sammo\Scenario\GeneralBuilder(
|
$this->npc=(new \sammo\Scenario\GeneralBuilder(
|
||||||
$rng,
|
$rng,
|
||||||
$name,
|
$name,
|
||||||
|
|||||||
Reference in New Issue
Block a user