1
This commit is contained in:
parent
8df8112584
commit
e896ac0e55
@ -23,6 +23,38 @@ class Mission(object):
|
||||
['!mission_list2', [_common.Mission()], '任务列表2'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'sendOfferRewardMission',
|
||||
'desc': '派遣悬赏任务',
|
||||
'group': 'Mission',
|
||||
'url': 'webapp/index.php?c=Mission&a=sendOfferRewardMission',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['mission_id', 0, '任务id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['award', _common.Award(), '奖励信息'],
|
||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'boostOfferRewardMission',
|
||||
'desc': '加速悬赏任务',
|
||||
'group': 'Mission',
|
||||
'url': 'webapp/index.php?c=Mission&a=boostOfferRewardMission',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['mission_id', 0, '任务id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['award', _common.Award(), '奖励信息'],
|
||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'commitMission',
|
||||
'desc': '提交任务(领取奖励)',
|
||||
|
@ -111,6 +111,10 @@ class MissionController extends BaseAuthedController {
|
||||
$this->_rspErr(1, 'mission_id parameter error');
|
||||
return;
|
||||
}
|
||||
if (mt\Task::isOfferRewardMission($missionMeta)) {
|
||||
$this->commitOfferRewardMission($missionMeta);
|
||||
return;
|
||||
}
|
||||
$missionDb = Mission::find($missionId);
|
||||
$missionDto = $this->missionService->getMissionDto(
|
||||
$this->userInfo, $this->seasonDb, $missionDb, $missionMeta);
|
||||
@ -223,4 +227,19 @@ class MissionController extends BaseAuthedController {
|
||||
return $notFinishedCount == 1;
|
||||
}
|
||||
|
||||
private function commitOfferRewardMission($missionMeta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function sendOfferRewardMission()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function boostOfferRewardMission()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -114,6 +114,11 @@ class Task {
|
||||
return $metaList;
|
||||
}
|
||||
|
||||
public static function isOfferRewardMission($meta)
|
||||
{
|
||||
return $meta['type'] == self::OFFER_REWARD_MISSION_CUSTOM_TYPE;
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
{
|
||||
if (!self::$metaList) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user