This commit is contained in:
hujiabin 2022-10-28 16:02:19 +08:00
parent 85cc5bfb32
commit dc5bb7cb77
2 changed files with 13 additions and 11 deletions

View File

@ -58,9 +58,9 @@ class UserController extends BaseAuthedController {
//测试服 //测试服
if (!$userInfo) { if (!$userInfo) {
$this->createNewUserV2($userName); $this->createNewUserV2($userName);
$this->addChip(); //测试需要,上线要删除
$this->addFragmentBox(); //测试需要,上线要删除
$this->_addFreeItem(); //测试需要,上线要删除 $this->_addFreeItem(); //测试需要,上线要删除
$this->addFragmentBox(); //测试需要,上线要删除
$this->addChip(); //测试需要,上线要删除
$userInfo = $this->_getOrmUserInfo(); $userInfo = $this->_getOrmUserInfo();
$this->_setV(TN_RANK_STATUS, 0, 1); $this->_setV(TN_RANK_STATUS, 0, 1);
} }

View File

@ -108,7 +108,8 @@ class ChipAttr {
private static function _randomNum($itemMeta,$chip_grade,$chipList){ private static function _randomNum($itemMeta,$chip_grade,$chipList){
$attr_pool = array(); $attr_pool = array();
array_push($attr_pool,self::getAttrPool(self::getAttrByItemId($itemMeta['id']))); array_push($attr_pool,self::getAttrPool(self::getAttrByItemId($itemMeta['id'])));
if ($chip_grade>=3&&$chip_grade<5){ if ($chip_grade>=3){
if ($chip_grade<5){
$num = 1; $num = 1;
} }
if ($chip_grade>=5){ if ($chip_grade>=5){
@ -118,6 +119,7 @@ class ChipAttr {
$attr = $chipList[ array_rand($chipList)]; $attr = $chipList[ array_rand($chipList)];
array_push($attr_pool,self::getAttrPool($attr)); array_push($attr_pool,self::getAttrPool($attr));
} }
}
return $attr_pool ; return $attr_pool ;
} }