|
@@ -195,7 +195,7 @@ class Info_College extends Object_ext{
|
|
* 根据天 初始化
|
|
* 根据天 初始化
|
|
* @return type
|
|
* @return type
|
|
*/
|
|
*/
|
|
- public function initTaskCard() {
|
|
|
|
|
|
+ public function initTaskCard() {
|
|
if($this->funUnluckTs == 0){
|
|
if($this->funUnluckTs == 0){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -203,17 +203,20 @@ class Info_College extends Object_ext{
|
|
$day = TimeUtil::tsDay($this->funUnluckTs);
|
|
$day = TimeUtil::tsDay($this->funUnluckTs);
|
|
$curDay = TimeUtil::tsDay(time());
|
|
$curDay = TimeUtil::tsDay(time());
|
|
$num = $curDay - $day;
|
|
$num = $curDay - $day;
|
|
-
|
|
|
|
- $college = GameConfig::college();
|
|
|
|
|
|
+
|
|
|
|
+ $collegeMo = GameConfig::college();
|
|
|
|
+ $college = (array)$collegeMo;
|
|
|
|
+ ksort($college);
|
|
|
|
+
|
|
$index = 0;
|
|
$index = 0;
|
|
foreach ($college as $collegeId => $collegeMo) {
|
|
foreach ($college as $collegeId => $collegeMo) {
|
|
$courseArr = explode(',',$collegeMo->cList);
|
|
$courseArr = explode(',',$collegeMo->cList);
|
|
-
|
|
|
|
|
|
+
|
|
if(!StlUtil::dictHasProperty($this->ingTaskCardDic, $collegeId)){
|
|
if(!StlUtil::dictHasProperty($this->ingTaskCardDic, $collegeId)){
|
|
$this->ingTaskCardDic->$collegeId = new \stdClass();
|
|
$this->ingTaskCardDic->$collegeId = new \stdClass();
|
|
}
|
|
}
|
|
$collegeDic = $this->ingTaskCardDic->$collegeId;
|
|
$collegeDic = $this->ingTaskCardDic->$collegeId;
|
|
- foreach ($courseArr as $courseId) {
|
|
|
|
|
|
+ foreach ($courseArr as $courseId) {
|
|
if(!StlUtil::dictHasProperty($collegeDic, $courseId)){
|
|
if(!StlUtil::dictHasProperty($collegeDic, $courseId)){
|
|
$mo= GameConfig::course_getItem($courseId);
|
|
$mo= GameConfig::course_getItem($courseId);
|
|
$arr = explode(',',$mo->misslist);
|
|
$arr = explode(',',$mo->misslist);
|
|
@@ -221,10 +224,10 @@ class Info_College extends Object_ext{
|
|
foreach ($arr as $cardId) {
|
|
foreach ($arr as $cardId) {
|
|
$item = new ins_missCourseItem();
|
|
$item = new ins_missCourseItem();
|
|
$item->initialize($cardId);
|
|
$item->initialize($cardId);
|
|
-
|
|
|
|
|
|
+
|
|
$cid = StoreProc::PutTaskCardInStore($cardId); // 存入背包
|
|
$cid = StoreProc::PutTaskCardInStore($cardId); // 存入背包
|
|
NormalEventProc::OnTaskCard_Actived($cid, null); # 带入事件
|
|
NormalEventProc::OnTaskCard_Actived($cid, null); # 带入事件
|
|
-
|
|
|
|
|
|
+
|
|
$item->indexId = $cid;
|
|
$item->indexId = $cid;
|
|
$taskCard = new Ins_TaskCard(req()->userInfo->game->store->taskcards->$cid);# 任务卡对象
|
|
$taskCard = new Ins_TaskCard(req()->userInfo->game->store->taskcards->$cid);# 任务卡对象
|
|
$taskCard->state = Enum_TaskCardStateType::ing;
|
|
$taskCard->state = Enum_TaskCardStateType::ing;
|
|
@@ -250,13 +253,15 @@ class Info_College extends Object_ext{
|
|
$collegeDic->$courseId = $dic;
|
|
$collegeDic->$courseId = $dic;
|
|
}
|
|
}
|
|
$this->ingTaskCardDic->$collegeId = $collegeDic;
|
|
$this->ingTaskCardDic->$collegeId = $collegeDic;
|
|
- if($index >= $num){
|
|
|
|
|
|
+ if($index >= $num){
|
|
break 2;
|
|
break 2;
|
|
}
|
|
}
|
|
$index += 1;
|
|
$index += 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- req()->userInfo->game->college->ingTaskCardDic = $this->ingTaskCardDic;
|
|
|
|
|
|
+ req()->userInfo->game->college->ingTaskCardDic = $this->ingTaskCardDic;
|
|
|
|
+
|
|
|
|
+ //--------------------
|
|
//$courseDic = GameConfig::course();
|
|
//$courseDic = GameConfig::course();
|
|
// $index = 0;
|
|
// $index = 0;
|
|
// foreach ($courseDic as $courseId => $mo) {
|
|
// foreach ($courseDic as $courseId => $mo) {
|