diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index 19783d99..dd9641e5 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -8,6 +8,7 @@ require_once('models/Gun.php'); require_once('models/Hero.php'); require_once('models/HeroSkin.php'); require_once('models/GunSkin.php'); +require_once('mt/Parameter.php'); use phpcommon\SqlHelper; use models\Bag; @@ -218,9 +219,13 @@ class BaseAuthedController extends BaseController { break; case V_ITEM_ACTIVE: { - $this->_incV(TN_ACTIVE, 0, $itemNum); - $this->_incV(TN_DAILY_ACTIVE, 0, $itemNum); - $this->_incV(TN_WEEKLY_ACTIVE, 0, $itemNum); + $addItem = max(0, mt\Parameter::getVal('activeness_limit', 0) - $this->_get(TN_DAILY_ACTIVE, 0)); + $addItem = min($addItem, $itemNum); + if ($addItem > 0) { + $this->_incV(TN_ACTIVE, 0, $itemNum); + $this->_incV(TN_DAILY_ACTIVE, 0, $itemNum); + $this->_incV(TN_WEEKLY_ACTIVE, 0, $itemNum); + } } break; default: