1
This commit is contained in:
parent
06d3f07634
commit
544b2d855c
@ -86,8 +86,7 @@ class MissionService extends BaseService {
|
|||||||
'refreshtime' => 0
|
'refreshtime' => 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// print_r($this->offerRewartdMission);die;
|
if (myself()->_getNowTime() - $this->offerRewartdMission['refreshtime'] >= 86400){
|
||||||
if (myself()->_getDaySeconds(myself()->_getNowTime()) - $this->offerRewartdMission['refreshtime'] >= 86400){
|
|
||||||
$this->refreshOfferRewardMission();
|
$this->refreshOfferRewardMission();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -591,11 +590,11 @@ class MissionService extends BaseService {
|
|||||||
}
|
}
|
||||||
$metas = mt\Task::getOfferRewardMissions
|
$metas = mt\Task::getOfferRewardMissions
|
||||||
($this->offerRewartdMission['missions']);
|
($this->offerRewartdMission['missions']);
|
||||||
if (count($metas) < $wantedRefreshMissionNum) {
|
// if (count($metas) < $wantedRefreshMissionNum) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
$count = count($metas)>=5 ? 5 : count($metas);
|
||||||
foreach (array_rand($metas, 5) as $key) {
|
foreach (array_rand($metas, $count) as $key) {
|
||||||
$meta = $metas[$key];
|
$meta = $metas[$key];
|
||||||
if ($this->getMissionsCount() >=
|
if ($this->getMissionsCount() >=
|
||||||
$wantedRefreshMissionNum) {
|
$wantedRefreshMissionNum) {
|
||||||
@ -616,8 +615,6 @@ class MissionService extends BaseService {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// unset($this->offerRewartdMission['missions']);
|
|
||||||
// print_r($this->offerRewartdMission['missions']);die;
|
|
||||||
$this->offerRewartdMission['refreshtime'] = myself()->_getDaySeconds(myself()->_getNowTime());
|
$this->offerRewartdMission['refreshtime'] = myself()->_getDaySeconds(myself()->_getNowTime());
|
||||||
$this->saveOfferRewardMission();
|
$this->saveOfferRewardMission();
|
||||||
}
|
}
|
||||||
@ -630,8 +627,6 @@ class MissionService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// print_r(json_encode($this->offerRewartdMission));die;
|
|
||||||
|
|
||||||
// $metas = mt\Task::getOfferRewardMissions
|
// $metas = mt\Task::getOfferRewardMissions
|
||||||
// ($this->offerRewartdMission['missions']);
|
// ($this->offerRewartdMission['missions']);
|
||||||
// $selectMeta = null;
|
// $selectMeta = null;
|
||||||
@ -680,6 +675,13 @@ 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['awards'][0].= ':'.$this->calcCegPreview($mission['objects']);
|
||||||
|
if (count($mission['objects']) > 0){
|
||||||
|
$missionDto['awards'][1].=':'.'1' ;
|
||||||
|
}else{
|
||||||
|
$missionDto['awards'][1].=':'.'0' ;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user