버그 수정
This commit is contained in:
@@ -278,7 +278,11 @@ abstract class BaseCommand{
|
|||||||
return $this->reasonNoPermissionToReserve;
|
return $this->reasonNoPermissionToReserve;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->permissionConstraints === null){
|
if($this->cachedPermissionToReserve){
|
||||||
|
return $this->reasonNoPermissionToReserve;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$this->permissionConstraints){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,7 +308,7 @@ abstract class BaseCommand{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function canDisplay():bool{
|
public function canDisplay():bool{
|
||||||
return $this->hasPermissionToReserve();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMinConditionMet():?string{
|
public function testMinConditionMet():?string{
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ class che_NPC능동 extends Command\GeneralCommand{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost():array{
|
public function getCost():array{
|
||||||
return [0, 0];
|
return [0, 0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,12 +95,16 @@ class che_등용 extends Command\GeneralCommand{
|
|||||||
ConstraintHelper::ReqGeneralGold($reqGold),
|
ConstraintHelper::ReqGeneralGold($reqGold),
|
||||||
ConstraintHelper::ReqGeneralRice($reqRice),
|
ConstraintHelper::ReqGeneralRice($reqRice),
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->destGeneralObj->getVar('officer_level') == 12){
|
if($this->destGeneralObj->getVar('officer_level') == 12){
|
||||||
$this->fullConditionConstraints[] = ConstraintHelper::AlwaysFail('군주에게는 등용장을 보낼 수 없습니다.');
|
$this->fullConditionConstraints[] = ConstraintHelper::AlwaysFail('군주에게는 등용장을 보낼 수 없습니다.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return $this->env['join_mode'] !== 'onlyRandom';
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost():array{
|
public function getCost():array{
|
||||||
$env = $this->env;
|
$env = $this->env;
|
||||||
if(!$this->isArgValid){
|
if(!$this->isArgValid){
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ class che_등용수락 extends Command\GeneralCommand{
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost():array{
|
public function getCost():array{
|
||||||
return [0, 0];
|
return [0, 0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,10 @@ class che_임관 extends Command\GeneralCommand{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return $this->env['join_mode'] !== 'onlyRandom';
|
||||||
|
}
|
||||||
|
|
||||||
protected function initWithArg()
|
protected function initWithArg()
|
||||||
{
|
{
|
||||||
$destGeneralID = $this->arg['destGeneralID']??null;
|
$destGeneralID = $this->arg['destGeneralID']??null;
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ class che_첩보 extends Command\GeneralCommand
|
|||||||
[$reqGold, $reqRice] = $this->getCost();
|
[$reqGold, $reqRice] = $this->getCost();
|
||||||
|
|
||||||
$this->minConditionConstraints = [
|
$this->minConditionConstraints = [
|
||||||
ConstraintHelper::NotOccupiedDestCity(),
|
|
||||||
ConstraintHelper::ReqGeneralGold($reqGold),
|
ConstraintHelper::ReqGeneralGold($reqGold),
|
||||||
ConstraintHelper::ReqGeneralRice($reqRice),
|
ConstraintHelper::ReqGeneralRice($reqRice),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class che_감축 extends Command\NationCommand{
|
|||||||
$env = $this->env;
|
$env = $this->env;
|
||||||
|
|
||||||
if($general->getNationID()===0){
|
if($general->getNationID()===0){
|
||||||
$this->permissionConstraints=[
|
$this->minConditionConstraints=[
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
];
|
];
|
||||||
$this->fullConditionConstraints=[
|
$this->fullConditionConstraints=[
|
||||||
|
|||||||
@@ -148,6 +148,10 @@ class che_불가침수락 extends Command\NationCommand
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost(): array
|
public function getCost(): array
|
||||||
{
|
{
|
||||||
return [0, 0];
|
return [0, 0];
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ class che_불가침파기수락 extends Command\NationCommand
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost(): array
|
public function getCost(): array
|
||||||
{
|
{
|
||||||
return [0, 0];
|
return [0, 0];
|
||||||
|
|||||||
@@ -110,6 +110,10 @@ class che_종전수락 extends Command\NationCommand
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDisplay():bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCost(): array
|
public function getCost(): array
|
||||||
{
|
{
|
||||||
return [0, 0];
|
return [0, 0];
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class che_증축 extends Command\NationCommand{
|
|||||||
$env = $this->env;
|
$env = $this->env;
|
||||||
|
|
||||||
if($general->getNationID()===0){
|
if($general->getNationID()===0){
|
||||||
$this->permissionConstraints=[
|
$this->minConditionConstraints=[
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
];
|
];
|
||||||
$this->fullConditionConstraints=[
|
$this->fullConditionConstraints=[
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class TurnExecutionHelper
|
|||||||
$general = $this->getGeneral();
|
$general = $this->getGeneral();
|
||||||
|
|
||||||
while(true){
|
while(true){
|
||||||
if($commandObj->hasFullConditionMet()){
|
if(!$commandObj->hasFullConditionMet()){
|
||||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||||
$failString = $commandObj->getFailString();
|
$failString = $commandObj->getFailString();
|
||||||
$text = "{$failString} <1>{$date}</>";
|
$text = "{$failString} <1>{$date}</>";
|
||||||
@@ -109,7 +109,7 @@ class TurnExecutionHelper
|
|||||||
$commandClassName = $commandObj->getName();
|
$commandClassName = $commandObj->getName();
|
||||||
|
|
||||||
while(true){
|
while(true){
|
||||||
if($commandObj->hasFullConditionMet()){
|
if(!$commandObj->hasFullConditionMet()){
|
||||||
$date = $general->getTurnTime($general::TURNTIME_HM);
|
$date = $general->getTurnTime($general::TURNTIME_HM);
|
||||||
$failString = $commandObj->getFailString();
|
$failString = $commandObj->getFailString();
|
||||||
$text = "{$failString} <1>{$date}</>";
|
$text = "{$failString} <1>{$date}</>";
|
||||||
|
|||||||
Reference in New Issue
Block a user