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