KVStorage의 game namespace를 game_env로 '편의를 위해' 변경
This commit is contained in:
@@ -225,7 +225,7 @@ class DiplomaticMessage extends Message{
|
||||
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
$general = $db->queryFirstRow(
|
||||
'SELECT `name`, `level` FROM general WHERE `no`=%i AND nation=%i',
|
||||
|
||||
@@ -24,7 +24,7 @@ class Diplomacy{
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$srcNation = $db->queryFirstRow(
|
||||
'SELECT nation, `name`, `power`, capital, gold, rice, surlimit, color, `level` FROM nation WHERE nation=%i',
|
||||
$srcNationID
|
||||
|
||||
@@ -21,7 +21,7 @@ class Personnel{
|
||||
|
||||
public function __construct(int $nationID, int $senderID){
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game');
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$nation = $db->queryFirstRow(
|
||||
'SELECT nation, `name`, `level`, capital, scout FROM nation WHERE nation=%i',
|
||||
$nationID
|
||||
|
||||
@@ -89,7 +89,7 @@ class ResetHelper{
|
||||
}
|
||||
}
|
||||
|
||||
(KVStorage::getStorage($db, 'game'))->resetValues();
|
||||
(KVStorage::getStorage($db, 'game_env'))->resetValues();
|
||||
|
||||
return [
|
||||
'result'=>true
|
||||
@@ -131,6 +131,7 @@ class ResetHelper{
|
||||
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
$db->insert('plock', [
|
||||
'plock'=>1
|
||||
]);
|
||||
@@ -194,7 +195,9 @@ class ResetHelper{
|
||||
]);
|
||||
}
|
||||
|
||||
$db->insert('game', $env);
|
||||
foreach($env as $key=>$value){
|
||||
$gameStor->$key = $value;
|
||||
}
|
||||
|
||||
$scenarioObj->build($env);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user