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