argTest를 로직 순서에 맞게 변경
This commit is contained in:
@@ -23,6 +23,19 @@ use sammo\CityConst;
|
||||
class che_이동 extends Command\GeneralCommand{
|
||||
static protected $actionName = '이동';
|
||||
|
||||
protected function argTest():bool{
|
||||
if(!key_exists('destCityID', $this->arg)){
|
||||
return false;
|
||||
}
|
||||
if(!key_exists($this->arg['destCityID'], CityConst::all())){
|
||||
return false;
|
||||
}
|
||||
$this->arg = [
|
||||
'destCityID'=>$this->arg['destCityID']
|
||||
];
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
|
||||
$general = $this->generalObj;
|
||||
@@ -41,19 +54,6 @@ class che_이동 extends Command\GeneralCommand{
|
||||
];
|
||||
}
|
||||
|
||||
protected function argTest():bool{
|
||||
if(!key_exists('destCityID', $this->arg)){
|
||||
return false;
|
||||
}
|
||||
if(!key_exists($this->arg['destCityID'], CityConst::all())){
|
||||
return false;
|
||||
}
|
||||
$this->arg = [
|
||||
'destCityID'=>$this->arg['destCityID']
|
||||
];
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
$env = $this->env;
|
||||
return [$env['develcost'], 0];
|
||||
|
||||
Reference in New Issue
Block a user