Scenario 세팅 과정에 문제 해결

SetNationFront 함수도 수정
This commit is contained in:
2018-03-31 16:06:24 +09:00
parent 71f5311b1d
commit 31d9bac59c
14 changed files with 65 additions and 76 deletions
+9 -6
View File
@@ -59,7 +59,7 @@ class Nation{
}, $this->cities);
$capital = \sammo\CityHelper::getCityByName($this->capital)['id'];
$type = \sammo\NationCharCall($this->$type);
$type = \sammo\NationCharCall($this->type);
$db = DB::db();
$otherNations = $db->queryFirstColumn('SELECT nation FROM nation');
@@ -81,29 +81,32 @@ class Nation{
'scoutmsg'=>$this->infoText,
'tech'=>$this->tech,
'totaltech'=>0,
'level'=>$this->level,
'level'=>$this->nationLevel,
'type'=>$type,
]);
$db->update('city', [
'nation'=>$this->id
], 'city IN (%li)', $cities);
], 'city IN %li', $cities);
$diplomacy = [];
foreach($otherNations as $nation){
$diplomacy[] = [
'me'=>$this->$id,
'me'=>$this->id,
'you'=>$nation,
'state'=>2
];
$diplomacy[] = [
'me'=>$nation,
'you'=>$this->$id,
'you'=>$this->id,
'state'=>2
];
}
$db->insert('diplomacy', $diplomacy);
if(count($diplomacy) > 0){
$db->insert('diplomacy', $diplomacy);
}
}
public function postBuild($env=[]){