버그 수정

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