【跳转】活动跳转添加开启判断
parent
1da9223506
commit
2b693b417e
|
@ -469,6 +469,24 @@ function this.GetActivityTableDataByPageInde(pageIndex)
|
|||
return activityGroupsData
|
||||
end
|
||||
|
||||
-- 判段跳转index活动是否开启
|
||||
function this.IsActivityOpenByJumpIndex(pageIndex, jumpIndex)
|
||||
local tb = this.GetActivityTableDataByPageInde(pageIndex)
|
||||
for i = 1, #tb do
|
||||
if tb[i].Sort == jumpIndex then
|
||||
if tb[i].ActiveType > 0 then
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(tb[i].ActiveType)
|
||||
return id and id > 0 and ActivityGiftManager.IsQualifiled(tb[i].ActiveType)
|
||||
elseif tb[i].FunType > 0 then
|
||||
return ActTimeCtrlManager.SingleFuncState(tb[i].FunType)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
-- 玩家是否有资格开启
|
||||
function this.IsQualifiled(id)
|
||||
-- 相同类型活动解锁类型相同,所以只判断第一个
|
||||
|
|
|
@ -611,6 +611,11 @@ local jumpDic = {
|
|||
}
|
||||
|
||||
function this.JumpActivity(data,skipfactor)
|
||||
local isOpen = DynamicActivityManager.IsActivityOpenByJumpIndex(data, skipfactor)
|
||||
if not isOpen then
|
||||
PopupTipPanel.ShowTip("活动尚未开启")
|
||||
return
|
||||
end
|
||||
if UIManager.IsOpen(UIName.ActivityMainPanel) then
|
||||
UIManager.ClosePanel(UIName.ActivityMainPanel)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue