diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 6b9ff90..4a2f6ec 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -370,12 +370,14 @@ class ShopController{ $coin_num = $addreward->getCoinNum($account_id); $diamond_num = $addreward->getDiamondNum($account_id); $adfree = $addreward->getAdfree($account_id); + $medals = $addreward->getMedals($account_id); echo json_encode(array( 'errcode' => 0, 'errmsg'=> '', 'coin_nums' => $coin_num, 'diamond_nums' => $diamond_num, 'adfree' => $adfree, + 'medals' => $medals, 'item_list' => $item_list, 'all_item_list' => $all_item_list, 'id' => $id, diff --git a/webapp/controller/SoloController.class.php b/webapp/controller/SoloController.class.php index d455d08..2b058ea 100644 --- a/webapp/controller/SoloController.class.php +++ b/webapp/controller/SoloController.class.php @@ -148,6 +148,9 @@ class SoloController $addmedals = intval(($nowtime - $solorow['lastredeem']) / $medalsecs); $lastredeem = $solorow['lastredeem'] + $addmedals * $medalsecs; $medals = $addmedals + $solorow['medals']; + if ($medals > $medalsgrowlimit) { + $medals = $medalsgrowlimit; + } $updatedb = true; } else { $medals = $solorow['medals'];