fix: 거병 커맨드가 막힌 없는 경우 사전 거병도 불가
This commit is contained in:
@@ -60,6 +60,18 @@ class BuildNationCandidate extends \sammo\BaseAPI
|
|||||||
|
|
||||||
$generalObj = General::createGeneralObjFromDB($general['no']);
|
$generalObj = General::createGeneralObjFromDB($general['no']);
|
||||||
|
|
||||||
|
$validCmd = false;
|
||||||
|
foreach(GameConst::$availableGeneralCommand as $cmdList){
|
||||||
|
if(in_array('che_거병', $cmdList)){
|
||||||
|
$validCmd = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$validCmd){
|
||||||
|
return '거병할 수 없는 모드입니다.';
|
||||||
|
}
|
||||||
|
|
||||||
$cmd = new che_거병($generalObj, $env);
|
$cmd = new che_거병($generalObj, $env);
|
||||||
$failReason = $cmd->testFullConditionMet();
|
$failReason = $cmd->testFullConditionMet();
|
||||||
if ($failReason !== null) {
|
if ($failReason !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user