1
This commit is contained in:
parent
83af3a1812
commit
f67e844d91
@ -46,6 +46,9 @@ class StarController extends BaseAuthedController {
|
|||||||
$missionStarDb = MissionStar::find($meta['season_id'],$meta['id']);
|
$missionStarDb = MissionStar::find($meta['season_id'],$meta['id']);
|
||||||
if ($this->userInfo['star_num'] >= $target && !$missionStarDb){
|
if ($this->userInfo['star_num'] >= $target && !$missionStarDb){
|
||||||
$state = MissionStar::RECEIVEABLE_STATE;
|
$state = MissionStar::RECEIVEABLE_STATE;
|
||||||
|
if (empty($meta['item_id'])){
|
||||||
|
$state = MissionStar::RECEIVED_STATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->userInfo['star_num'] >= $target && $missionStarDb){
|
if ($this->userInfo['star_num'] >= $target && $missionStarDb){
|
||||||
@ -77,6 +80,10 @@ class StarController extends BaseAuthedController {
|
|||||||
$this->_rspErr(1, 'objectives not achieved');
|
$this->_rspErr(1, 'objectives not achieved');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (empty($meta['item_id'])){
|
||||||
|
$this->_rspErr(1, 'No bonus claim');
|
||||||
|
return;
|
||||||
|
}
|
||||||
$missionStarDb = MissionStar::find($meta['season_id'],$missionId);
|
$missionStarDb = MissionStar::find($meta['season_id'],$missionId);
|
||||||
if ($missionStarDb){
|
if ($missionStarDb){
|
||||||
$this->_rspErr(1, "Can't get it again");
|
$this->_rspErr(1, "Can't get it again");
|
||||||
@ -109,7 +116,7 @@ class StarController extends BaseAuthedController {
|
|||||||
foreach ($collection as $meta){
|
foreach ($collection as $meta){
|
||||||
$target = getXVal($meta, 'need_star_num', 1);
|
$target = getXVal($meta, 'need_star_num', 1);
|
||||||
$missionStarDb = MissionStar::find($meta['season_id'],$meta['id']);
|
$missionStarDb = MissionStar::find($meta['season_id'],$meta['id']);
|
||||||
if ($this->userInfo['star_num'] >= $target && !$missionStarDb){
|
if ($this->userInfo['star_num'] >= $target && !$missionStarDb && !empty($meta['item_id'])){
|
||||||
//可领取
|
//可领取
|
||||||
$items = array(
|
$items = array(
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user