diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index fbe2f2d9..6eaa7857 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -58,9 +58,9 @@ class UserController extends BaseAuthedController { //测试服 if (!$userInfo) { $this->createNewUserV2($userName); - $this->addChip(); //测试需要,上线要删除 - $this->addFragmentBox(); //测试需要,上线要删除 $this->_addFreeItem(); //测试需要,上线要删除 + $this->addFragmentBox(); //测试需要,上线要删除 + $this->addChip(); //测试需要,上线要删除 $userInfo = $this->_getOrmUserInfo(); $this->_setV(TN_RANK_STATUS, 0, 1); } diff --git a/webapp/mt/ChipAttr.php b/webapp/mt/ChipAttr.php index 2397e90e..7674b4c1 100644 --- a/webapp/mt/ChipAttr.php +++ b/webapp/mt/ChipAttr.php @@ -108,15 +108,17 @@ class ChipAttr { private static function _randomNum($itemMeta,$chip_grade,$chipList){ $attr_pool = array(); array_push($attr_pool,self::getAttrPool(self::getAttrByItemId($itemMeta['id']))); - if ($chip_grade>=3&&$chip_grade<5){ - $num = 1; - } - if ($chip_grade>=5){ - $num = 2; - } - for ($i=1;$i<=$num;$i++){ - $attr = $chipList[ array_rand($chipList)]; - array_push($attr_pool,self::getAttrPool($attr)); + if ($chip_grade>=3){ + if ($chip_grade<5){ + $num = 1; + } + if ($chip_grade>=5){ + $num = 2; + } + for ($i=1;$i<=$num;$i++){ + $attr = $chipList[ array_rand($chipList)]; + array_push($attr_pool,self::getAttrPool($attr)); + } } return $attr_pool ; }