국방,임관권유문을 KVStorage로 분리

This commit is contained in:
2020-05-05 19:55:59 +09:00
parent 9a6b5d8e66
commit 562c69307e
10 changed files with 75 additions and 36 deletions
+5 -2
View File
@@ -3,6 +3,7 @@ namespace sammo\Scenario;
use \sammo\DB;
use \sammo\GameConst;
use \sammo\Util;
use \sammo\KVStorage;
use function \sammo\getNationChiefLevel;
class Nation{
@@ -82,6 +83,7 @@ class Nation{
}
$db = DB::db();
$nationStor = KVStorage::getStorage($db, 'nation_env');
$otherNations = $db->queryFirstColumn('SELECT nation FROM nation');
$db->insert('nation', [
@@ -98,7 +100,6 @@ class Nation{
'war'=>0,
'strategic_cmd_limit'=>24,
'surlimit'=>72,
'scoutmsg'=>$this->infoText,
'tech'=>$this->tech,
'level'=>$this->nationLevel,
'type'=>$type,
@@ -109,7 +110,9 @@ class Nation{
'nation'=>$this->id
], 'city IN %li', $cities);
}
$scoutKey = "nation_scout_msg_{$this->id}";
$nationStor->{$scoutKey} = $this->infoText;
$diplomacy = [];