This commit is contained in:
aozhiwei 2024-01-25 10:43:16 +08:00
parent 388b493b02
commit 720f086400
2 changed files with 1 additions and 38 deletions

View File

@ -125,45 +125,7 @@ class BattleController extends BaseAuthedController {
$this->_rspErr(1, 'Without this player1');
return;
}
// $ranked = getReqVal('pvp_personal_rank', 0);
$teamBattleDataService = new services\TameBattleDataService();
$teamBattleDataService->calStarNum();
$mode = getReqVal('room_mode', 0);
$item = array();
$currentMeta = \mt\ServerTaskTime::getCurrentTime();
if ($currentMeta &&
myself()->_getNowTime() >= strtotime($currentMeta['income_start_time']) &&
myself()->_getNowTime() < strtotime($currentMeta['income_end_time'])){
$hashRateService = new services\HashRateService();
$hashRateService->init();
$status = $hashRateService->getServerASKBoxMode();
switch ($status){
case \mt\ServerTask::MOBA_DROP_STATE :{
if ($mode == \services\TameBattleDataService::ROOM_MODE_PVP){
array_push($item,array(
"item_id" => 300001,
"item_num" => 1,
));
}
}
break;
case \mt\ServerTask::PVP_DROP_STATE : {
if ($mode == \services\TameBattleDataService::ROOM_MODE_MOBA){
array_push($item,array(
"item_id" => 300001,
"item_num" => 1,
));
}
}
break;
}
}
if ($item){
Bag::addItem($item['item_id'],$item['item_num']);
}
$this->_rspData(array(
"items" => $item
));
}

View File

@ -39,6 +39,7 @@ class BoxController extends BaseAuthedController {
$this->_rspData(array(
"item_list" => array()
));
$payload = '';
return;
$userInfo = $this->_getOrmUserInfo();
if (!$userInfo) {