feat: -60 turnterm 가변턴
This commit is contained in:
@@ -283,6 +283,7 @@ class General extends GeneralBase implements iAction
|
||||
}
|
||||
$recwar = new \DateTimeImmutable($this->getVar('recent_war'));
|
||||
$turnNow = new \DateTimeImmutable($this->getVar('turntime'));
|
||||
|
||||
$secDiff = TimeUtil::DateIntervalToSeconds($recwar->diff($turnNow));
|
||||
|
||||
if ($secDiff <= 0) {
|
||||
@@ -290,6 +291,12 @@ class General extends GeneralBase implements iAction
|
||||
return 0;
|
||||
}
|
||||
|
||||
if($turnTerm == -60){
|
||||
$turnDiff = VarTurn60::calcTurnDiff($recwar, $turnNow);
|
||||
$this->calcCache[$cacheKey] = $turnDiff;
|
||||
return $turnDiff;
|
||||
}
|
||||
|
||||
$result = intdiv(Util::toInt($secDiff), 60 * $turnTerm);
|
||||
$this->calcCache[$cacheKey] = $result;
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user