argTest를 로직 순서에 맞게 변경
This commit is contained in:
@@ -24,6 +24,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;
|
||||
@@ -47,19 +60,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{
|
||||
return [0, Util::round($this->general->getVar('crew')/100)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user