1
This commit is contained in:
parent
7a7612547e
commit
f401426870
@ -235,13 +235,13 @@ class MissionController extends BaseAuthedController {
|
|||||||
public function sendOfferRewardMission()
|
public function sendOfferRewardMission()
|
||||||
{
|
{
|
||||||
$missionId = getReqVal('mission_id', 0);
|
$missionId = getReqVal('mission_id', 0);
|
||||||
$this->missionService->sendOfferRewardMission();
|
$this->missionService->sendOfferRewardMission($missionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function boostOfferRewardMission()
|
public function boostOfferRewardMission()
|
||||||
{
|
{
|
||||||
$missionId = getReqVal('mission_id', 0);
|
$missionId = getReqVal('mission_id', 0);
|
||||||
$this->missionService->boostOfferRewardMission();
|
$this->missionService->boostOfferRewardMission($missionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -609,16 +609,16 @@ class MissionService extends BaseService {
|
|||||||
{
|
{
|
||||||
$missionMeta = mt\Task::get($missionId);
|
$missionMeta = mt\Task::get($missionId);
|
||||||
if (!$missionMeta) {
|
if (!$missionMeta) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error');
|
myself()->_rspErr(1, 'mission_id parameter error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$mission = &$this->getOfferRewardMissionById($missionId);
|
$mission = &$this->getOfferRewardMissionById($missionId);
|
||||||
if (!$mission) {
|
if (!$mission) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error');
|
myself()->_rspErr(1, 'mission_id parameter error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($mission['sendtime'] > 0) {
|
if ($mission['sendtime'] > 0) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error2');
|
myself()->_rspErr(1, 'mission_id parameter error2');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$objects = explode('|', getReqVal('mission_id', 0));
|
$objects = explode('|', getReqVal('mission_id', 0));
|
||||||
@ -659,23 +659,23 @@ class MissionService extends BaseService {
|
|||||||
{
|
{
|
||||||
$mission = &$this->getOfferRewardMissionById($missionId);
|
$mission = &$this->getOfferRewardMissionById($missionId);
|
||||||
if (!$mission) {
|
if (!$mission) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error');
|
myself()->_rspErr(1, 'mission_id parameter error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($mission['sendtime'] > 0) {
|
if ($mission['sendtime'] > 0) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error2');
|
myself()->_rspErr(1, 'mission_id parameter error2');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$missionMeta = mt\Task::get($missionId);
|
$missionMeta = mt\Task::get($missionId);
|
||||||
if (!$missionMeta) {
|
if (!$missionMeta) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error2');
|
myself()->_rspErr(1, 'mission_id parameter error2');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->_getItemCount(V_ITEM_DIAMOND, $this->userInfo) < $missionMeta['boost']){
|
if (myself()->_getItemCount(V_ITEM_DIAMOND, $this->userInfo) < $missionMeta['boost']){
|
||||||
$this->_rspErr(2, 'diamond not enough');
|
myself()->_rspErr(2, 'diamond not enough');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->_decItems(array(
|
myself()->_decItems(array(
|
||||||
'item_id' => V_ITEM_DIAMOND,
|
'item_id' => V_ITEM_DIAMOND,
|
||||||
'item_num' => $missionMeta['boost']
|
'item_num' => $missionMeta['boost']
|
||||||
));
|
));
|
||||||
@ -715,11 +715,11 @@ class MissionService extends BaseService {
|
|||||||
$missionId = $missionMeta['mission_id'];
|
$missionId = $missionMeta['mission_id'];
|
||||||
$mission = &$this->getOfferRewardMissionById($missionId);
|
$mission = &$this->getOfferRewardMissionById($missionId);
|
||||||
if (!$mission) {
|
if (!$mission) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error');
|
myself()->_rspErr(1, 'mission_id parameter error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($mission['sendtime'] > 0) {
|
if ($mission['sendtime'] > 0) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error2');
|
myself()->_rspErr(1, 'mission_id parameter error2');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->removeOfferRewardMission($missionId);
|
$this->removeOfferRewardMission($missionId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user