【鸿蒙阵bug 修改】

dev_chengFeng
guowei 2020-12-28 14:12:17 +08:00
parent d989aa5b85
commit d55b0d58e9
2 changed files with 17 additions and 8 deletions

View File

@ -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

View File

@ -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