중간 작업(getGeneralTurnBrief, turn0, npc_turn 작업 남음)

This commit is contained in:
2018-10-04 02:37:54 +09:00
parent ba574dda62
commit 303d8815e3
8 changed files with 264 additions and 181 deletions
+5 -1
View File
@@ -31,7 +31,7 @@ class General implements iAction{
protected $lastTurn = null;
protected $resultTurn = null;
public function __construct(array $raw, ?array $city, int $year, int $month){
public function __construct(array $raw, ?array $city, int $year, int $month, bool $fullConstruct=true){
//TODO: 밖에서 가져오도록 하면 버그 확률이 높아짐. 필요한 raw 값을 직접 구해야함.
$staticNation = getNationStaticInfo($raw['nation']);
@@ -39,6 +39,10 @@ class General implements iAction{
$this->raw = $raw;
$this->rawCity = $city;
if(!$fullConstruct){
return;
}
if(key_exists('last_turn', $this->raw)){
$this->lastTurn = LastTurn::fromJson($this->raw['last_turn']);
}