버그 수정
This commit is contained in:
@@ -187,8 +187,10 @@ if($city['trade'] === null) {
|
|||||||
$city['trade'] = "- ";
|
$city['trade'] = "- ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
|
||||||
$generals = $db->query(
|
$generals = $db->query(
|
||||||
'SELECT npc,defence_train,no,picture,imgsvr,name,injury,leadership,strength,intel,officer_level,nation,crewtype,crew,train,atmos from general where city=%i order by name',
|
'SELECT %l from general where city=%i order by name',
|
||||||
|
Util::formatListOfBackticks($dbColumns),
|
||||||
$city['city']
|
$city['city']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+10
-11
@@ -2496,12 +2496,12 @@ class GeneralAI
|
|||||||
|
|
||||||
$candidateCities = [];
|
$candidateCities = [];
|
||||||
|
|
||||||
foreach($this->frontCities as $frontCity){
|
if(!$this->frontCities){
|
||||||
$cityCandidates[$frontCity['city']] = $frontCity['important'];
|
throw new \sammo\MustNotBeReachedException('attackable인데 frontCities가 없음');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$candidateCities){
|
foreach($this->frontCities as $frontCity){
|
||||||
return null;
|
$candidateCities[$frontCity['city']] = $frontCity['important'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmd = buildGeneralCommandClass('che_NPC능동', $this->general, $this->env, [
|
$cmd = buildGeneralCommandClass('che_NPC능동', $this->general, $this->env, [
|
||||||
@@ -2878,7 +2878,7 @@ class GeneralAI
|
|||||||
$backupCities = [];
|
$backupCities = [];
|
||||||
|
|
||||||
foreach ($db->query('SELECT * FROM city WHERE nation = %i', $nationID) as $nationCity) {
|
foreach ($db->query('SELECT * FROM city WHERE nation = %i', $nationID) as $nationCity) {
|
||||||
$nationCity['generals'] = [];
|
$nationCity['generals'] = new \ArrayObject();
|
||||||
$cityID = $nationCity['city'];
|
$cityID = $nationCity['city'];
|
||||||
$dev =
|
$dev =
|
||||||
($nationCity['agri'] + $nationCity['comm'] + $nationCity['secu'] + $nationCity['def'] + $nationCity['wall']) /
|
($nationCity['agri'] + $nationCity['comm'] + $nationCity['secu'] + $nationCity['def'] + $nationCity['wall']) /
|
||||||
@@ -2889,17 +2889,16 @@ class GeneralAI
|
|||||||
$nationCity['important'] = 1;
|
$nationCity['important'] = 1;
|
||||||
|
|
||||||
if($nationCity['supply']){
|
if($nationCity['supply']){
|
||||||
$supplyCities[$cityID] = &$nationCity;
|
$supplyCities[$cityID] = $nationCity;
|
||||||
}
|
}
|
||||||
if($nationCity['front']){
|
if($nationCity['front']){
|
||||||
$frontCities[$cityID] = &$nationCity;
|
$frontCities[$cityID] = $nationCity;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$backupCities[$cityID] = &$nationCity;
|
$backupCities[$cityID] = $nationCity;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nationCities[$cityID] = &$nationCity;
|
$nationCities[$cityID] = $nationCity;
|
||||||
unset($nationCity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->nationCities = $nationCities;
|
$this->nationCities = $nationCities;
|
||||||
@@ -3348,7 +3347,7 @@ class GeneralAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function choosePromotion()
|
protected function choosePromotion()
|
||||||
|
|||||||
Reference in New Issue
Block a user