diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua index 6bf3839056..23065dc27a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua @@ -11,10 +11,11 @@ function this:InitComponent(gameObject) this.gameObject = gameObject this.jiesuoBtn = Util.GetGameObject(this.gameObject, "topBar/jiesuoBtn") this.jiesuoBtnText = Util.GetGameObject(this.jiesuoBtn, "Text"):GetComponent("Text") - this.select = Util.GetGameObject(this.gameObject, "topBar/select") + this.select = Util.GetGameObject(this.gameObject, "topBar/select") this.weekTrailBtn = Util.GetGameObject(this.gameObject, "topBar/button/weekTrail") this.finalTrailBtn = Util.GetGameObject(this.gameObject, "topBar/button/finalTrail") - + this.weekTrailBtnRed = Util.GetGameObject(this.weekTrailBtn , "redPoint") + this.finalTrailBtnRed = Util.GetGameObject(this.finalTrailBtn, "redPoint") this.remainTime = Util.GetGameObject(this.gameObject, "topBar/remainTime/Text"):GetComponent("Text") this.treasureList = Util.GetGameObject(this.gameObject, "itemList") @@ -74,6 +75,7 @@ function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh,curType) Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.TaskRefresh, this.RefreshTime) Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityOpenOrClosen,this.CloseFunction) + Game.GlobalEvent:RemoveEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh,curType) end @@ -160,9 +162,15 @@ function this.refresh(type) this:SetSelect() this:ShowTime(type) this:showTaskList(type) + this:SetRedPoint() CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) + end +function this:SetRedPoint() + this.weekTrailBtnRed:SetActive(QinglongSerectTreasureManager.GetSerectTreasureTrailSingleRedPot(1)) + this.finalTrailBtnRed:SetActive(QinglongSerectTreasureManager.GetSerectTreasureTrailSingleRedPot(2)) +end --任务列表 function this:showTaskList(type) diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/QinglongSerectTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/Mission/QinglongSerectTreasureManager.lua index e1b245b050..bf99971563 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/QinglongSerectTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/QinglongSerectTreasureManager.lua @@ -232,4 +232,18 @@ function this.GetSerectTreasureTrailRedPot() end return false end + +function this.GetSerectTreasureTrailSingleRedPot(_type) + if not ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) then + return false + end + local task = this.GetQinglongTaskData(_type) + for i, v in pairs(task) do + if v.state == 1 then + return true + end + end + return false +end + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua b/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua index 4cc3d13df0..dfc75ce024 100644 --- a/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua @@ -294,7 +294,6 @@ function this.GetMianTaskCurActiveTaskData() return nil end function this.ResetTreasureTaskInfo(taskList) - local refreshTypeList = {} --type,tasks for i = 1, #taskList do local taskInfoList = TypeTaskData[TaskTypeDef.TreasureOfSomeBody] @@ -304,14 +303,9 @@ function this.ResetTreasureTaskInfo(taskList) table.remove(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], k) end end - for j = 1, #taskList[i].tasks do - table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[j]) - end - table.insert(refreshTypeList,taskList[i].type) - this.SetSLrefreshTime2(taskList[i].type,taskList[i].refreshTime) + table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[i]) end - Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionListRestChanged,refreshTypeList) - CheckRedPointStatus(RedPointType.TreasureOfSl) + CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) end --迷宫寻宝前端刷新任务自行赋值