From d55b0d58e919f76e18971dc5889ee39fc0b0e862 Mon Sep 17 00:00:00 2001 From: guowei Date: Mon, 28 Dec 2020 14:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=B8=BF=E8=92=99=E9=98=B5bug=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Harmony/Manager/HarmonyManager.lua | 21 ++++++++++++------- .../Modules/Harmony/View/HarmonyScrllow.lua | 4 ++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index b53b61ee9b..86a49a8529 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -15,6 +15,7 @@ HarmonyManager.UnLoadGongMing = 0 --判断是否鸿蒙共享数据 local equipConfig = ConfigManager.GetConfig(ConfigName.EquipConfig) local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) +this.tab=ConfigManager.GetConfig(ConfigName.Hongmeng) HarmonyManager.TowerStartLimit = 0 HarmonyManager.equipCount = 0 this.hongmengGongMingList = {} @@ -27,21 +28,19 @@ this.ChooseDataList = {} -- 鸿蒙塔升级数据表 local HongmengUp = ConfigManager.GetConfig(ConfigName.HongmengUp) - +local keys = nil function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions) -- 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 + keys = GameDataBase.SheetBase.GetKeys(this.tab) + for i = 1, #this.hongmengGuards do - -- if this.hongmengGuards[i].heroId ~= "" then - -- -- body - -- LogGreen(this.hongmengGuards[i].heroId) - -- end - this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp() end @@ -70,7 +69,10 @@ end function this.UpdateHongMengDataGuards(hongmengGuards) this.hongmengGuards = hongmengGuards - + for i = 1, #this.hongmengGuards do + this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp() + end + if this.hongmengTablet < this.TowerStartLimit then -- body this:SetInitList() @@ -81,6 +83,9 @@ end function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos) this.hongmengHeroInfos = hongmengHeroInfos + for i = 1, #this.hongmengHeroInfos do + this.hongmengHeroInfos[i].time = this.hongmengHeroInfos[i].time + GetTimeStamp() + end if this.hongmengTablet < this.TowerStartLimit then -- body @@ -532,7 +537,7 @@ function this.RefreshOpenBoxPoint() -- body return false end - if Gold > tab[#this.hongmengHeroInfos].PropPrice[2] or DemonCrystal > tab[#this.hongmengHeroInfos].MoneyPrice[2] then + if (Gold > tab[#this.hongmengHeroInfos].PropPrice[2] or DemonCrystal > tab[#this.hongmengHeroInfos].MoneyPrice[2]) and #this.hongmengHeroInfos < #keys then return true else return false diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua index b51d76027a..858201ab84 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -89,6 +89,7 @@ function this:InitBox() -- local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 + this.ScrollView:SetData(keys,function (index, go) local key = keys[index] this.SingleBoxDataShow(go, this.tab[key], index) @@ -111,6 +112,7 @@ function this.RunTimerFun() for key, value in pairs(ItemList) do if value <= #HarmonyManager.hongmengHeroInfos then TextList[value].text = "" + -- print("倒计时开启 .."..HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp()) if HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp() > 0 then if BoxList[value].activeSelf == false then @@ -123,6 +125,8 @@ function this.RunTimerFun() HarmonyManager.hongmengHeroInfos[value].time = 0 TextList[value].text = "" end + else + end end