This commit is contained in:
aozhiwei 2022-03-01 10:57:13 +08:00
parent 6ee65713b4
commit 6ff8fd28b0

View File

@ -612,6 +612,15 @@ class MissionService extends BaseService {
$this->_rspErr(1, 'mission_id parameter error'); $this->_rspErr(1, 'mission_id parameter error');
return; return;
} }
$mission = &$this->getOfferRewardMissionById($missionId);
if (!$mission) {
$this->_rspErr(1, 'mission_id parameter error');
return;
}
if ($mission['sendtime'] > 0) {
$this->_rspErr(1, 'mission_id parameter error2');
return;
}
$objects = explode('|', getReqVal('mission_id', 0)); $objects = explode('|', getReqVal('mission_id', 0));
foreach ($objects as $val) { foreach ($objects as $val) {
$strings = explode(':', $val); $strings = explode(':', $val);
@ -620,15 +629,30 @@ class MissionService extends BaseService {
switch ($type) { switch ($type) {
case 0: case 0:
{ {
array_push(
$mission['objects'],
array(
'type' => $type,
'id' => $id
)
);
} }
break; break;
case 1: case 1:
{ {
array_push(
$mission['objects'],
array(
'type' => $type,
'id' => $id
)
);
} }
break; break;
} }
} }
$mission['sendtime'] = myself()->_getNowTime();
myself()->_rspOk();
} }
private function getOfferRewardMissionById($missionId) private function getOfferRewardMissionById($missionId)