1
This commit is contained in:
parent
eb49388adb
commit
e318d5b3fe
@ -115,7 +115,7 @@ class MissionController extends BaseAuthedController {
|
|||||||
public function commitMission()
|
public function commitMission()
|
||||||
{
|
{
|
||||||
$missionId = getReqVal('mission_id', 0);
|
$missionId = getReqVal('mission_id', 0);
|
||||||
$missionMeta = mt\Task::get($missionId);
|
$missionMeta = mt\Task::get($missionId);print_r($missionMeta);die;
|
||||||
if (!$missionMeta) {
|
if (!$missionMeta) {
|
||||||
$this->_rspErr(1, 'mission_id parameter error');
|
$this->_rspErr(1, 'mission_id parameter error');
|
||||||
return;
|
return;
|
||||||
@ -152,12 +152,12 @@ class MissionController extends BaseAuthedController {
|
|||||||
$this->_rspErr(3, 'Unknown mission status');
|
$this->_rspErr(3, 'Unknown mission status');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$dropMeta = mt\Drop::get($missionMeta['reward']);
|
// $dropMeta = mt\Drop::get($missionMeta['reward']);
|
||||||
if (!$dropMeta) {
|
// if (!$dropMeta) {
|
||||||
$this->_rspErr(10, 'server internal error:' . $missionMeta['reward']);
|
// $this->_rspErr(10, 'server internal error:' . $missionMeta['reward']);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
$this->_scatterDrop('mission:' . $missionId, $dropMeta, $this->awardService, $this->propertyChgService);
|
// $this->_scatterDrop('mission:' . $missionId, $dropMeta, $this->awardService, $this->propertyChgService);
|
||||||
$this->procSpecMissionCommit($missionDto, $missionMeta);
|
$this->procSpecMissionCommit($missionDto, $missionMeta);
|
||||||
Mission::add($missionId);
|
Mission::add($missionId);
|
||||||
$missionDb = Mission::find($missionId);
|
$missionDb = Mission::find($missionId);
|
||||||
|
@ -638,16 +638,10 @@ class MissionService extends BaseService {
|
|||||||
}
|
}
|
||||||
$missionDto['objects'] = $mission['objects'];
|
$missionDto['objects'] = $mission['objects'];
|
||||||
$missionDto['ceg_num'] = $this->calcCegPreview($mission['objects']);
|
$missionDto['ceg_num'] = $this->calcCegPreview($mission['objects']);
|
||||||
// $missionDto['boost_ceg_num'] = $this->calcBoostCeg($missionDto['ceg_num'],$missionDto['lefttime'],$missionMeta['time']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function calcBoostCeg($ceg,$time,$timeSum){
|
|
||||||
//悬赏加速所需CEG=MAX(ROUND(10%*当次悬赏任务获得CEG*当次已悬赏时间/当次悬赏所需时间,2),0.01)
|
|
||||||
return max(round(0.1*$ceg*$time/$timeSum,2),0.01);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function sendOfferRewardMission($missionId, $propertyChgService)
|
public function sendOfferRewardMission($missionId, $propertyChgService)
|
||||||
{
|
{
|
||||||
$missionMeta = mt\Task::get($missionId);
|
$missionMeta = mt\Task::get($missionId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user