general_turn, nation_turn 대응
This commit is contained in:
@@ -123,6 +123,20 @@ class che_거병 extends Command\GeneralCommand{
|
||||
'gennum'=>1
|
||||
]);
|
||||
$nationID = DB::db()->insertId();
|
||||
$turnRows = [];
|
||||
foreach([12, 11] as $chiefLevel){
|
||||
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){
|
||||
$turnRows[] = [
|
||||
'nation_id'=>$nationID,
|
||||
'level'=>$chiefLevel,
|
||||
'turn_idx'=>$turnIdx,
|
||||
'action'=>'휴식',
|
||||
'arg'=>null,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
$db->insert('nation_turn', $turnRows);
|
||||
|
||||
refreshNationStaticInfo();
|
||||
|
||||
|
||||
@@ -278,6 +278,7 @@ class General implements iAction{
|
||||
$logger->pushGlobalActionLog($dyingMessage->getText());
|
||||
|
||||
$db->delete('general', 'no=%i', $generalID);
|
||||
$db->delete('general_turn', 'general_id=%i', $generalID);
|
||||
$this->updatedVar = [];
|
||||
|
||||
$db->update('nation', [
|
||||
|
||||
@@ -186,8 +186,7 @@ class ResetHelper{
|
||||
);
|
||||
|
||||
|
||||
$turntime = TimeUtil::now();
|
||||
$time = substr($turntime, 11, 2);
|
||||
$turntime = TimeUtil::now(true);
|
||||
if($sync == 0) {
|
||||
// 현재 시간을 1월로 맞춤
|
||||
$starttime = cutTurn($turntime, $turnterm);
|
||||
@@ -249,6 +248,17 @@ class ResetHelper{
|
||||
'killturn'=>9999,
|
||||
'crewtype'=>GameUnitConst::DEFAULT_CREWTYPE
|
||||
]);
|
||||
$generalID = $db->insertId();
|
||||
$turnRows = [];
|
||||
foreach(range(0, GameConst::$maxTurn - 1) as $turnIdx){
|
||||
$turnRows[] = [
|
||||
'general_id'=>$generalID,
|
||||
'turn_idx'=>$turnIdx,
|
||||
'action'=>'휴식',
|
||||
'arg'=>null,
|
||||
];
|
||||
}
|
||||
$db->insert('general_turn', $turnRows);
|
||||
}
|
||||
|
||||
foreach($env as $key=>$value){
|
||||
|
||||
@@ -341,6 +341,16 @@ class NPC{
|
||||
'dex40'=>$this->dex40,
|
||||
]);
|
||||
$this->generalID = $db->insertId();
|
||||
$turnRows = [];
|
||||
foreach(range(0, GameConst::$maxTurn - 1) as $turnIdx){
|
||||
$turnRows[] = [
|
||||
'general_id'=>$this->generalID,
|
||||
'turn_idx'=>$turnIdx,
|
||||
'action'=>'휴식',
|
||||
'arg'=>null,
|
||||
];
|
||||
}
|
||||
$db->insert('general_turn', $turnRows);
|
||||
|
||||
return true; //생성되었다.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user