등용 수락 변경, Aux 처리 추가
nations->aux.joinedNations dummyGeneral에 exp,ded 추가 scheme에서 nations 제거
This commit is contained in:
@@ -14,6 +14,16 @@ class AllowJoinDestNation extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!key_exists('auxVar', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require auxVar in general");
|
||||
}
|
||||
|
||||
if(!key_exists('joinedNations', $this->general['auxVar'])){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require joinedNations in general['auxVar']");
|
||||
}
|
||||
|
||||
if(!key_exists('scout', $this->destNation)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require scout in nation");
|
||||
@@ -24,11 +34,6 @@ class AllowJoinDestNation extends Constraint{
|
||||
throw new \InvalidArgumentException("require gennum in nation");
|
||||
}
|
||||
|
||||
if(!key_exists('nations', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require nations in nation");
|
||||
}
|
||||
|
||||
$this->relYear = $this->arg;
|
||||
|
||||
return true;
|
||||
@@ -50,7 +55,7 @@ class AllowJoinDestNation extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
$joinedNations = \sammo\Json::decode($this->general['nations']);
|
||||
$joinedNations = $this->general['auxVar']['joinedNations'];
|
||||
if(in_array($this->destNation['nation'], $joinedNations)){
|
||||
$this->reason = "이미 임관했었던 국가입니다.";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user