1
This commit is contained in:
parent
388b493b02
commit
720f086400
@ -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
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ class BoxController extends BaseAuthedController {
|
||||
$this->_rspData(array(
|
||||
"item_list" => array()
|
||||
));
|
||||
$payload = '';
|
||||
return;
|
||||
$userInfo = $this->_getOrmUserInfo();
|
||||
if (!$userInfo) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user