city의 officer를 general로 이동
This commit is contained in:
@@ -35,7 +35,7 @@ class AllowRebellion extends Constraint{
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$lord = $db->queryFirstRow('SELECT no, killturn, npc FROM general WHERE nation = %i AND level = 12', $nationID);
|
||||
$lord = $db->queryFirstRow('SELECT no, killturn, npc FROM general WHERE nation = %i AND officer_level = 12', $nationID);
|
||||
|
||||
if(!$lord){
|
||||
throw new MustNotBeReachedException('군주가 없음');
|
||||
|
||||
@@ -10,9 +10,9 @@ class BeChief extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!key_exists('level', $this->general)){
|
||||
if(!key_exists('officer_level', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require level in general");
|
||||
throw new \InvalidArgumentException("require officer_level in general");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -22,7 +22,7 @@ class BeChief extends Constraint{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
if($this->general['level'] > 4){
|
||||
if($this->general['officer_level'] > 4){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ class BeLord extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!key_exists('level', $this->general)){
|
||||
if(!key_exists('officer_level', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require level in general");
|
||||
throw new \InvalidArgumentException("require officer_level in general");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -22,7 +22,7 @@ class BeLord extends Constraint{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
if($this->general['level'] == 12){
|
||||
if($this->general['officer_level'] == 12){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ class NotCapital extends Constraint{
|
||||
throw new \InvalidArgumentException("require city in general");
|
||||
}
|
||||
|
||||
if(!key_exists('level', $this->general)){
|
||||
if(!key_exists('officer_level', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require level in general");
|
||||
throw new \InvalidArgumentException("require officer_level in general");
|
||||
}
|
||||
|
||||
if(!key_exists('capital', $this->nation)){
|
||||
@@ -36,7 +36,7 @@ class NotCapital extends Constraint{
|
||||
return true;
|
||||
}
|
||||
|
||||
if($this->arg && 2 <= $this->general['level'] && $this->general['level'] <= 4){
|
||||
if($this->arg && 2 <= $this->general['officer_level'] && $this->general['officer_level'] <= 4){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ class NotChief extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!key_exists('level', $this->general)){
|
||||
if(!key_exists('officer_level', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require level in general");
|
||||
throw new \InvalidArgumentException("require officer_level in general");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -22,7 +22,7 @@ class NotChief extends Constraint{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
if($this->general['level'] <= 4){
|
||||
if($this->general['officer_level'] <= 4){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ class NotLord extends Constraint{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!key_exists('level', $this->general)){
|
||||
if(!key_exists('officer_level', $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require level in general");
|
||||
throw new \InvalidArgumentException("require officer_level in general");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -22,7 +22,7 @@ class NotLord extends Constraint{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
if($this->general['level'] != 12){
|
||||
if($this->general['officer_level'] != 12){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class ReqGeneralCrewMargin extends Constraint{
|
||||
throw new \InvalidArgumentException("{$this->arg} is invalid crewtype");
|
||||
}
|
||||
|
||||
foreach(['leadership','strength','intel','crew','crewtype','nation','level'] as $key){
|
||||
foreach(['leadership','strength','intel','crew','crewtype','nation','officer_level'] as $key){
|
||||
if(!key_exists($key, $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException("require {$key} in general");
|
||||
|
||||
Reference in New Issue
Block a user