fix: RegNPC 버그 수정, event handler 규격 버그 수정

This commit is contained in:
2021-03-19 18:09:53 +09:00
parent 7a939b7024
commit 911cb614a5
6 changed files with 17 additions and 7 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ namespace sammo\Event\Action;
//이전 RegNPC 함수를 EventAction으로 재구성
class RegNPC extends \sammo\Event\Action{
/** @var \sammo\Scenario\GeneralBuilder */
private $npc;
public function __construct(
@@ -22,7 +23,7 @@ class RegNPC extends \sammo\Event\Action{
$text = ''
){
return (new \sammo\Scenario\GeneralBuilder(
$this->npc=(new \sammo\Scenario\GeneralBuilder(
$name,
0,
$picturePath,
@@ -38,7 +39,7 @@ class RegNPC extends \sammo\Event\Action{
->setLifeSpan($birth, $death);
}
public function run($env=null){
public function run($env){
$result = $this->npc->fillRemainSpecAsZero($env)->build($env);
return [__CLASS__, $result];
}
+1 -1
View File
@@ -21,7 +21,7 @@ class RegNeutralNPC extends \sammo\Event\Action{
$char = '',
$text = ''
){
return (new \sammo\Scenario\GeneralBuilder(
$this->npc=(new \sammo\Scenario\GeneralBuilder(
$name,
0,
$picturePath,