가오픈 merge
This commit is contained in:
@@ -130,7 +130,8 @@ class ResetHelper{
|
||||
int $npcmode,
|
||||
int $show_img_level,
|
||||
int $tournament_trig,
|
||||
string $join_mode
|
||||
string $join_mode,
|
||||
string $turntime
|
||||
):array{
|
||||
//FIXME: 분리할 것
|
||||
if(120 % $turnterm != 0){
|
||||
@@ -188,8 +189,6 @@ class ResetHelper{
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
$turntime = TimeUtil::now(true);
|
||||
if($sync == 0) {
|
||||
// 현재 시간을 1월로 맞춤
|
||||
$starttime = cutTurn($turntime, $turnterm);
|
||||
@@ -230,6 +229,7 @@ class ResetHelper{
|
||||
'develcost'=>$develcost,
|
||||
'turntime'=>$turntime,
|
||||
'starttime'=>$starttime,
|
||||
'opentime'=>$turntime,
|
||||
'turnterm'=>$turnterm,
|
||||
'killturn'=>$killturn,
|
||||
'genius'=>GameConst::$defaultMaxGenius,
|
||||
|
||||
@@ -292,7 +292,7 @@ class NPC{
|
||||
$level = $nationID?1:0;
|
||||
}
|
||||
|
||||
$turntime = \sammo\getRandTurn($env['turnterm']);
|
||||
$turntime = \sammo\getRandTurn($env['turnterm'], new \DateTimeImmutable($env['turntime']));
|
||||
|
||||
$killturn = ($this->death - $year) * 12 + mt_rand(0, 11);
|
||||
|
||||
|
||||
@@ -286,6 +286,11 @@ WHERE turntime < %s ORDER BY turntime ASC, `no` ASC',
|
||||
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
if(TimeUtil::now(true) < $gameStor->turntime){
|
||||
//턴 시각 이전이면 아무것도 하지 않음
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!tryLock()){
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user