parent
f7e5775495
commit
fe5fc7fa68
|
|
@ -30,7 +30,7 @@ local isFirstOpen = 0
|
||||||
local isUpperMonthCardTimeShow = true
|
local isUpperMonthCardTimeShow = true
|
||||||
local activitys = {}
|
local activitys = {}
|
||||||
local activityTabs = {}
|
local activityTabs = {}
|
||||||
|
local activeSelfTabs = {}
|
||||||
local moveSceneList = {
|
local moveSceneList = {
|
||||||
[1] = 0,
|
[1] = 0,
|
||||||
[2] = 0.02,
|
[2] = 0.02,
|
||||||
|
|
@ -747,7 +747,7 @@ function this.CreatActivity()
|
||||||
if not activityTabs[k] then
|
if not activityTabs[k] then
|
||||||
activityTabs[k] = {}
|
activityTabs[k] = {}
|
||||||
local root = this.RightUp
|
local root = this.RightUp
|
||||||
if v.ListType == 1 then
|
if v.ListType == -1 then
|
||||||
root = this.RightUp2Grid
|
root = this.RightUp2Grid
|
||||||
end
|
end
|
||||||
activityTabs[k].go = newObjToParent(this.activityTabPrefab,root)
|
activityTabs[k].go = newObjToParent(this.activityTabPrefab,root)
|
||||||
|
|
@ -800,6 +800,43 @@ function this.CreatActivity()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.RefreshRightUp)
|
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.RefreshRightUp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.RefreshLayer(showTab,k,v)
|
||||||
|
if showTab then
|
||||||
|
activityTabs[k].go.gameObject:SetActive(true)
|
||||||
|
if v.ListType == -1 or activeSelfTabs[v.Sort] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
activeSelfTabs[v.Sort] = {}
|
||||||
|
activeSelfTabs[v.Sort].tab = activityTabs[k]
|
||||||
|
activeSelfTabs[v.Sort].data = v
|
||||||
|
else
|
||||||
|
activityTabs[k].go.gameObject:SetActive(false)
|
||||||
|
if not activeSelfTabs[v.Sort] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
activeSelfTabs[v.Sort] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local tempTabs = {}
|
||||||
|
for k,v in pairs(activeSelfTabs) do
|
||||||
|
table.insert(tempTabs,v)
|
||||||
|
end
|
||||||
|
table.sort(tempTabs,function(a,b)
|
||||||
|
if a.data.ListType == b.data.ListType then
|
||||||
|
return a.data.Sort < b.data.Sort
|
||||||
|
else
|
||||||
|
return a.data.ListType < b.data.ListType
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
for k,v in ipairs(tempTabs) do
|
||||||
|
if v.data.ListType == 0 then
|
||||||
|
v.tab.go.transform:SetSiblingIndex(k - 1)
|
||||||
|
else
|
||||||
|
v.tab.go.transform:SetSiblingIndex(v.data.ListType - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local ySet = {[1] = 361 ,[2] = 512,[3] = 663,[4] = 814,[5] = 965 }
|
local ySet = {[1] = 361 ,[2] = 512,[3] = 663,[4] = 814,[5] = 965 }
|
||||||
--设置右侧条
|
--设置右侧条
|
||||||
function this.SetRightBarSize()
|
function this.SetRightBarSize()
|
||||||
|
|
@ -1131,6 +1168,7 @@ function this.TimeFormat()
|
||||||
this.ZhuShengZhiDianBtn()
|
this.ZhuShengZhiDianBtn()
|
||||||
|
|
||||||
for k,v in pairs(activitys) do
|
for k,v in pairs(activitys) do
|
||||||
|
local showTab = activityTabs[k].go.gameObject.activeSelf
|
||||||
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
||||||
if ishow then
|
if ishow then
|
||||||
if v.ActId == 666 then
|
if v.ActId == 666 then
|
||||||
|
|
@ -1140,20 +1178,20 @@ function this.TimeFormat()
|
||||||
local time = giftList[1].endTime - GetTimeStamp()
|
local time = giftList[1].endTime - GetTimeStamp()
|
||||||
if time < 1 then
|
if time < 1 then
|
||||||
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, giftList[1].goodsId)
|
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, giftList[1].goodsId)
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
activityTabs[k].timeText.text = TimeToHMS(time)
|
activityTabs[k].timeText.text = TimeToHMS(time)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.ActId == 668 then
|
elseif v.ActId == 668 then
|
||||||
-- 加入对月卡的判断
|
-- 加入对月卡的判断
|
||||||
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
||||||
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
||||||
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
||||||
activityTabs[k].go.gameObject:SetActive( (isOpen_128 or isOpen_328))--isMonthCardActive and
|
showTab = (isOpen_128 or isOpen_328)--isMonthCardActive and
|
||||||
-- if isMonthCardActive then
|
-- if isMonthCardActive then
|
||||||
local cardType = nil
|
local cardType = nil
|
||||||
if isOpen_328 then
|
if isOpen_328 then
|
||||||
|
|
@ -1167,9 +1205,9 @@ function this.TimeFormat()
|
||||||
if data then
|
if data then
|
||||||
local time = data.endTime - PlayerManager.serverTime
|
local time = data.endTime - PlayerManager.serverTime
|
||||||
if time < 1 then
|
if time < 1 then
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
if OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_128) > 0 and OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_328) > 0 then
|
if OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_128) > 0 and OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_328) > 0 then
|
||||||
activityTabs[k].timeImg.gameObject:SetActive(false)
|
activityTabs[k].timeImg.gameObject:SetActive(false)
|
||||||
elseif time >= 86400 then
|
elseif time >= 86400 then
|
||||||
|
|
@ -1184,34 +1222,34 @@ function this.TimeFormat()
|
||||||
elseif v.ActId == 667 then
|
elseif v.ActId == 667 then
|
||||||
local limitSkinGift = OperatingManager.GetTimeLimitSkinInfoList()
|
local limitSkinGift = OperatingManager.GetTimeLimitSkinInfoList()
|
||||||
if not limitSkinGift then
|
if not limitSkinGift then
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
local time = limitSkinGift.endTime - GetTimeStamp()
|
local time = limitSkinGift.endTime - GetTimeStamp()
|
||||||
if time > 0 then
|
if time > 0 then
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
||||||
local canGet = BagManager.GetTotalItemNum(1221) > 0 and BagManager.GetTotalItemNum(1222) > 0 and
|
local canGet = BagManager.GetTotalItemNum(1221) > 0 and BagManager.GetTotalItemNum(1222) > 0 and
|
||||||
BagManager.GetTotalItemNum(1223) > 0 and BagManager.GetTotalItemNum(1224) > 0
|
BagManager.GetTotalItemNum(1223) > 0 and BagManager.GetTotalItemNum(1224) > 0
|
||||||
activityTabs[k].redpot:SetActive(canGet)
|
activityTabs[k].redpot:SetActive(canGet)
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif v.ActId == 6301 then
|
elseif v.ActId == 6301 then
|
||||||
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FuXingGaoZhao)
|
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FuXingGaoZhao)
|
||||||
if ActData then
|
if ActData then
|
||||||
activityTabs[k].timeText.transform.parent.gameObject:SetActive(ActData.value == 0)
|
activityTabs[k].timeText.transform.parent.gameObject:SetActive(ActData.value == 0)
|
||||||
activityTabs[k].go.gameObject:SetActive(ActData.value ~= 2)
|
showTab = ActData.value ~= 2
|
||||||
if ActData.value == 0 then
|
if ActData.value == 0 then
|
||||||
local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
|
local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
|
||||||
local time = ActData.startTime + tonumber(data[1])*86400 - GetTimeStamp()
|
local time = ActData.startTime + tonumber(data[1])*86400 - GetTimeStamp()
|
||||||
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
||||||
if time <= 0 then
|
if time <= 0 then
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.ShowTime == 1 and activityTabs[k].go.gameObject.activeSelf then
|
elseif v.ShowTime == 1 and activityTabs[k].go.gameObject.activeSelf then
|
||||||
if v.ActiveType > 0 then
|
if v.ActiveType > 0 then
|
||||||
|
|
@ -1225,13 +1263,13 @@ function this.TimeFormat()
|
||||||
if time>= 86400 then
|
if time>= 86400 then
|
||||||
activityTabs[k].timeText.text = TimeToDH(time)
|
activityTabs[k].timeText.text = TimeToDH(time)
|
||||||
else
|
else
|
||||||
activityTabs[k].timeText.text = TimeToHMS(time)
|
activityTabs[k].timeText.text = TimeToHMS(time)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
supremHadSet = true
|
supremHadSet = true
|
||||||
end
|
end
|
||||||
elseif v.ActiveType == ActivityTypeDef.TreasureStore then
|
elseif v.ActiveType == ActivityTypeDef.TreasureStore then
|
||||||
|
|
@ -1243,10 +1281,10 @@ function this.TimeFormat()
|
||||||
activityTabs[k].timeText.text = TimeToHMS(endTime)
|
activityTabs[k].timeText.text = TimeToHMS(endTime)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.FunType and v.FunType == 41 then
|
elseif v.FunType and v.FunType == 41 then
|
||||||
activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist())
|
showTab = DailyRechargeManager.GetDailyRechargeExist()
|
||||||
else
|
else
|
||||||
local info = ActivityGiftManager.GetActivityTypeInfo(v.ActiveType)
|
local info = ActivityGiftManager.GetActivityTypeInfo(v.ActiveType)
|
||||||
local extraTime = 0
|
local extraTime = 0
|
||||||
|
|
@ -1259,56 +1297,57 @@ function this.TimeFormat()
|
||||||
elseif tempTime > 0 and tempTime < extraTime then
|
elseif tempTime > 0 and tempTime < extraTime then
|
||||||
activityTabs[k].timeText.text = TimeToFelaxible(tempTime)
|
activityTabs[k].timeText.text = TimeToFelaxible(tempTime)
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
-- elseif v.FunType == FUNCTION_OPEN_TYPE.ARENA then
|
-- elseif v.FunType == FUNCTION_OPEN_TYPE.ARENA then
|
||||||
-- local isOpen = ActTimeCtrlManager.SingleFuncState(v.FunType)
|
-- local isOpen = ActTimeCtrlManager.SingleFuncState(v.FunType)
|
||||||
-- local baseInfo = ArenaTopMatchManager.GetBaseData()
|
-- local baseInfo = ArenaTopMatchManager.GetBaseData()
|
||||||
-- if not isOpen or not baseInfo or not baseInfo.battleStage or baseInfo.battleStage == TOP_MATCH_STAGE.OVER then
|
-- if not isOpen or not baseInfo or not baseInfo.battleStage or baseInfo.battleStage == TOP_MATCH_STAGE.OVER then
|
||||||
-- activityTabs[k].go.gameObject:SetActive(false)
|
-- showTab = false
|
||||||
-- elseif baseInfo.battleStage == TOP_MATCH_STAGE.CLOSE then
|
-- elseif baseInfo.battleStage == TOP_MATCH_STAGE.CLOSE then
|
||||||
-- local startTime = ArenaTopMatchManager.GetTopMatchTime()
|
-- local startTime = ArenaTopMatchManager.GetTopMatchTime()
|
||||||
-- local tempTime = startTime - PlayerManager.serverTime
|
-- local tempTime = startTime - PlayerManager.serverTime
|
||||||
-- -- 当日五点开始显示
|
-- -- 当日五点开始显示
|
||||||
-- if tempTime > 0 and tempTime < 16 * 60 * 60 then
|
-- if tempTime > 0 and tempTime < 16 * 60 * 60 then
|
||||||
-- activityTabs[k].go.gameObject:SetActive(true)
|
-- showTab = true
|
||||||
-- activityTabs[k].timeText.text = Language[11211]..TimeToHMS(tempTime)
|
-- activityTabs[k].timeText.text = Language[11211]..TimeToHMS(tempTime)
|
||||||
-- else
|
-- else
|
||||||
-- activityTabs[k].go.gameObject:SetActive(false)
|
-- showTab = false
|
||||||
-- end
|
-- end
|
||||||
-- else
|
-- else
|
||||||
-- activityTabs[k].go.gameObject:SetActive(true)
|
-- showTab = true
|
||||||
-- activityTabs[k].timeText.text = Language[11212]
|
-- activityTabs[k].timeText.text = Language[11212]
|
||||||
-- end
|
-- end
|
||||||
elseif v.FunType == 72 then
|
elseif v.FunType == 72 then
|
||||||
local status = DeathPosManager.GetStatus()
|
local status = DeathPosManager.GetStatus()
|
||||||
local endTime = DeathPosManager.GetOverTime()
|
local endTime = DeathPosManager.GetOverTime()
|
||||||
if not status or status == DeathPosStatus.Close or status == DeathPosStatus.Belated or status == DeathPosStatus.Reward then
|
if not status or status == DeathPosStatus.Close or status == DeathPosStatus.Belated or status == DeathPosStatus.Reward then
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
if endTime then
|
if endTime then
|
||||||
local tempTime = endTime - PlayerManager.serverTime
|
local tempTime = endTime - PlayerManager.serverTime
|
||||||
if tempTime and tempTime > 0 then
|
if tempTime and tempTime > 0 then
|
||||||
activityTabs[k].timeText.text = Language[11213]..TimeToHMS(tempTime)
|
activityTabs[k].timeText.text = Language[11213]..TimeToHMS(tempTime)
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
|
this.RefreshLayer(showTab,k,v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1323,7 +1362,7 @@ function this:OnClose()
|
||||||
for k,v in ipairs(activitys) do
|
for k,v in ipairs(activitys) do
|
||||||
if v.RpType > 0 then
|
if v.RpType > 0 then
|
||||||
ClearRedPointObject(v.RpType,activityTabs[k].redpot)
|
ClearRedPointObject(v.RpType,activityTabs[k].redpot)
|
||||||
-- activityTabs[k].go.gameObject:SetActive(false)
|
-- showTab = false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1333,6 +1372,7 @@ function this:OnDestroy()
|
||||||
this.spLoader:Destroy()
|
this.spLoader:Destroy()
|
||||||
activityTabs = {}
|
activityTabs = {}
|
||||||
activitys = {}
|
activitys = {}
|
||||||
|
activeSelfTabs = {}
|
||||||
SubUIManager.Close(this.UpView)
|
SubUIManager.Close(this.UpView)
|
||||||
SubUIManager.Close(this.BtView)
|
SubUIManager.Close(this.BtView)
|
||||||
SubUIManager.Close(this.ChatTipView)
|
SubUIManager.Close(this.ChatTipView)
|
||||||
|
|
@ -1371,9 +1411,11 @@ function this.RefreshGiftBtnShow()
|
||||||
if v.ActId == 668 and ishow then
|
if v.ActId == 668 and ishow then
|
||||||
-- 加入对月卡的判断
|
-- 加入对月卡的判断
|
||||||
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
||||||
|
local showTab = activityTabs[k].go.gameObject.activeSelf
|
||||||
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
||||||
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
||||||
activityTabs[k].go.gameObject:SetActive( (isOpen_128 or isOpen_328))--isMonthCardActive and
|
showTab = (isOpen_128 or isOpen_328)--isMonthCardActive and
|
||||||
|
this.RefreshLayer(showTab,k,v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1381,13 +1423,14 @@ end
|
||||||
function this.RefreshActivityBtn(context)
|
function this.RefreshActivityBtn(context)
|
||||||
--LogGreen("context.type1 " .. context.type .. " " .. context.status)
|
--LogGreen("context.type1 " .. context.type .. " " .. context.status)
|
||||||
for k,v in ipairs(activitys) do
|
for k,v in ipairs(activitys) do
|
||||||
|
local showTab = activityTabs[k].go.gameObject.activeSelf
|
||||||
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
||||||
if ishow then
|
if ishow then
|
||||||
if v.ActiveType > 0 and v.ActiveType == context.type then
|
if v.ActiveType > 0 and v.ActiveType == context.type then
|
||||||
local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
|
local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
|
||||||
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) then
|
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) then
|
||||||
if v.FunType and v.FunType == 41 then
|
if v.FunType and v.FunType == 41 then
|
||||||
activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist())
|
showTab = DailyRechargeManager.GetDailyRechargeExist()
|
||||||
elseif v.ActiveType == 20000 then
|
elseif v.ActiveType == 20000 then
|
||||||
local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType",v.ActiveType)
|
local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType",v.ActiveType)
|
||||||
if not tempConfig then
|
if not tempConfig then
|
||||||
|
|
@ -1396,27 +1439,28 @@ function this.RefreshActivityBtn(context)
|
||||||
if tempConfig then
|
if tempConfig then
|
||||||
activityTabs[k].img.sprite = this.spLoader:LoadSprite(tempConfig.Icon[1])
|
activityTabs[k].img.sprite = this.spLoader:LoadSprite(tempConfig.Icon[1])
|
||||||
end
|
end
|
||||||
activityTabs[k].go.gameObject:SetActive(context.status == 1)
|
showTab = context.status == 1
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(context.status == 1)
|
showTab = context.status == 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.FunType > 0 and v.FunType == context.type then
|
elseif v.FunType > 0 and v.FunType == context.type then
|
||||||
if ActTimeCtrlManager.SingleFuncState(v.FunType) then
|
if ActTimeCtrlManager.SingleFuncState(v.FunType) then
|
||||||
if v.FunType and v.FunType == 41 then
|
if v.FunType and v.FunType == 41 then
|
||||||
activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist())
|
showTab = DailyRechargeManager.GetDailyRechargeExist()
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(context.status == 1)
|
showTab = context.status == 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
|
this.RefreshLayer(showTab,k,v)
|
||||||
end
|
end
|
||||||
isRefeshIcon = true
|
isRefeshIcon = true
|
||||||
end
|
end
|
||||||
|
|
@ -1426,6 +1470,7 @@ function this.RefreshActivityShow()
|
||||||
this.RefreshEightGiftPreview()
|
this.RefreshEightGiftPreview()
|
||||||
|
|
||||||
for k,v in ipairs(activitys) do
|
for k,v in ipairs(activitys) do
|
||||||
|
local showTab = activityTabs[k].go.gameObject.activeSelf
|
||||||
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
|
||||||
if ishow then
|
if ishow then
|
||||||
if v.RpType > 0 then
|
if v.RpType > 0 then
|
||||||
|
|
@ -1441,12 +1486,12 @@ function this.RefreshActivityShow()
|
||||||
local time = giftList[1].endTime - GetTimeStamp()
|
local time = giftList[1].endTime - GetTimeStamp()
|
||||||
if time < 1 then
|
if time < 1 then
|
||||||
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, giftList[1].goodsId)
|
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, giftList[1].goodsId)
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.ActId == 668 then
|
elseif v.ActId == 668 then
|
||||||
--超值基金
|
--超值基金
|
||||||
|
|
@ -1454,7 +1499,7 @@ function this.RefreshActivityShow()
|
||||||
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
-- local isMonthCardActive = OperatingManager.IsMonthCardActive()
|
||||||
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
local isOpen_128 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_128)
|
||||||
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
|
||||||
activityTabs[k].go.gameObject:SetActive( (isOpen_128 or isOpen_328))--isMonthCardActive and
|
showTab = (isOpen_128 or isOpen_328)--isMonthCardActive and
|
||||||
-- if isMonthCardActive then
|
-- if isMonthCardActive then
|
||||||
local cardType = nil
|
local cardType = nil
|
||||||
if isOpen_328 then
|
if isOpen_328 then
|
||||||
|
|
@ -1468,9 +1513,9 @@ function this.RefreshActivityShow()
|
||||||
if data then
|
if data then
|
||||||
local time = data.endTime - PlayerManager.serverTime
|
local time = data.endTime - PlayerManager.serverTime
|
||||||
if time < 1 then
|
if time < 1 then
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1483,34 +1528,34 @@ function this.RefreshActivityShow()
|
||||||
if ActivityGiftManager.GetRewardState(42) ~= 3 then
|
if ActivityGiftManager.GetRewardState(42) ~= 3 then
|
||||||
local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.SupremeHero)
|
local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.SupremeHero)
|
||||||
if endTime - PlayerManager.serverTime > 0 then
|
if endTime - PlayerManager.serverTime > 0 then
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.FunType and v.FunType == 41 then
|
elseif v.FunType and v.FunType == 41 then
|
||||||
activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist())
|
showTab = DailyRechargeManager.GetDailyRechargeExist()
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
elseif v.FunType > 0 then
|
elseif v.FunType > 0 then
|
||||||
if ActTimeCtrlManager.SingleFuncState(v.FunType) then
|
if ActTimeCtrlManager.SingleFuncState(v.FunType) then
|
||||||
activityTabs[k].go.gameObject:SetActive(true)
|
showTab = true
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
activityTabs[k].go.gameObject:SetActive(false)
|
showTab = false
|
||||||
end
|
end
|
||||||
|
this.RefreshLayer(showTab,k,v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue