adjust
This commit is contained in:
parent
cb65cf2100
commit
8cbef41006
@ -144,7 +144,7 @@ class SoloController
|
||||
$updatedb = false;
|
||||
$offlinehours = $solorow['offline'];
|
||||
if ($solorow['medals'] < $medalsgrowlimit && $medalsecs + $solorow['lastredeem'] <= $nowtime) { //结算体力自然增长
|
||||
$addmedals = ($nowtime - $solorow['lastredeem']) / $medalsecs;
|
||||
$addmedals = intval(($nowtime - $solorow['lastredeem']) / $medalsecs);
|
||||
$lastredeem = $solorow['lastredeem'] + $addmedals * $medalsecs;
|
||||
$medals = $addmedals + $solorow['medals'];
|
||||
$updatedb = true;
|
||||
@ -154,8 +154,8 @@ class SoloController
|
||||
}
|
||||
|
||||
if ($lastoffline + 3600 <= $nowtime) {
|
||||
$offlinehours += ($nowtime - $lastoffline) / 3600;
|
||||
$offlinelimit = intval(metatable\getParameterById(OFFLINE_LIMIT)['param_value']) + $privilege->getOfflineLimitPlus($account_id);
|
||||
$offlinehours += intval(($nowtime - $lastoffline) / 3600);
|
||||
$offlinelimit = intval(metatable\getParameterById(OFFLINE_LIMIT)['param_value'] + $privilege->getOfflineLimitPlus($account_id));
|
||||
if ($offlinehours > $offlinelimit) {
|
||||
$offlinehours = $offlinelimit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user