1
This commit is contained in:
parent
56475afaf0
commit
aa675b886f
@ -118,6 +118,23 @@ class MissionController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function commitAll()
|
public function commitAll()
|
||||||
{
|
{
|
||||||
|
$type = getReqVal('type', 0);
|
||||||
|
$missionMetaList = mt\Task::getCustomTypeMetaList($type);
|
||||||
|
$missionHash = Mission::allToHash();
|
||||||
|
$missionDtoList = array();
|
||||||
|
foreach ($missionMetaList as $missionMeta) {
|
||||||
|
$missionDb = getXVal($missionHash, $missionMeta['id'], null);
|
||||||
|
$missionDto = $this->getMissionDto($this->userInfo, $this->seasonDb, $missionDb, $missionMeta);
|
||||||
|
array_push($missionDtoList, $missionDto);
|
||||||
|
}
|
||||||
|
$propertyChgService = new services\PropertyChgService();
|
||||||
|
$awardService = new services\AwardService();
|
||||||
|
$this->_scatterDrop($dropMeta, $awardService, $propertyChgService);
|
||||||
|
Mission::add($missionId);
|
||||||
|
$this->_rspData(array(
|
||||||
|
'award' => $awardService->toDto(),
|
||||||
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user