1
This commit is contained in:
parent
453497b9fa
commit
b9e8097a22
Binary file not shown.
@ -19,6 +19,7 @@ require_once('mt/LevelUp.php');
|
||||
require_once('mt/Task.php');
|
||||
require_once('mt/Drop.php');
|
||||
require_once('mt/StarLevel.php');
|
||||
require_once('mt/BattlePass.php');
|
||||
|
||||
use phpcommon\SqlHelper;
|
||||
use models\Bag;
|
||||
@ -331,7 +332,7 @@ class BaseAuthedController extends BaseController {
|
||||
$userDb = $this->_safeGetOrmUserInfo();
|
||||
$newlV = $userDb['level'];
|
||||
$newExp = $userDb['exp']+$itemNum;
|
||||
\mt\LevelUp::getExpByLv($newlV,$newExp);
|
||||
\mt\BattlePass::getExpByLv($newlV,$newExp);
|
||||
// if ($newlV != $userDb['level']){
|
||||
// //协议通知前端等级变更
|
||||
// $propertyChgService->addUserLevelChg();
|
||||
|
@ -181,7 +181,7 @@ class MissionController extends BaseAuthedController {
|
||||
public function commitAll()
|
||||
{
|
||||
$type = getReqVal('type', 0);
|
||||
$missionMetaList = mt\Task::getCustomTypeMetaList($type, $this->missionService);
|
||||
$missionMetaList = mt\Task::getCustomTypeMetaList(0, $this->missionService);
|
||||
$missionHash = Mission::allToHash();
|
||||
$missionDtoList = array();
|
||||
$specMissionDto = null;
|
||||
@ -193,33 +193,38 @@ class MissionController extends BaseAuthedController {
|
||||
if ($missionDto['state'] == Mission::RECEIVEABLE_STATE) {
|
||||
array_push($missionDtoList, $missionDto);
|
||||
}
|
||||
if ($missionMeta['type'] == mt\Task::DAILY_MISSON_TYPE) {
|
||||
if ($missionMeta['subtype'] == mt\Task::DAILY_ACTIVE_VALUE_MISSON_SUBTYPE) {
|
||||
} else {
|
||||
if ($missionDto['state'] == Mission::NOT_FINISHED_STATE) {
|
||||
$notFinishedCount++;
|
||||
}
|
||||
if ($missionMeta['condition'] == mt\Task::FINISHED_ALL_DAILY_MISSION_COND &&
|
||||
$missionDto['state'] == Mission::NOT_FINISHED_STATE) {
|
||||
$specMissionDto = &$missionDto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($specMissionDto &&
|
||||
$specMissionDto['state'] == Mission::NOT_FINISHED_STATE &&
|
||||
$notFinishedCount <= 1) {
|
||||
$specMissionDto['state'] = Mission::RECEIVEABLE_STATE;
|
||||
array_push($missionDtoList, $missionDto);
|
||||
// if ($missionMeta['type'] == mt\Task::DAILY_MISSON_TYPE) {
|
||||
// if ($missionMeta['subtype'] == mt\Task::DAILY_ACTIVE_VALUE_MISSON_SUBTYPE) {
|
||||
// } else {
|
||||
// if ($missionDto['state'] == Mission::NOT_FINISHED_STATE) {
|
||||
// $notFinishedCount++;
|
||||
// }
|
||||
// if ($missionMeta['condition'] == mt\Task::FINISHED_ALL_DAILY_MISSION_COND &&
|
||||
// $missionDto['state'] == Mission::NOT_FINISHED_STATE) {
|
||||
// $specMissionDto = &$missionDto;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// if ($specMissionDto &&
|
||||
// $specMissionDto['state'] == Mission::NOT_FINISHED_STATE &&
|
||||
// $notFinishedCount <= 1) {
|
||||
// $specMissionDto['state'] = Mission::RECEIVEABLE_STATE;
|
||||
// array_push($missionDtoList, $missionDto);
|
||||
// }
|
||||
foreach ($missionDtoList as $missionDto) {
|
||||
$missionMeta = mt\Mission::get($missionDto['mission_id']);
|
||||
$missionMeta = mt\Task::get($missionDto['mission_id']);
|
||||
$dropMeta = mt\Drop::get($missionMeta['reward']);
|
||||
if ($dropMeta) {
|
||||
$dropSource = 'mission:' . $missionDto['mission_id'];
|
||||
$this->_scatterDrop($dropSource, $dropMeta, $this->awardService, $this->propertyChgService);
|
||||
Mission::add($missionDto['mission_id']);
|
||||
if ( $missionMeta['type'] == \mt\Task::DAILY_MISSON_TYPE &&
|
||||
! $missionMeta['subtype'] ){
|
||||
$this->_incDailyV(TN_DAILY_COMPLETE_TASK_NUM, 0, 1);
|
||||
}
|
||||
$this->procSpecMissionCommit($missionDto, $missionMeta);
|
||||
}
|
||||
// $this->procSpecMissionCommit($missionDto, $missionMeta);
|
||||
}
|
||||
$this->_rspData(array(
|
||||
'award' => $this->awardService->toDto(),
|
||||
|
@ -42,6 +42,8 @@ class PassController extends BaseAuthedController {
|
||||
$data = emptyReplace(json_decode($row['data'], true), array());
|
||||
$this->_rspData(array(
|
||||
'time_info' => array(
|
||||
'name'=>strtotime($this->currSeasonMeta['battlepass_name']),
|
||||
'sub_name'=>strtotime($this->currSeasonMeta['battlepass_sub_name']),
|
||||
'begin_time'=>strtotime($this->currSeasonMeta['begin_time']),
|
||||
'end_time'=>strtotime($this->currSeasonMeta['end_time'])
|
||||
),
|
||||
|
@ -113,6 +113,13 @@ class Task {
|
||||
array_push($metaList, $meta);
|
||||
}
|
||||
}
|
||||
}else if ($type == 0) {
|
||||
foreach ($missionService->getDailyMissions() as $mission) {
|
||||
$meta = self::get($mission['mission_id']);
|
||||
if ($meta) {
|
||||
array_push($metaList, $meta);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach (self::getMetaList() as $meta) {
|
||||
switch ($type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user