【红点修改】

dev_chengFeng
guowei 2021-02-20 11:00:40 +08:00 committed by DESKTOP-98AVA47\Administrator
parent 3c34072214
commit 4a4f613ab2
2 changed files with 21 additions and 15 deletions

View File

@ -202,7 +202,7 @@ function this.IsGongMing(did)
end end
-- body -- body
end end
--初始化选人列表的长度
function this:SetInitList() function this:SetInitList()
local heroDataList = HeroManager.GetAllHeroDatas(1) local heroDataList = HeroManager.GetAllHeroDatas(1)
local list = {} local list = {}
@ -558,16 +558,17 @@ end
function this.RefreshEnvoyPoint() function this.RefreshEnvoyPoint()
-- body -- body
if this.hongmengAdditions[1] then local data = this.GetSingleAdditionsData(HarmonyAddType.AddLv)
if data then
-- body -- body
if this.hongmengAdditions[1].heroTid == 0 then if data.heroTid == 0 then
-- body -- body
local sum = this:HongMengTowerUpLimit() local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value <= sum then if data.value <= sum then
-- body -- body
for i = 1, #this.hongmengGuards do for i = 1, #this.hongmengGuards do
-- body -- body
if this.hongmengGuards[i].heroId == "" and this.hongmengGuards[i].time == 0 then if data.heroId == "" and data.time == 0 then
-- body -- body
return true return true
end end
@ -583,21 +584,25 @@ end
function this.RefreshUpTowerPoint() function this.RefreshUpTowerPoint()
-- body -- body
if this.hongmengAdditions[1] then local data = this.GetSingleAdditionsData(HarmonyAddType.AddLv)
if data then
-- body -- body
if this.hongmengAdditions[1].heroTid == 0 then if data.heroTid == 0 then
-- body -- body
local sum = this:HongMengTowerUpLimit() local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value >= sum then print(sum,data.value)
if data.value >= sum then
-- body -- body
print("false")
return false return false
else else
local data = this.GetHongMengUpData() local prop = this.GetHongMengUpData()
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2]) -- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold)) -- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then if prop and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= prop.LevelUp[1][2] then
-- body -- body
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= prop.LevelUp[2][2] then
print("true")
return true return true
end end

View File

@ -110,8 +110,8 @@ function HongMengEnvoyPanel:BindEvent()
self.UpBtn, self.UpBtn,
function() function()
--二级共鸣弹窗 --二级共鸣弹窗
local sum = HarmonyManager:HongMengTowerUpLimit()
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value >= sum then if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value >= HarmonyManager:HongMengTowerUpLimit() then
-- body -- body
PopupTipPanel.ShowTip("鸿蒙碑等级已达上限!") PopupTipPanel.ShowTip("鸿蒙碑等级已达上限!")
else else
@ -132,7 +132,7 @@ function HongMengEnvoyPanel:BindEvent()
NetManager.UpHongMengGrade( NetManager.UpHongMengGrade(
function() function()
-- body -- body
local sum = HarmonyManager:HongMengTowerUpLimit()
HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value = HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value + 1 HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value = HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value + 1
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value >= sum then if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value >= sum then
-- body -- body
@ -143,7 +143,7 @@ function HongMengEnvoyPanel:BindEvent()
self.UpBtnRedPoint:SetActive(false) self.UpBtnRedPoint:SetActive(false)
end end
local sum = HarmonyManager:HongMengTowerUpLimit()
self.GradeText.text = string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum) self.GradeText.text = string.format("%d/%d", HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).value, sum)
--检测红点 UpdateGongMingLv --检测红点 UpdateGongMingLv
@ -208,6 +208,7 @@ function HongMengEnvoyPanel:IsUpBtnGray()
self.imageGame:SetActive(false) self.imageGame:SetActive(false)
self.TextGame:SetActive(false) self.TextGame:SetActive(false)
self.UnShowText:SetActive(true) self.UnShowText:SetActive(true)
-- self.UpBtnRedPoint:SetActive(false)
else else
Util.SetGray(self.UpBtn, false) Util.SetGray(self.UpBtn, false)
self.imageGame:SetActive(true) self.imageGame:SetActive(true)