This commit is contained in:
hujiabin 2023-04-03 15:38:45 +08:00
parent edb4db10ca
commit 2198bfc5b1
4 changed files with 40 additions and 40 deletions

View File

@ -81,8 +81,10 @@ class BaseAuthedController extends BaseController {
phpcommon\sendError(1001, 'session expiration');
die();
}
$this->_userLvRestriction();
}
$this->_userLvRestriction();
/*if (SERVER_ENV == _ONLINE) {
if (phpcommon\cmpVersion(getReqVal('_version', ''), '0.2.0') > 0) {
if (!$this->isWhiteList() || myself()->_getChannel() != BC_CHANNEL) {

View File

@ -38,22 +38,27 @@ class ChipPageController extends BaseAuthedController
public function addChipPage(){
$userInfo = $this->_getOrmUserInfo();
if (ChipPage::getCount() == 3){
if ($userInfo['level'] < \mt\LevelUp::USER_LEVEL_CHIP_PAGE1_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
$count = ChipPage::getCount();
switch ($count){
case 3 : {
if ($userInfo['level'] < \mt\LevelUp::USER_LEVEL_CHIP_PAGE1_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return ;
}
}
break;
case 4 : {
if ($userInfo['level'] < \mt\LevelUp::USER_LEVEL_CHIP_PAGE2_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return ;
}
};
break;
case 5 : {
$this->_rspErr(1,'Maximum');
return ;
}
}
if (ChipPage::getCount() == 4){
if ($userInfo['level'] < \mt\LevelUp::USER_LEVEL_CHIP_PAGE2_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return ;
}
}
if (ChipPage::getCount() == 5){
$this->_rspErr(1,'Maximum');
return ;
}
ChipPage::addChipPage();
$this->_rspOk();
}

View File

@ -106,8 +106,6 @@ class FragmentController extends BaseAuthedController
}
public function syntheticFragment(){
// $this->_rspOk();return;
$type = getReqVal('type', 0);
$params = getReqVal('params','');
$param = getReqVal('param','');

View File

@ -52,10 +52,10 @@ class TeamController extends BaseAuthedController {
//验证pve_instance_id合法性
if ($pveInstanceId){
// if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_PVE_MATCH_LIMIT){
// $this->_rspErr(1,'Not agreed terms');
// return;
// }
if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_PVE_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return;
}
$pveGame = \mt\PveGemini::get($pveInstanceId);
if (!$pveGame){
$this->_rspErr(1, 'pve_instance_id error');
@ -66,12 +66,12 @@ class TeamController extends BaseAuthedController {
return;
}
}
// if ($matchMode == self::MATCH_MODE_RANK){
// if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_RANK_MATCH_LIMIT){
// $this->_rspErr(1,'Not agreed terms');
// return;
// }
// }
if ($matchMode == self::MATCH_MODE_RANK){
if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_RANK_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return;
}
}
$userDto = User::toPreset($userDb);
$userDto['is_leader'] = 1;
$userDto['is_ready'] = 1;
@ -117,16 +117,11 @@ class TeamController extends BaseAuthedController {
return;
}
$userDb = $this->_getOrmUserInfo();
// if ($teamDb['match_mode'] == self::MATCH_MODE_RANK &&
// $userDb['level'] < \mt\LevelUp::USER_LEVEL_RANK_MATCH_LIMIT){
// $this->_rspErr(1,'Not agreed terms');
// return;
// }
// if ($teamDb['match_mode'] == self::MATCH_MODE_PVE &&
// $userDb['level'] < \mt\LevelUp::USER_LEVEL_PVE_MATCH_LIMIT){
// $this->_rspErr(1,'Not agreed terms');
// return;
// }
if ($teamDb['match_mode'] == self::MATCH_MODE_RANK &&
$userDb['level'] < \mt\LevelUp::USER_LEVEL_RANK_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return;
}
foreach ($teamDb['member_list'] as $member) {
if ($member['account_id'] == $this->_getAccountId()) {
@ -144,10 +139,10 @@ class TeamController extends BaseAuthedController {
$this->_rspErr(1, 'No challenge');
return;
}
// if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_PVE_MATCH_LIMIT){
// $this->_rspErr(1,'Not agreed terms');
// return;
// }
if ($userDb['level'] < \mt\LevelUp::USER_LEVEL_PVE_MATCH_LIMIT){
$this->_rspErr(1,'Not agreed terms');
return;
}
}
$userDto = User::toPreset($userDb);