버그 수정

랜덤임관, 모반시도
This commit is contained in:
2020-03-08 22:55:10 +09:00
parent 86e58437aa
commit 42bb937e68
2 changed files with 8 additions and 6 deletions
@@ -12,7 +12,9 @@ use \sammo\{
use function \sammo\{ use function \sammo\{
tryUniqueItemLottery tryUniqueItemLottery,
getInvitationList,
getNationStaticInfo
}; };
use \sammo\Constraint\Constraint; use \sammo\Constraint\Constraint;
@@ -24,17 +26,17 @@ use sammo\MustNotBeReachedException;
class che_랜덤임관 extends Command\GeneralCommand{ class che_랜덤임관 extends Command\GeneralCommand{
static protected $actionName = '랜덤임관'; static protected $actionName = '랜덤임관';
static public $reqArg = true; static public $reqArg = false;
protected function argTest():bool{ protected function argTest():bool{
if($this->arg === null){ if($this->arg === null){
return false; return true;
} }
$destNationIDList = $this->arg['destNationIDList']??null; $destNationIDList = $this->arg['destNationIDList']??null;
//null은 에러, []는 정상 //null은 에러, []는 정상
if($destNationIDList === null || !is_array($destNationIDList)){ if($destNationIDList === null || !is_array($destNationIDList)){
return false; return true;
} }
if($destNationIDList && Util::isDict($destNationIDList)){ if($destNationIDList && Util::isDict($destNationIDList)){
return false; return false;
@@ -69,7 +71,7 @@ class che_랜덤임관 extends Command\GeneralCommand{
ConstraintHelper::AllowJoinAction(), ConstraintHelper::AllowJoinAction(),
]; ];
if($this->arg['destNationIDList']){ if($this->arg['destNationIDList']??false){
$this->runnableConstraints[] = ConstraintHelper::ExistsAllowJoinNation($relYear, $this->arg['destNationIDList']); $this->runnableConstraints[] = ConstraintHelper::ExistsAllowJoinNation($relYear, $this->arg['destNationIDList']);
} }
} }
@@ -269,5 +271,4 @@ class che_랜덤임관 extends Command\GeneralCommand{
return true; return true;
} }
} }
@@ -33,6 +33,7 @@ class che_모반시도 extends Command\GeneralCommand{
$general = $this->generalObj; $general = $this->generalObj;
$this->setCity();
$this->setNation(); $this->setNation();
$this->runnableConstraints=[ $this->runnableConstraints=[