From 33209fa0c9820779f0a338ea8b7dcda6aa19420a Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 15 Oct 2020 14:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=92=E9=BE=99=E7=A7=98=E5=AE=9D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MissionDailyPanel_SecretTreasureTrail.lua | 26 +++++++++---------- .../~Lua/Modules/Net/IndicationManager.lua | 1 - .../~Lua/Modules/Task/TaskManager.lua | 4 +-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua index fc85fffb54..fd54a7745b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_SecretTreasureTrail.lua @@ -44,11 +44,11 @@ end function this:BindEvent() Util.AddClick(this.weekTrailBtn,function() curType = 1 - this.refresh(curType) + this.refresh() end) Util.AddClick(this.finalTrailBtn,function() curType = 2 - this.refresh(curType) + this.refresh() end) end @@ -66,22 +66,22 @@ function this:SetSelect() end function this:AddListener() - Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh,curType) + Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh) Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.TaskRefresh, this.RefreshTime) Game.GlobalEvent:AddEvent(GameEvent.Activity.OnActivityOpenOrClose,this.CloseFunction) - Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh,curType) + Game.GlobalEvent:AddEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh) end function this:RemoveListener() - Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh,curType) + Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess, this.refresh) 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) + Game.GlobalEvent:RemoveEvent(GameEvent.MoneyPay.OnPayResultSuccess, this.refresh) end function this.RefreshTime() NetManager.RefreshTimeSLRequest(function (msg) - this.refresh(curType) + this.refresh() end) end @@ -108,7 +108,7 @@ function this:OnShow(_parent,...) parent:ClosePanel() return end - this.refresh(curType) + this.refresh() end --topBar按钮状态 @@ -139,7 +139,7 @@ function this:SetTopBar() NetManager.GetActivityRewardRequest(-2,id,function(msg) PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1) PopupTipPanel.ShowTip(Language[12355]) - this.refresh(curType) + this.refresh() end) end,1.5):Start() end) @@ -163,12 +163,12 @@ function this:OnDestroy() end end -function this.refresh(type) +function this.refresh() QinglongSerectTreasureManager.UpdateTreasureState2() this:SetTopBar() this:SetSelect() - this:ShowTime(type) - this:showTaskList(type) + this:ShowTime(curType) + this:showTaskList(curType) this:SetRedPoint() CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) @@ -235,7 +235,7 @@ function this:SingleTask(go, rewardSingleData) NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg) PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name) Timer.New(function() - this.refresh(curType) + this.refresh() end,1):Start() end) elseif state == 0 then diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index d9bb648785..33f15ae28a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -224,7 +224,6 @@ function this.RefreshMissionList(buffer) msg:ParseFromString(data) LogBlue("收到了服务器的刷新数据") TaskManager.RefreshTypeTaskInfo(msg.userMissionInfo) - Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh) end -- 接收服务器数据 diff --git a/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua b/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua index ab842bbd6b..fce553a1c0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua @@ -203,7 +203,7 @@ function this.RefreshTypeTaskInfo(taskInfoList) end Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged) Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange) - + Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh) this.SetDirty() end @@ -314,7 +314,7 @@ function this.ResetTreasureTaskInfo(taskList) table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[i]) end Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange) - + Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh) CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) end