【鸿蒙阵临时改版】
parent
2ac574ff06
commit
130ee0c212
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue