青龙秘宝修改

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()
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

View File

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

View File

@ -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