diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index 1d5e170580..575a9dc79a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -66,6 +66,7 @@ end function this:UpdateHongMengData(hongmengGuards,hongmengAdditions) this.hongmengGuards = hongmengGuards this.hongmengAdditions = hongmengAdditions + print("刷新hongmengGuards") end --初始化共鸣列表数据 @@ -483,12 +484,13 @@ end function this.RefreshOpenBoxPoint() local tab = ConfigManager.GetConfig(ConfigName.Hongmeng) - local money = BagManager.GetTotalItemNum(UpViewRechargeType.Gold) + local Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi) + local DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal) if #this.hongmengHeroInfos<=0 then -- body return false end - if money > tab[#this.hongmengHeroInfos].PropPrice[2] or money > tab[#this.hongmengHeroInfos].MoneyPrice[2] then + if Gold > tab[#this.hongmengHeroInfos].PropPrice[2] or DemonCrystal > tab[#this.hongmengHeroInfos].MoneyPrice[2] 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 006b86b8f5..d5c1d65755 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -265,6 +265,7 @@ function this:UpdateItemShow(go,boxData,msg) end function this:AddBoxFun(boxData) local content = "" + if Gold >= boxData.PropPrice[2] then content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2]) elseif Gold < boxData.PropPrice[2] and DemonCrystal >= boxData.MoneyPrice[2] then @@ -315,6 +316,9 @@ function this:Refesh(id) Box = Box + 1 OpenBox = OpenBox + 1 + + Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi) + DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal) if self.stage == 1 then -- body diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index 29eeecd294..0cac2b7f8a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -121,12 +121,13 @@ end function this.HongMengIndication(buffer) local data = buffer:DataByte() - local msg = HeroInfoProto_pb.GetSkinIndication() + local msg = HeroInfoProto_pb.HongmengInfoIndication() msg:ParseFromString(data) - print("更新数据") + LogGreen("更新数据") if msg.hongmengGuards or msg.hongmengAdditions then -- body + HarmonyManager.UpdateHongMengData(msg.hongmengGuards,msg.hongmengAdditions) end end