diff --git a/webapp/controller/SoloController.class.php b/webapp/controller/SoloController.class.php index 8f05783..7c4ab81 100644 --- a/webapp/controller/SoloController.class.php +++ b/webapp/controller/SoloController.class.php @@ -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; }