forked from devsam/core
진짜로 삭턴 버그 수정
This commit is contained in:
+5
-8
@@ -1619,9 +1619,8 @@ function checkTurn() {
|
||||
PreprocessCommand($general['no']);
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI');
|
||||
$reduce_turn = false;
|
||||
if(($general['npc'] >= 2 || ($autorun_user['limit_minutes']??false)) && DecodeCommand($general['turn0'])[0] == 0) {
|
||||
processAI($general['no']);
|
||||
$reduce_turn = true;
|
||||
if($general['npc'] >= 2 || ($autorun_user['limit_minutes']??false)) {
|
||||
processAI($general['no'], $reduce_turn);
|
||||
} // npc AI 처리
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand');
|
||||
processCommand($general['no'], $reduce_turn);
|
||||
@@ -1739,11 +1738,9 @@ function checkTurn() {
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand');
|
||||
PreprocessCommand($general['no']);
|
||||
$reduce_turn = false;
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI');
|
||||
if($general['npc'] >= 2 || ($autorun_user['limit_minutes']??false)) {
|
||||
processAI($general['no']);
|
||||
$reduce_turn = true;
|
||||
} // npc AI 처리
|
||||
if($general['npc'] >= 2 || ($autorun_user['limit_minutes']??false)) {
|
||||
processAI($general['no'], $reduce_turn);
|
||||
}
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand');
|
||||
processCommand($general['no'], $reduce_turn);
|
||||
//if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand');
|
||||
|
||||
+3
-1
@@ -260,7 +260,7 @@ function SetCrew($no, $nationID, $personal, $gold, $leader, $genType, $tech, $de
|
||||
return;
|
||||
}
|
||||
|
||||
function processAI($no) {
|
||||
function processAI($no, &$reduce_turn) {
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$connect=$db->get();
|
||||
@@ -339,6 +339,8 @@ function processAI($no) {
|
||||
return;
|
||||
}
|
||||
|
||||
$reduce_turn = true;
|
||||
|
||||
$allowedAction = new AIAllowedAction($general['npc'], $autorun_user['options']??[]);
|
||||
|
||||
$query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='{$general['city']}'";
|
||||
|
||||
Reference in New Issue
Block a user