【鸿蒙阵临时改版】

dev_chengFeng
guowei 2020-12-24 14:43:32 +08:00
parent 2ac574ff06
commit 130ee0c212
3 changed files with 11 additions and 4 deletions

View File

@ -66,6 +66,7 @@ end
function this:UpdateHongMengData(hongmengGuards,hongmengAdditions) function this:UpdateHongMengData(hongmengGuards,hongmengAdditions)
this.hongmengGuards = hongmengGuards this.hongmengGuards = hongmengGuards
this.hongmengAdditions = hongmengAdditions this.hongmengAdditions = hongmengAdditions
print("刷新hongmengGuards")
end end
--初始化共鸣列表数据 --初始化共鸣列表数据
@ -483,12 +484,13 @@ end
function this.RefreshOpenBoxPoint() function this.RefreshOpenBoxPoint()
local tab = ConfigManager.GetConfig(ConfigName.Hongmeng) 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 if #this.hongmengHeroInfos<=0 then
-- body -- body
return false return false
end 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 return true
else else
return false return false

View File

@ -265,6 +265,7 @@ function this:UpdateItemShow(go,boxData,msg)
end end
function this:AddBoxFun(boxData) function this:AddBoxFun(boxData)
local content = "" local content = ""
if Gold >= boxData.PropPrice[2] then if Gold >= boxData.PropPrice[2] then
content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2]) content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2])
elseif Gold < boxData.PropPrice[2] and DemonCrystal >= boxData.MoneyPrice[2] then elseif Gold < boxData.PropPrice[2] and DemonCrystal >= boxData.MoneyPrice[2] then
@ -315,6 +316,9 @@ function this:Refesh(id)
Box = Box + 1 Box = Box + 1
OpenBox = OpenBox + 1 OpenBox = OpenBox + 1
Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi)
DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal)
if self.stage == 1 then if self.stage == 1 then
-- body -- body

View File

@ -121,12 +121,13 @@ end
function this.HongMengIndication(buffer) function this.HongMengIndication(buffer)
local data = buffer:DataByte() local data = buffer:DataByte()
local msg = HeroInfoProto_pb.GetSkinIndication() local msg = HeroInfoProto_pb.HongmengInfoIndication()
msg:ParseFromString(data) msg:ParseFromString(data)
print("更新数据") LogGreen("更新数据")
if msg.hongmengGuards or msg.hongmengAdditions then if msg.hongmengGuards or msg.hongmengAdditions then
-- body -- body
HarmonyManager.UpdateHongMengData(msg.hongmengGuards,msg.hongmengAdditions) HarmonyManager.UpdateHongMengData(msg.hongmengGuards,msg.hongmengAdditions)
end end
end end