1
This commit is contained in:
parent
aa675b886f
commit
8c67ec43ee
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once('mt/Parameter.php');
|
||||
require_once('mt/Drop.php');
|
||||
require_once('mt/Task.php');
|
||||
require_once('mt/Season.php');
|
||||
@ -103,15 +102,13 @@ class MissionController extends BaseAuthedController {
|
||||
$this->_rspErr(10, '服务器内部错误drop错误');
|
||||
return;
|
||||
}
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
$awardService = new services\AwardService();
|
||||
$this->_scatterDrop($dropMeta, $awardService, $propertyChgService);
|
||||
$this->_scatterDrop($dropMeta, $this->awardService, $this->propertyChgService);
|
||||
Mission::add($missionId);
|
||||
$missionDb = Mission::find($missionId);
|
||||
$missionDto = $this->getMissionDto($missionDb, $missionMeta);
|
||||
$this->_rspData(array(
|
||||
'award' => $awardService->toDto(),
|
||||
'property_chg' => $propertyChgService->toDto(),
|
||||
'award' => $this->awardService->toDto(),
|
||||
'property_chg' => $this->propertyChgService->toDto(),
|
||||
'mission_chg' => $missionDto
|
||||
));
|
||||
}
|
||||
@ -125,15 +122,20 @@ class MissionController extends BaseAuthedController {
|
||||
foreach ($missionMetaList as $missionMeta) {
|
||||
$missionDb = getXVal($missionHash, $missionMeta['id'], null);
|
||||
$missionDto = $this->getMissionDto($this->userInfo, $this->seasonDb, $missionDb, $missionMeta);
|
||||
array_push($missionDtoList, $missionDto);
|
||||
if ($missionDto['state'] == Mission::RECEIVEABLE_STATE) {
|
||||
array_push($missionDtoList, $missionDto);
|
||||
}
|
||||
}
|
||||
foreach ($missionDtoList as $missionDto) {
|
||||
$missionMeta = mt\Mission::get($missionDto['mission_id']);
|
||||
$dropMeta = mt\Drop::get($missionMeta['reward']);
|
||||
if ($dropMeta) {
|
||||
$this->_scatterDrop($dropMeta, $this->awardService, $this->propertyChgService);
|
||||
}
|
||||
}
|
||||
$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(),
|
||||
'award' => $this->awardService->toDto(),
|
||||
'property_chg' => $this->propertyChgService->toDto(),
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user