From bd3bed7e413f870d4dbf382c0458e658753f85a9 Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Fri, 15 Apr 2022 11:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=91=E6=88=98=E5=89=AF=E6=9C=AC=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Battle/Logic/Misc/BattleDefine.lua | 2 ++ .../~Lua/Modules/Carbon/CarbonManager.lua | 5 ++++ .../Modules/Carbon/ChallengeCopyPanel.lua | 30 +++++++++++-------- .../~Lua/Modules/Net/NetManager.lua | 1 + 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index c0b57bb80a..a1ac1c46ca 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -30,6 +30,8 @@ BATTLE_SERVER_TYPE = { QiJieShiLian = 23,--七界试炼 CrossYuxuLunDaoFight = 24,--玉虚论道 LINGMAIMIJING = 25, --灵脉秘境 + ENDLESS_NEW_TEAM = 28, --新无尽副本 + TREASURE_TEAM=29, --宝物副本 } BattleEventName = { diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua index fd437c5f62..382402e871 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua @@ -1071,6 +1071,7 @@ this.challengeCopyDataTable = {} function this.InitChallengeCopyData(msg) for i = 1 , #msg.info do local index = msg.info[i].type + this.challengeCopyDataTable[index] = {} this.challengeCopyDataTable[index].type = msg.info[i].type this.challengeCopyDataTable[index].currentFloor = msg.info[i].currentFloor--层数 this.challengeCopyDataTable[index].openState = msg.info[i].overTime--0:关闭 1:开启 @@ -1087,5 +1088,9 @@ function this.CheckChallengeCopyId(type,id) end return 0 end +---更新挑战层数 +function this.UpdateChallengeCopyFloor(_type) + this.challengeCopyDataTable[_type].currentFloor=this.challengeCopyDataTable[_type].currentFloor+1 +end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua index 422f7b56f8..d7b078efb7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/ChallengeCopyPanel.lua @@ -35,8 +35,8 @@ local qualityBg={ local itemList={}--奖励容器 --每日副本服务器数据 -local buyTime=0--购买次数 -local freeTime=0--免费次数 +local buyTime=0--剩余购买次数 +local freeTime=0--剩余免费次数 --Tab local TabBox = require("Modules/Common/TabBox") @@ -125,7 +125,7 @@ end function ChallengeCopyPanel:RefreshRedPotShow() local tabs = Util.GetGameObject(this.tabBox,"box").transform for i = 1,tabs.childCount do - Util.GetGameObject(tabs:GetChild(i-1),"Redpot").gameObject:SetActive(CarbonManager.GetDailyCarbons(i).state) + Util.GetGameObject(tabs:GetChild(i-1),"Redpot").gameObject:SetActive(freeTime>0) end CheckRedPointStatus(RedPointType.HeroExplore) end @@ -231,13 +231,16 @@ function this.SetData(root, data, ldata) goIcon:SetActive(false) goIconNum:SetActive( false) + local usedTime=PrivilegeManager.GetPrivilegeUsedTimes(storeData.Limit)--已使用次数 + local limitTime=PrivilegeManager.GetPrivilegeNumber(storeData.Limit) --购买次数上限 + local buyTimes = (usedTime + 1) > limitTime and limitTime or usedTime+1 + LogBlue("~~~~~~~usedTime:"..usedTime.." limitTime"..limitTime) if freeTime<=0 then - goIconNumText.text=storeData.Cost[2][4] + goIconNumText.text=storeData.Cost[2][buyTimes] end --表现显示 Util.SetGray(goBtn, not isOpen) - LogBlue(data.Section.."~~~~~~~~~~~"..type) if type==1 or type==2 then goBtnText.text=Language[10287] goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuangse") @@ -271,7 +274,6 @@ function this.SetData(root, data, ldata) PopupTipPanel.ShowTip(string.format(Language[10295], GetLanguageStrById(mainLevelConfig[_point].Name))) return end - if not isOpen then PopupTipPanel.ShowTip(Language[10296]) return @@ -282,18 +284,20 @@ function this.SetData(root, data, ldata) PopupTipPanel.ShowTip(Language[10297]) return end - --检测妖晶数量 local itemId=storeData.Cost[1][1] --消耗道具 - if BagManager.GetItemCountById(itemId)0 then str=string.format(Language[12292],tostring(freeTime)) @@ -342,9 +348,9 @@ function this.TabAdapter(tab, index, status) lock:SetActive(islock) Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status]) end - +---检测tab是否锁定 function this.TabIsLockCheck(index) - if CarbonManager.challengeCopyDataTable[index].openState==1 then + if CarbonManager.challengeCopyDataTable[index].openState==0 then return true end return false diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index cb9983dc78..d125e06eea 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -5106,6 +5106,7 @@ end --请求挑战 copyType:1无尽副本 2宝物副本 type:1为挑战 2为扫荡 id:ChallengeStage表id function this.ChallengeCopyRequest(copyType,type,id,func) + LogBlue("---copyType----------type---------------id"..copyType.." "..type.." "..id) local data = PlayerInfoProto_pb.ChallengeRequest() data.type=copyType data.model=type