diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index be03c23f91..51f5b15d73 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -681,6 +681,9 @@ RedPointType = { Recharge = 120, RightUp2 = 122,--主界面右上角伸缩条 + challengeCopy=123,--挑战副本 + + ----礼包相关------ Operating = 201, --运营(主界面礼包) CumulativeSignIn = 202,--累计签到 diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua index d5714010b8..ebe30bb2cb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua @@ -864,6 +864,18 @@ function this. CarbonRedCheck(redType) return true end return false + elseif redType == RedPointType.challengeCopy then + for k,v in pairs(this.challengeCopyDataTable) do + if v.openState==1 then + local configData= ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChallengeStage,"Chapter",v.type,"Section",1) + local freeTimeId=configData.PivilegeID[2] + local freeTime=PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数 + if freeTime>0 then + return true + end + end + end + return false end end diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua index 2cd6ebfd1c..43b7c5cadd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua @@ -125,7 +125,7 @@ function ChallengeCopyPanel:RefreshRedPotShow() for i = 1,tabs.childCount do Util.GetGameObject(tabs:GetChild(i-1),"Redpot").gameObject:SetActive(CarbonManager.challengeCopyDataTable[i].openState==1 and freeTime>0) end - CheckRedPointStatus(RedPointType.HeroExplore) + CheckRedPointStatus(RedPointType.challengeCopy) end function ChallengeCopyPanel:OnClose() @@ -303,27 +303,6 @@ function this.SetData(root, data) end) end) end - - -- TODO: 没有战斗结果校验 - -- NetManager.ChallengeCopyRequest(data.Chapter,type,data.Id,function(msg) - -- local fightData = BattleManager.GetBattleServerData(msg) - -- if type==1 then --挑战 - -- UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.CHALLENG_COPY , function(result) - -- if result.result ==0 then - -- elseif result.result==1 then - -- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() - -- CarbonManager.UpdateChallengeCopyFloor(data.Chapter) - -- this.RefreshShow(carbonIndex,false,false) - -- end) - -- end - -- end) - -- elseif type==2 then --扫荡 - -- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() - -- PrivilegeManager.RefreshPrivilegeUsedTimes(data.PivilegeID[2],1) - -- this.RefreshShow(carbonIndex,false,false) - -- end) - -- end - -- end) end) end @@ -334,8 +313,6 @@ function this.SetTimeTip() local freeTimeId=curData[1].PivilegeID[2] buyTime= ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数 freeTime=PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数 - LogGreen("购买次数:"..buyTime.." 免费次数:"..freeTime) - LogGreen("storeData.Id:"..storeData.Id.." GoodsName"..storeData.GoodsName) local str="" if freeTime>0 then str=string.format(Language[12292],tostring(freeTime)) diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/NewCarbon/CarbonsPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/NewCarbon/CarbonsPanel.lua index c4cb2e6390..907e84c7a7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/NewCarbon/CarbonsPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/NewCarbon/CarbonsPanel.lua @@ -43,7 +43,7 @@ local carbonData = { objName = "endless", nameImg = "f_fuben_fubenming_06", btnPos = Vector2(86,-9), - redPointType = RedPointType.EndLess, + redPointType = RedPointType.challengeCopy, effect1 = "Fx_WuJinFuBen", effect2 = "Fx_WuJinFuBen_S", }, diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 7a78949d37..601b0dedda 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -104,6 +104,7 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.HeroExplore, RedPointType.ExploreMain)--日常副本 RPData:SetParent(RedPointType.EpicExplore, RedPointType.ExploreMain)--心魔试炼 RPData:SetParent(RedPointType.FightLevel, RedPointType.ExploreMain)--山河社稷图 + RPData:SetParent(RedPointType.challengeCopy, RedPointType.ExploreMain)--挑战副本 RPData:SetParent(RedPointType.LegendExplore, RedPointType.Guild)--车迟斗法 RPData:SetParent(RedPointType.HeartDemon,RedPointType.EpicExplore) @@ -530,6 +531,7 @@ function this.RegisterRedCheckFunc() RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck) RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck) + RPData:AddCheckFunc(RedPointType.challengeCopy, CarbonManager.CarbonRedCheck) --RPData:AddCheckFunc(RedPointType.HeartDemon, CarbonManager.CarbonRedCheck) RPData:AddCheckFunc(RedPointType.EpicExplore_LevleReward, CarbonManager.CarbonRedCheck) RPData:AddCheckFunc(RedPointType.EpicExplore_MoppingUp, MonsterCampManager.CarbonRedCheck)