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');
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));
foreach ($objects as $val) {
$strings = explode(':', $val);
@ -620,15 +629,30 @@ class MissionService extends BaseService {
switch ($type) {
case 0:
{
array_push(
$mission['objects'],
array(
'type' => $type,
'id' => $id
)
);
}
break;
case 1:
{
array_push(
$mission['objects'],
array(
'type' => $type,
'id' => $id
)
);
}
break;
}
}
$mission['sendtime'] = myself()->_getNowTime();
myself()->_rspOk();
}
private function getOfferRewardMissionById($missionId)