Files
core/hwe/sammo/Event/Action/RegNPC.php
T
Hide_D d9f6f7956e 시나리오 json 파일에서 받아오는 규격 확장
국가를 'string'으로 표기 가능하도록 변경
전콘 번호를 'string'으로 표기 가능하도록 변경
2018-05-28 23:08:59 +09:00

46 lines
973 B
PHP

<?php
namespace sammo\Event\Action;
//이전 RegNPC 함수를 EventAction으로 재구성
class RegNPC extends \sammo\Event\Action{
private $npc;
public function __construct(
int $affinity,
string $name,
$picturePath,
int $nationID,
$locatedCity,
int $leadership,
int $power,
int $intel,
int $birth = 160,
int $death = 300,
$ego = null,
$char = '',
$text = ''
){
$this->npc = new \sammo\Scenario\NPC(
$affinity,
$name,
$picturePath,
$nationID,
$locatedCity,
$leadership,
$power,
$intel,
$birth,
$death,
$ego,
$char,
$text?:''
);
}
public function run($env=null){
$result = $this->npc->build($env);
return [__CLASS__, $result];
}
}