diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua index 9a676970ee..8a2ba958d3 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua @@ -71,7 +71,7 @@ function ActivityMainPanel:CheckActOpen(_index) local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType) if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then - if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop then + if tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or tabs[_index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[_index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[_index].ActiveType == ActivityTypeDef.NiuQi then _CurPageIndex = _index elseif GlobalActConfig[id].ShowArt == this.activityType then _CurPageIndex = _index @@ -221,7 +221,7 @@ function this.PageTabAdapter(tab, index, status) local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType) if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) then if GlobalActConfig[id].ShowArt and GlobalActConfig[id].ShowArt > 0 then - if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop then + if tabs[index].ActiveType == ActivityTypeDef.DynamicAct or tabs[index].ActiveType == ActivityTypeDef.LimitUpHero or tabs[index].ActiveType == ActivityTypeDef.DynamicActShop or tabs[index].ActiveType == ActivityTypeDef.NiuQi then isshow = true elseif GlobalActConfig[id].ShowArt == this.activityType then isshow = true diff --git a/Assets/ManagedResources/~Lua/Modules/GlobalActTimeCtrl/ActTimeCtrlManager.lua b/Assets/ManagedResources/~Lua/Modules/GlobalActTimeCtrl/ActTimeCtrlManager.lua index f300040202..8d560d09f4 100644 --- a/Assets/ManagedResources/~Lua/Modules/GlobalActTimeCtrl/ActTimeCtrlManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GlobalActTimeCtrl/ActTimeCtrlManager.lua @@ -108,7 +108,7 @@ function this.InitMsg(msg) this.serData[id].restTime = restTime this.serData[id].switch = switch - LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch)) + -- LogGreen(string.format("--- 功能解锁数据 id = %s, startTime = %s, endTime = %s, switch = %s",id, startTime, endTime, switch)) -- 用于标记是否解锁使用 local typeId = AllActSetConfig[id].IsIDdSame diff --git a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua index 2419fcbd58..2b8e76a4b2 100644 --- a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua @@ -8,26 +8,17 @@ local itemId = 0 function this.Initialize() this.InitAllRewardData() Game.GlobalEvent:AddEvent(GameEvent.Mission.NiuQiChongTianTask,this.UpdateStatus) - this.isOldNiuQiActivity = true + this.IsNewActivity = false end --服务器发来的活动进度条数据 function this.GetActData() - if this.isOldNiuQiActivity then - return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) - else - return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) - end + return ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) end --牛气值 function this.GetScore() - local ActData = {} - if this.isOldNiuQiActivity then - ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) - else - ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) - end + local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.NiuQi) if not (ActData and ActData.activityId) then return end if #this.configData == 0 then local config = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActData.activityId) @@ -82,11 +73,13 @@ end function this.CreatSingleData(sData) local data = {} data.id = sData.Id + data.actId = sData.ActivityId data.Text = sData.Text data.Reward = sData.Reward data.Sort = sData.Sort data.Type = sData.Type data.state = 0 + data.jumpId = sData.JumpID return data end @@ -94,7 +87,7 @@ end --需要显示的任务数据 function this.GetNeedRewardData(sort) local needData = {} - if this.isOldNiuQiActivity then--老的牛气冲天 + if not this.IsNewActivity then--老的牛气冲天 for i = 1, 2 do local tempdata = {} for k, v in pairs(this.rewardData) do @@ -145,11 +138,16 @@ function this.GetNeedRewardData(sort) table.insert(needData,v) end end + local STATE = { + [0] = 2, + [1] = 3, + [2] = 1, + } table.sort(needData,function (a,b) if a.state == b.state then return a.id < b.id else - return a.state < b.state + return STATE[a.state] > STATE[b.state] end end) end @@ -157,16 +155,15 @@ function this.GetNeedRewardData(sort) end function this.CheckNiuQiChongTianRedPoint(index) - local id = 0 - if this.isOldNiuQiActivity then - id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi) - else - id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi) - end + local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi) if not id or id < 1 then return false end - + for k = #this.rewardData, 1 , -1 do + if this.rewardData[k].actId ~= id then + table.remove( this.rewardData,k) + end + end local isShow = false if index == RedPointType.NiuQiChongTian_4 then isShow = this.NiuQiCheckRedPoint4() @@ -203,4 +200,13 @@ function this.NiuQiCheckRedPoint4() return false end +--检查是否为新的牛气冲天 +function this.CheckIsNewActivity() + local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi) + local data = ConfigManager.GetConfigData(ConfigName.GlobalActivity,id) + if data.ShowArt == 2 then + this.IsNewActivity = true + end +end + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianPanel.lua b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianPanel.lua index 7e8ee32b87..41e6c72b33 100644 --- a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianPanel.lua @@ -11,9 +11,9 @@ function NiuQiChongTianPanel:New(gameObject) return b end local TabBox = require("Modules/Common/TabBox") -local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] ,rpType = RedPointType.NiuQiChongTian_1}, - [2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] ,rpType = RedPointType.NiuQiChongTian_2}, - [3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] ,rpType = RedPointType.NiuQiChongTian_3},} +local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12251] , nameNew = "神将招募" ,rpType = RedPointType.NiuQiChongTian_1}, + [2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12252] , nameNew = "神将升星" ,rpType = RedPointType.NiuQiChongTian_2}, + [3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[12253] , nameNew = "极速探索" ,rpType = RedPointType.NiuQiChongTian_3},} local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1), select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)} @@ -49,6 +49,7 @@ function NiuQiChongTianPanel:InitComponent() self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scrollItem.transform,self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0)) self.ScrollView.moveTween.MomentumAmount = 1 self.ScrollView.moveTween.Strength = 2 + self.ScrollView.elastic = false self.effect5 = Util.GetGameObject(self.reward, "icon (5)/UI_Effect_jinkuang_Yuan") Util.SetParticleSortLayer(self.effect5, 1) @@ -77,11 +78,7 @@ end --界面打开时调用(用于子类重写) function NiuQiChongTianPanel:OnOpen(_activityConfig,_index,parent) self.actConfig = _activityConfig - if self.actConfig.ActiveType == ActivityTypeDef.NiuQi then - NiuQiChongTianManager.isOldNiuQiActivity = true - else - NiuQiChongTianManager.isOldNiuQiActivity = false - end + NiuQiChongTianManager.CheckIsNewActivity() self.pageIndex = _index self.parent = parent end @@ -117,7 +114,7 @@ function NiuQiChongTianPanel:OnShow(_sortingOrder) self.redPointList[_TabData[index].rpType] = redPoint end Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status]) - tabLab:GetComponent("Text").text = _TabData[index].name + tabLab:GetComponent("Text").text = NiuQiChongTianManager.IsNewActivity and _TabData[index].nameNew or _TabData[index].name tabLab:GetComponent("Text").color = _TabFontColor[status] end @@ -260,7 +257,7 @@ function NiuQiChongTianPanel:SingleDataShow(go, index,data) Util.AddOnceClick(btn.gameObject,function () if data.state == 0 then - JumpManager.GoJump(1023) + JumpManager.GoJump(data.jumpId) elseif data.state == 1 then NetManager.TakeMissionRewardRequest(TaskTypeDef.NiuQiChongTian,data.id,function (msg) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()