From 2ac574ff0608b91e75bd90236539c7bc1da56e27 Mon Sep 17 00:00:00 2001 From: guowei Date: Wed, 23 Dec 2020 17:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=B8=BF=E8=92=99=E9=98=B5bug?= =?UTF-8?q?=E3=80=91=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guide/GuideManager.lua | 6 ++--- .../Harmony/Manager/HarmonyManager.lua | 9 ++++---- .../Harmony/Panel/GongMingResultPanel.lua | 2 +- .../Harmony/Panel/GongMingResultTips.lua | 8 +++---- .../Harmony/Panel/HongMengEnvoyPanel.lua | 10 ++++---- .../Harmony/Panel/HongMengUnLoadPanel.lua | 4 ++-- .../Modules/Harmony/View/HarmonyScrllow.lua | 19 +++++++++++---- .../~Lua/Modules/Hero/HeroData.lua | 4 ++-- .../~Lua/Modules/Main/MainPanel.lua | 2 +- .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 2 +- .../~Lua/Modules/RoleInfo/RoleListPanel.lua | 2 +- .../~Lua/View/HarmonyView.lua | 23 ++++++++++--------- 12 files changed, 51 insertions(+), 40 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index 9eafa50b2a..4b72e969ed 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -60,9 +60,9 @@ function this.InitData(guideData) end -- 测试功能引导用 - Timer.New(function() - this.OnFunctionOpen(78) - end, 1):Start() + -- Timer.New(function() + -- this.OnFunctionOpen(78) + -- end, 1):Start() end diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index aa3b4725b0..1d5e170580 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -15,7 +15,7 @@ HarmonyManager.UnLoadGongMing = 0 --判断是否鸿蒙共享数据 local equipConfig = ConfigManager.GetConfig(ConfigName.EquipConfig) local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) - +HarmonyManager.TowerStartLimit = 0 HarmonyManager.equipCount = 0 this.hongmengGongMingList = {} this.ChooseDataList = {} @@ -32,6 +32,8 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet -- body this.hongmengGuards = hongmengGuards LogGreen("hongmengGuards",#this.hongmengGuards) + this.TowerStartLimit = tonumber(string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value,"#")[2]) + -- LogGreen("TowerStartLimit"..HarmonyManager.TowerStartLimit) this.hongmengHeroInfos = hongmengHeroInfos LogGreen("hongmengHeroInfos",#this.hongmengHeroInfos) for i = 1, #this.hongmengGuards do @@ -176,8 +178,7 @@ function this:SetTowerInit() local heroDataList = HeroManager.GetAllHeroDatas(1) local list = {} local count = 0; - --this.GuardList = HeroManager.GetAllHeroDatas(330) - -- LogBlue("this.GuardList长度:"..LengthOfTable(this.GuardList)) + for key, value in pairs(this.hongmengGuards) do if value.heroId ~= "" then local data = HeroManager.GetSingleHeroData(value.heroId) @@ -509,7 +510,7 @@ end function this.RefreshUpTowerPoint() -- body local sum = this:HongMengTowerUpLimit() - if this.hongmengTablet > 330 + sum * 5 then + if this.hongmengTablet > this.TowerStartLimit + sum * 5 then -- body return false else diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua index 64590213c9..52a28ec059 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua @@ -161,7 +161,7 @@ function GongMingResultTips:OnOpen(flag) local data = HarmonyManager:GetAdditions() for i = 1, #data do if data[i].additionType == 1 then - if HarmonyManager.hongmengTablet >= 330 then + if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then -- body Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = string.format("%d",herodata.lv) else diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua index 31257c7ff9..22b63faafe 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua @@ -49,14 +49,14 @@ function GongMingResultTips:OnOpen(skinId) -- print(key, " ",value) -- end - if HarmonyManager.hongmengTablet >= 330 then + if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then -- body --LogGreen(HarmonyManager.hongmengTablet) for i = 1, #data do if data[i].additionType == 1 then local num = HarmonyManager:HongMengTowerUpLimit() - Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("%d级(当前上限%d级)",HarmonyManager.hongmengTablet,330+num*5) + Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("%d级(当前上限%d级)",HarmonyManager.hongmengTablet,HarmonyManager.TowerStartLimit+num*5) elseif data[i].additionType == 2 then if data[i].value == -1 then -- body @@ -158,10 +158,10 @@ function GongMingResultTips:OnOpen(skinId) if PlayerManager.level<75 then -- body this.contentHunText:SetActive(false) - Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = "" + Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = "" else this.contentHunText:SetActive(true) - Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("无") + Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("无") end -- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("%d",data[i].value) --Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("无") diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua index 7d1a8f8d5c..3d43df1b04 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua @@ -59,7 +59,7 @@ function HongMengEnvoyPanel:InitEnvoyItemList(ItemPfb, parent) self.prefab[i] = Util.GetGameObject(self.panel, self.contents[i].panelName) self.contents[i].view:InitComponent( self.panel, - BagManager.GetTotalItemNum(UpViewRechargeType.Gold), + BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi), BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal), 2 ) @@ -110,7 +110,7 @@ function HongMengEnvoyPanel:BindEvent() function() --二级共鸣弹窗 local sum = HarmonyManager:HongMengTowerUpLimit() - if HarmonyManager.hongmengTablet > 330 + sum * 5 then + if HarmonyManager.hongmengTablet > HarmonyManager.TowerStartLimit + sum * 5 then -- body PopupTipPanel.ShowTip("鸿蒙碑等级已达上限!") else @@ -132,7 +132,7 @@ function HongMengEnvoyPanel:BindEvent() self.TextGrowthAmulet.text = GrowthAmulet local sum = HarmonyManager:HongMengTowerUpLimit() self.GradeText.text = - string.format("%d/%d", HarmonyManager.hongmengTablet, 330 + sum * 5) + string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5) --检测红点 CheckRedPointStatus(RedPointType.HongMeng_UpTower) for i = 1, #self.EnvoyItemList do @@ -176,7 +176,7 @@ function HongMengEnvoyPanel:RunTimerFun() end function HongMengEnvoyPanel:IsUpBtnGray() local sum = HarmonyManager:HongMengTowerUpLimit() - if HarmonyManager.hongmengTablet >= 330 + sum * 5 then + if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit + sum * 5 then -- body Util.SetGray(self.UpBtn, true) self.imageGame:SetActive(false) @@ -346,7 +346,7 @@ function HongMengEnvoyPanel:OnOpen(equipSId) self.TextGrowthAmulet.text = GrowthAmulet local sum = HarmonyManager:HongMengTowerUpLimit() - self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, 330 + sum * 5) + self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5) self:IsUpBtnGray() self:InitTextMum() diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua index 6bc88dd443..3870a99504 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua @@ -76,7 +76,7 @@ function HongMengUnLoadPanel:SetItem(go,data,index) Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(data.heroConfig.Quality,data.star)) if index == 0 then -- body - if HarmonyManager.hongmengTablet>=330 then + if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then -- body Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("%d",data.lv) else @@ -119,7 +119,7 @@ function HongMengUnLoadPanel:SetText(go,_data) local data = HarmonyManager:GetAdditions() for i = 1, #data do if data[i].additionType == 1 then - if HarmonyManager.hongmengTablet>=330 then + if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then Util.GetGameObject(go.transform,"Textdrgee"):GetComponent("Text").text = string.format("%d",_data.lv) else Util.GetGameObject(go.transform,"Textdrgee"):GetComponent("Text").text = string.format("%d",_data.lv) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua index 2e072f0ba3..006b86b8f5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -143,6 +143,7 @@ function this.SingleBoxDataShow(go,boxData,index) Empty:SetActive(true) mask:SetActive(true) lock:SetActive(true) + redPoint:SetActive(false) Util.SetGray(lock,true) local gridData = HarmonyManager.hongmengHeroInfos[boxData.Id] @@ -168,12 +169,14 @@ function this.SingleBoxDataShow(go,boxData,index) mask:SetActive(false) lock:SetActive(false) redPoint:SetActive(false) - end + end + else + end elseif index == Box + 1 then mask:SetActive(false) Util.SetGray(lock,false) - + tempData = boxData if HarmonyManager.RefreshOpenBoxPoint() then -- body CheckRedPointStatus(RedPointType.HongMeng_OpenBox) @@ -181,6 +184,9 @@ function this.SingleBoxDataShow(go,boxData,index) else end + else + TimerText.text = "" + end Util.AddOnceClick(go,function() @@ -202,7 +208,7 @@ function this.SingleBoxDataShow(go,boxData,index) print(" 添加等级 ",HarmonyManager.GongMingBox) else local content = "" - local money = (HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) * 432 + local money = (HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) / 432 content =string.format("是否花费%d妖晶直接恢复",money) MsgPanel.ShowTwo(content,function () @@ -259,10 +265,13 @@ function this:UpdateItemShow(go,boxData,msg) end function this:AddBoxFun(boxData) local content = "" - if Gold > boxData.PropPrice[2] then + if Gold >= boxData.PropPrice[2] then content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2]) - else + elseif Gold < boxData.PropPrice[2] and DemonCrystal >= boxData.MoneyPrice[2] then + -- body content=string.format("玄黄之气不足%d,是否直接花费%d妖晶解锁共鸣位置?",boxData.PropPrice[2],boxData.MoneyPrice[2]) + else + content = "妖晶不足!" end MsgPanel.ShowTwo(content,function () diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua index 6c5a17ddae..95754648de 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua @@ -17,7 +17,7 @@ HeroData.__get__.lv = function(self) if temp_lv > 0 and HarmonyManager.IsInfo(self.dynamicId) then --LogGreen(tostring(HeroManager.IsElevenStar(self.star))) - if HeroManager.IsTenTalent(self.star) then + if HeroManager.IsTenTalent(self.star) and HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit then -- body endLv = HarmonyManager.hongmengTablet else @@ -28,7 +28,7 @@ HeroData.__get__.lv = function(self) return endLv - elseif HarmonyManager.hongmengTablet>= 330 and HarmonyManager:IsEnvoy(self.dynamicId) then + elseif HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit and HarmonyManager:IsEnvoy(self.dynamicId) then -- body --self._lv = HarmonyManager.hongmengTablet diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index fd80767655..cea7b54343 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -887,7 +887,7 @@ function this:BindEvent() end) Util.AddClick(this.btnHongMeng,function() - if HarmonyManager.hongmengTablet >= 330 then + if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then -- body UIManager.OpenPanel(UIName.HongMengEnvoyPanel) else diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 79295d1724..69b1be2a02 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -241,7 +241,7 @@ function this:UpdateHeroUpLvAndBreakMaterialShow() end end - local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or HarmonyManager:IsEnvoy(curHeroData.dynamicId) + local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengTablet >=HarmonyManager.TowerStartLimit) if isGongMing then this.gongmingText:SetActive(true) this.upLv:SetActive(false) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua index 6970478088..d28c3ac8fa 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua @@ -266,7 +266,7 @@ function this.SingleHeroDataShow(_go,_heroData) if HarmonyManager.IsChangeColor(heroData.dynamicId) then -- body Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = ""..heroData.lv.."" - elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengTablet >= 330 then + elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = ""..heroData.lv.."" else diff --git a/Assets/ManagedResources/~Lua/View/HarmonyView.lua b/Assets/ManagedResources/~Lua/View/HarmonyView.lua index 36640ffcf5..b4579732c6 100644 --- a/Assets/ManagedResources/~Lua/View/HarmonyView.lua +++ b/Assets/ManagedResources/~Lua/View/HarmonyView.lua @@ -59,15 +59,15 @@ function HarmonyView:OnOpen() table.insert(heroDataList,HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)) end end - if #heroDataList > 0 then - table.sort(heroDataList, function(a,b) - if a.lv==b.lv then - return a.warPower > b.warPower - else - return a.lv > b.lv - end - end) - end + -- if #heroDataList > 0 then + -- table.sort(heroDataList, function(a,b) + -- if a.lv==b.lv then + -- return a.warPower > b.warPower + -- else + -- return a.lv > b.lv + -- end + -- end) + -- end for i = 1, #self.HongMengData do if self.HongMengData[i] then -- body @@ -84,13 +84,14 @@ function HarmonyView:OnOpen() -- self.count = 1; -- self:SetGreen(self.HongMengData) - + --LogGreen(heroDataList[6].name) + for i = 1, 6 do local singleHeroData = {} if heroDataList[i] then singleHeroData = heroDataList[i] self.HongMengData[i] = singleHeroData - if i== 6 then + if self.HongMengData[i].lv== heroDataList[#heroDataList].lv then -- body self:SetItem(self.HongMengData[i],self.GongMingTable[i],1) else