버그 수정

This commit is contained in:
2019-04-21 22:29:08 +09:00
parent a31c949734
commit dd81dcc9c6
12 changed files with 104 additions and 66 deletions
+16 -13
View File
@@ -75,6 +75,7 @@ class che_거병 extends Command\GeneralCommand{
$nationName = $generalName;
$cityName = $this->city['name'];
$logger = $general->getLogger();
$nationNameExistsCnt = $db->queryFirstField('SELECT count(*) FROM nation WHERE name = %s', $nationName);
if($nationNameExistsCnt){
@@ -86,6 +87,20 @@ class che_거병 extends Command\GeneralCommand{
$nationName = '㉥'.$nationName;
}
DB::db()->insert('nation', [
'name'=>$nationName,
'color'=>'#330000',
'gold'=>0,
'rice'=>GameConst::$baserice,
'rate'=>20,
'bill'=>100,
'strategic_cmd_limit'=>12,
'surlimit'=>72,
'type'=>0,
'gennum'=>1
]);
$nationID = DB::db()->insertId();
$diplomacyInit = [];
foreach(getAllNationStaticInfo() as $destNation){
@@ -106,19 +121,7 @@ class che_거병 extends Command\GeneralCommand{
}
$db->insert('diplomacy', $diplomacyInit);
DB::db()->insert('nation', [
'name'=>$nationName,
'color'=>'#330000',
'gold'=>0,
'rice'=>GameConst::$baserice,
'rate'=>20,
'bill'=>100,
'strategic_cmd_limit'=>12,
'surlimit'=>72,
'type'=>0,
'gennum'=>1
]);
$nationID = DB::db()->insertId();
$turnRows = [];
foreach([12, 11] as $chiefLevel){
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){