【鸿蒙阵bug】更新
parent
54deb133e4
commit
2ac574ff06
|
@ -60,9 +60,9 @@ function this.InitData(guideData)
|
|||
end
|
||||
|
||||
-- 测试功能引导用
|
||||
Timer.New(function()
|
||||
this.OnFunctionOpen(78)
|
||||
end, 1):Start()
|
||||
-- Timer.New(function()
|
||||
-- this.OnFunctionOpen(78)
|
||||
-- end, 1):Start()
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ HarmonyManager.UnLoadGongMing = 0
|
|||
--判断是否鸿蒙共享数据
|
||||
local equipConfig = ConfigManager.GetConfig(ConfigName.EquipConfig)
|
||||
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
|
||||
HarmonyManager.TowerStartLimit = 0
|
||||
HarmonyManager.equipCount = 0
|
||||
this.hongmengGongMingList = {}
|
||||
this.ChooseDataList = {}
|
||||
|
@ -32,6 +32,8 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
|
|||
-- 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
|
||||
LogGreen("hongmengHeroInfos",#this.hongmengHeroInfos)
|
||||
for i = 1, #this.hongmengGuards do
|
||||
|
@ -176,8 +178,7 @@ function this:SetTowerInit()
|
|||
local heroDataList = HeroManager.GetAllHeroDatas(1)
|
||||
local list = {}
|
||||
local count = 0;
|
||||
--this.GuardList = HeroManager.GetAllHeroDatas(330)
|
||||
-- LogBlue("this.GuardList长度:"..LengthOfTable(this.GuardList))
|
||||
|
||||
for key, value in pairs(this.hongmengGuards) do
|
||||
if value.heroId ~= "" then
|
||||
local data = HeroManager.GetSingleHeroData(value.heroId)
|
||||
|
@ -509,7 +510,7 @@ end
|
|||
function this.RefreshUpTowerPoint()
|
||||
-- body
|
||||
local sum = this:HongMengTowerUpLimit()
|
||||
if this.hongmengTablet > 330 + sum * 5 then
|
||||
if this.hongmengTablet > this.TowerStartLimit + sum * 5 then
|
||||
-- body
|
||||
return false
|
||||
else
|
||||
|
|
|
@ -161,7 +161,7 @@ function GongMingResultTips:OnOpen(flag)
|
|||
local data = HarmonyManager:GetAdditions()
|
||||
for i = 1, #data do
|
||||
if data[i].additionType == 1 then
|
||||
if HarmonyManager.hongmengTablet >= 330 then
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
-- body
|
||||
Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d</color>",herodata.lv)
|
||||
else
|
||||
|
|
|
@ -49,14 +49,14 @@ function GongMingResultTips:OnOpen(skinId)
|
|||
-- print(key, " ",value)
|
||||
-- end
|
||||
|
||||
if HarmonyManager.hongmengTablet >= 330 then
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
-- body
|
||||
--LogGreen(HarmonyManager.hongmengTablet)
|
||||
for i = 1, #data do
|
||||
|
||||
if data[i].additionType == 1 then
|
||||
local num = HarmonyManager:HongMengTowerUpLimit()
|
||||
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(当前上限%d级)",HarmonyManager.hongmengTablet,330+num*5)
|
||||
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(当前上限%d级)",HarmonyManager.hongmengTablet,HarmonyManager.TowerStartLimit+num*5)
|
||||
elseif data[i].additionType == 2 then
|
||||
if data[i].value == -1 then
|
||||
-- body
|
||||
|
@ -158,10 +158,10 @@ function GongMingResultTips:OnOpen(skinId)
|
|||
if PlayerManager.level<75 then
|
||||
-- body
|
||||
this.contentHunText:SetActive(false)
|
||||
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
|
||||
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = ""
|
||||
else
|
||||
this.contentHunText:SetActive(true)
|
||||
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
|
||||
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=red>无</color>")
|
||||
end
|
||||
-- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value)
|
||||
--Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=red>无</color>")
|
||||
|
|
|
@ -59,7 +59,7 @@ function HongMengEnvoyPanel:InitEnvoyItemList(ItemPfb, parent)
|
|||
self.prefab[i] = Util.GetGameObject(self.panel, self.contents[i].panelName)
|
||||
self.contents[i].view:InitComponent(
|
||||
self.panel,
|
||||
BagManager.GetTotalItemNum(UpViewRechargeType.Gold),
|
||||
BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi),
|
||||
BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal),
|
||||
2
|
||||
)
|
||||
|
@ -110,7 +110,7 @@ function HongMengEnvoyPanel:BindEvent()
|
|||
function()
|
||||
--二级共鸣弹窗
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
if HarmonyManager.hongmengTablet > 330 + sum * 5 then
|
||||
if HarmonyManager.hongmengTablet > HarmonyManager.TowerStartLimit + sum * 5 then
|
||||
-- body
|
||||
PopupTipPanel.ShowTip("鸿蒙碑等级已达上限!")
|
||||
else
|
||||
|
@ -132,7 +132,7 @@ function HongMengEnvoyPanel:BindEvent()
|
|||
self.TextGrowthAmulet.text = GrowthAmulet
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
self.GradeText.text =
|
||||
string.format("%d/%d", HarmonyManager.hongmengTablet, 330 + sum * 5)
|
||||
string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
||||
--检测红点
|
||||
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
|
||||
for i = 1, #self.EnvoyItemList do
|
||||
|
@ -176,7 +176,7 @@ function HongMengEnvoyPanel:RunTimerFun()
|
|||
end
|
||||
function HongMengEnvoyPanel:IsUpBtnGray()
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
if HarmonyManager.hongmengTablet >= 330 + sum * 5 then
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit + sum * 5 then
|
||||
-- body
|
||||
Util.SetGray(self.UpBtn, true)
|
||||
self.imageGame:SetActive(false)
|
||||
|
@ -346,7 +346,7 @@ function HongMengEnvoyPanel:OnOpen(equipSId)
|
|||
self.TextGrowthAmulet.text = GrowthAmulet
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
|
||||
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, 330 + sum * 5)
|
||||
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
||||
self:IsUpBtnGray()
|
||||
self:InitTextMum()
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function HongMengUnLoadPanel:SetItem(go,data,index)
|
|||
Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(data.heroConfig.Quality,data.star))
|
||||
if index == 0 then
|
||||
-- body
|
||||
if HarmonyManager.hongmengTablet>=330 then
|
||||
if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
|
||||
-- body
|
||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
|
||||
else
|
||||
|
@ -119,7 +119,7 @@ function HongMengUnLoadPanel:SetText(go,_data)
|
|||
local data = HarmonyManager:GetAdditions()
|
||||
for i = 1, #data do
|
||||
if data[i].additionType == 1 then
|
||||
if HarmonyManager.hongmengTablet>=330 then
|
||||
if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
|
||||
Util.GetGameObject(go.transform,"Textdrgee"):GetComponent("Text").text = string.format("%d",_data.lv)
|
||||
else
|
||||
Util.GetGameObject(go.transform,"Textdrgee"):GetComponent("Text").text = string.format("%d",_data.lv)
|
||||
|
|
|
@ -143,6 +143,7 @@ function this.SingleBoxDataShow(go,boxData,index)
|
|||
Empty:SetActive(true)
|
||||
mask:SetActive(true)
|
||||
lock:SetActive(true)
|
||||
redPoint:SetActive(false)
|
||||
Util.SetGray(lock,true)
|
||||
local gridData = HarmonyManager.hongmengHeroInfos[boxData.Id]
|
||||
|
||||
|
@ -168,12 +169,14 @@ function this.SingleBoxDataShow(go,boxData,index)
|
|||
mask:SetActive(false)
|
||||
lock:SetActive(false)
|
||||
redPoint:SetActive(false)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
end
|
||||
elseif index == Box + 1 then
|
||||
mask:SetActive(false)
|
||||
Util.SetGray(lock,false)
|
||||
|
||||
tempData = boxData
|
||||
if HarmonyManager.RefreshOpenBoxPoint() then
|
||||
-- body
|
||||
CheckRedPointStatus(RedPointType.HongMeng_OpenBox)
|
||||
|
@ -181,6 +184,9 @@ function this.SingleBoxDataShow(go,boxData,index)
|
|||
else
|
||||
|
||||
end
|
||||
else
|
||||
TimerText.text = ""
|
||||
|
||||
end
|
||||
|
||||
Util.AddOnceClick(go,function()
|
||||
|
@ -202,7 +208,7 @@ function this.SingleBoxDataShow(go,boxData,index)
|
|||
print(" 添加等级 ",HarmonyManager.GongMingBox)
|
||||
else
|
||||
local content = ""
|
||||
local money = (HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) * 432
|
||||
local money = (HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) / 432
|
||||
content =string.format("是否花费%d妖晶直接恢复",money)
|
||||
|
||||
MsgPanel.ShowTwo(content,function ()
|
||||
|
@ -259,10 +265,13 @@ function this:UpdateItemShow(go,boxData,msg)
|
|||
end
|
||||
function this:AddBoxFun(boxData)
|
||||
local content = ""
|
||||
if Gold > boxData.PropPrice[2] then
|
||||
if Gold >= boxData.PropPrice[2] then
|
||||
content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2])
|
||||
else
|
||||
elseif Gold < boxData.PropPrice[2] and DemonCrystal >= boxData.MoneyPrice[2] then
|
||||
-- body
|
||||
content=string.format("玄黄之气不足%d,是否直接花费%d妖晶解锁共鸣位置?",boxData.PropPrice[2],boxData.MoneyPrice[2])
|
||||
else
|
||||
content = "妖晶不足!"
|
||||
end
|
||||
MsgPanel.ShowTwo(content,function ()
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ HeroData.__get__.lv = function(self)
|
|||
if temp_lv > 0 and HarmonyManager.IsInfo(self.dynamicId) then
|
||||
|
||||
--LogGreen(tostring(HeroManager.IsElevenStar(self.star)))
|
||||
if HeroManager.IsTenTalent(self.star) then
|
||||
if HeroManager.IsTenTalent(self.star) and HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit then
|
||||
-- body
|
||||
endLv = HarmonyManager.hongmengTablet
|
||||
else
|
||||
|
@ -28,7 +28,7 @@ HeroData.__get__.lv = function(self)
|
|||
|
||||
|
||||
return endLv
|
||||
elseif HarmonyManager.hongmengTablet>= 330 and HarmonyManager:IsEnvoy(self.dynamicId) then
|
||||
elseif HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit and HarmonyManager:IsEnvoy(self.dynamicId) then
|
||||
-- body
|
||||
--self._lv = HarmonyManager.hongmengTablet
|
||||
|
||||
|
|
|
@ -887,7 +887,7 @@ function this:BindEvent()
|
|||
end)
|
||||
|
||||
Util.AddClick(this.btnHongMeng,function()
|
||||
if HarmonyManager.hongmengTablet >= 330 then
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
-- body
|
||||
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
|
||||
else
|
||||
|
|
|
@ -241,7 +241,7 @@ function this:UpdateHeroUpLvAndBreakMaterialShow()
|
|||
end
|
||||
end
|
||||
|
||||
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or HarmonyManager:IsEnvoy(curHeroData.dynamicId)
|
||||
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengTablet >=HarmonyManager.TowerStartLimit)
|
||||
if isGongMing then
|
||||
this.gongmingText:SetActive(true)
|
||||
this.upLv:SetActive(false)
|
||||
|
|
|
@ -266,7 +266,7 @@ function this.SingleHeroDataShow(_go,_heroData)
|
|||
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
||||
-- body
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengTablet >= 330 then
|
||||
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
else
|
||||
|
||||
|
|
|
@ -59,15 +59,15 @@ function HarmonyView:OnOpen()
|
|||
table.insert(heroDataList,HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId))
|
||||
end
|
||||
end
|
||||
if #heroDataList > 0 then
|
||||
table.sort(heroDataList, function(a,b)
|
||||
if a.lv==b.lv then
|
||||
return a.warPower > b.warPower
|
||||
else
|
||||
return a.lv > b.lv
|
||||
end
|
||||
end)
|
||||
end
|
||||
-- if #heroDataList > 0 then
|
||||
-- table.sort(heroDataList, function(a,b)
|
||||
-- if a.lv==b.lv then
|
||||
-- return a.warPower > b.warPower
|
||||
-- else
|
||||
-- return a.lv > b.lv
|
||||
-- end
|
||||
-- end)
|
||||
-- end
|
||||
for i = 1, #self.HongMengData do
|
||||
if self.HongMengData[i] then
|
||||
-- body
|
||||
|
@ -84,13 +84,14 @@ function HarmonyView:OnOpen()
|
|||
|
||||
-- self.count = 1;
|
||||
-- self:SetGreen(self.HongMengData)
|
||||
|
||||
--LogGreen(heroDataList[6].name)
|
||||
|
||||
for i = 1, 6 do
|
||||
local singleHeroData = {}
|
||||
if heroDataList[i] then
|
||||
singleHeroData = heroDataList[i]
|
||||
self.HongMengData[i] = singleHeroData
|
||||
if i== 6 then
|
||||
if self.HongMengData[i].lv== heroDataList[#heroDataList].lv then
|
||||
-- body
|
||||
self:SetItem(self.HongMengData[i],self.GongMingTable[i],1)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue