青龙秘宝修改

jiaoyangna 2020-10-15 14:00:21 +08:00
parent 290b0858da
commit 33209fa0c9
3 changed files with 15 additions and 16 deletions

View File

@ -44,11 +44,11 @@ end
function this:BindEvent() function this:BindEvent()
Util.AddClick(this.weekTrailBtn,function() Util.AddClick(this.weekTrailBtn,function()
curType = 1 curType = 1
this.refresh(curType) this.refresh()
end) end)
Util.AddClick(this.finalTrailBtn,function() Util.AddClick(this.finalTrailBtn,function()
curType = 2 curType = 2
this.refresh(curType) this.refresh()
end) end)
end end
@ -66,22 +66,22 @@ function this:SetSelect()
end end
function this:AddListener() 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.TreasureOfHeaven.TaskRefresh, this.RefreshTime)
Game.GlobalEvent:AddEvent(GameEvent.Activity.OnActivityOpenOrClose,this.CloseFunction) 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 end
function this:RemoveListener() 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.TreasureOfHeaven.TaskRefresh, this.RefreshTime)
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityOpenOrClosen,this.CloseFunction) 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 end
function this.RefreshTime() function this.RefreshTime()
NetManager.RefreshTimeSLRequest(function (msg) NetManager.RefreshTimeSLRequest(function (msg)
this.refresh(curType) this.refresh()
end) end)
end end
@ -108,7 +108,7 @@ function this:OnShow(_parent,...)
parent:ClosePanel() parent:ClosePanel()
return return
end end
this.refresh(curType) this.refresh()
end end
--topBar按钮状态 --topBar按钮状态
@ -139,7 +139,7 @@ function this:SetTopBar()
NetManager.GetActivityRewardRequest(-2,id,function(msg) NetManager.GetActivityRewardRequest(-2,id,function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1) PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1)
PopupTipPanel.ShowTip(Language[12355]) PopupTipPanel.ShowTip(Language[12355])
this.refresh(curType) this.refresh()
end) end)
end,1.5):Start() end,1.5):Start()
end) end)
@ -163,12 +163,12 @@ function this:OnDestroy()
end end
end end
function this.refresh(type) function this.refresh()
QinglongSerectTreasureManager.UpdateTreasureState2() QinglongSerectTreasureManager.UpdateTreasureState2()
this:SetTopBar() this:SetTopBar()
this:SetSelect() this:SetSelect()
this:ShowTime(type) this:ShowTime(curType)
this:showTaskList(type) this:showTaskList(curType)
this:SetRedPoint() this:SetRedPoint()
CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail)
@ -235,7 +235,7 @@ function this:SingleTask(go, rewardSingleData)
NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg) NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg)
PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name) PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name)
Timer.New(function() Timer.New(function()
this.refresh(curType) this.refresh()
end,1):Start() end,1):Start()
end) end)
elseif state == 0 then elseif state == 0 then

View File

@ -224,7 +224,6 @@ function this.RefreshMissionList(buffer)
msg:ParseFromString(data) msg:ParseFromString(data)
LogBlue("收到了服务器的刷新数据") LogBlue("收到了服务器的刷新数据")
TaskManager.RefreshTypeTaskInfo(msg.userMissionInfo) TaskManager.RefreshTypeTaskInfo(msg.userMissionInfo)
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh)
end end
-- 接收服务器数据 -- 接收服务器数据

View File

@ -203,7 +203,7 @@ function this.RefreshTypeTaskInfo(taskInfoList)
end end
Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged) Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged)
Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange) Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange)
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh)
this.SetDirty() this.SetDirty()
end end
@ -314,7 +314,7 @@ function this.ResetTreasureTaskInfo(taskList)
table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[i]) table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[i])
end end
Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange) Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnMissionChange)
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.TaskRefresh)
CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail) CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail)
end end