This commit is contained in:
yangduo 2025-04-09 13:44:36 +08:00
parent cb65cf2100
commit 8cbef41006

View File

@ -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;
}