Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb

This commit is contained in:
hujiabin 2024-01-25 16:04:19 +08:00
commit b982c812d9
2 changed files with 7 additions and 40 deletions

View File

@ -125,45 +125,7 @@ class BattleController extends BaseAuthedController {
$this->_rspErr(1, 'Without this player1'); $this->_rspErr(1, 'Without this player1');
return; 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( $this->_rspData(array(
"items" => $item
)); ));
} }

View File

@ -37,9 +37,14 @@ class BoxController extends BaseAuthedController {
public function requestReward() public function requestReward()
{ {
$this->_rspData(array( $this->_rspData(array(
"item_list" => array() "item_list" => array(
'item_id' => V_ITEM_GOLD,
1000
)
)); ));
$payload = '';
return; return;
/*
$userInfo = $this->_getOrmUserInfo(); $userInfo = $this->_getOrmUserInfo();
if (!$userInfo) { if (!$userInfo) {
$this->_rspErr(1, 'Without this player1'); $this->_rspErr(1, 'Without this player1');
@ -84,7 +89,7 @@ class BoxController extends BaseAuthedController {
} }
$this->_rspData(array( $this->_rspData(array(
"items" => $item "items" => $item
)); ));*/
} }
} }