【鸿蒙阵修改】
parent
4939dd69b8
commit
ca9a6a933b
|
@ -428,8 +428,9 @@ GameEvent = {
|
|||
UnLoadData = "HongMeng.UnLoadData",
|
||||
OnlyRefeshText = "HongMeng.OnlyRefeshText",
|
||||
--鸿蒙塔消息号
|
||||
UpHongMengEnvoy = "UpHongMengEnvoy",
|
||||
UpHongMengEnvoy = "HongMeng.UpHongMengEnvoy",
|
||||
UnLoadHongMengEnvoy = "HongMeng.UnLoadHongMengEnvoy",
|
||||
|
||||
UpdateGongMingLv= "HongMeng.UpdateGongMingLv",
|
||||
|
||||
}
|
||||
}
|
|
@ -455,9 +455,15 @@ function this.SetCardSingleData(o, heroId, _pos, _heroData)
|
|||
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
||||
-- body
|
||||
lv.text="<color=#0f0>"..heroData.lv.."</color>"
|
||||
elseif HarmonyManager.IsGongMing(heroData.dynamicId) and HarmonyManager.hongmengTablet >= 330 then
|
||||
elseif HarmonyManager.IsGongMing(heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||
-- bod
|
||||
lv.text="<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
lv.text="<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
else
|
||||
lv.text=heroData.lv
|
||||
end
|
||||
|
||||
else
|
||||
lv.text=heroData.lv
|
||||
end
|
||||
|
|
|
@ -95,7 +95,7 @@ end
|
|||
|
||||
function EnvoyItem:SetItem(go,data)
|
||||
self.data = data
|
||||
LogGreen("HeroId",data.heroId)
|
||||
-- LogGreen("HeroId",data.heroId)
|
||||
CheckRedPointStatus(RedPointType.HongMeng_Evory)
|
||||
if data.heroId ~= "" then
|
||||
-- body
|
||||
|
@ -105,12 +105,12 @@ function EnvoyItem:SetItem(go,data)
|
|||
Util.GetGameObject(go.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
||||
if HeroManager.IsTenTalent(heroSingleData.star) then
|
||||
-- body
|
||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengAdditions[1].value)
|
||||
else
|
||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",heroSingleData.lv)
|
||||
end
|
||||
|
||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
||||
--Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengAdditions[1].value)
|
||||
|
||||
Util.GetGameObject(go.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(heroSingleData.icon)
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ function HarmonyPanel:BindEvent()
|
|||
--共鸣按钮
|
||||
Util.AddClick(self.GongMingBtn,function()
|
||||
local count = HarmonyManager:IsEnvoyCount()
|
||||
if count >= 6 then
|
||||
if count > 6 then
|
||||
-- body
|
||||
UIManager.OpenPanel(UIName.GongMingResultTips)
|
||||
else
|
||||
|
|
|
@ -34,7 +34,7 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
|
|||
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
|
||||
|
@ -61,13 +61,18 @@ function this.UpdateHongMengDataGuards(hongmengGuards)
|
|||
for i = 1, #this.hongmengGuards do
|
||||
this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp()
|
||||
end
|
||||
|
||||
if this.hongmengTablet < this.TowerStartLimit then
|
||||
-- body
|
||||
this:SetInitList()
|
||||
else
|
||||
this:SetTowerInit()
|
||||
end
|
||||
if this.hongmengAdditions[1] then
|
||||
-- body
|
||||
if this.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
this:SetTowerInit()
|
||||
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||
-- body
|
||||
else
|
||||
this:SetInitList()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
|
||||
|
@ -76,40 +81,56 @@ function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
|
|||
this.hongmengHeroInfos[i].time = this.hongmengHeroInfos[i].time + GetTimeStamp()
|
||||
end
|
||||
|
||||
if this.hongmengTablet < this.TowerStartLimit then
|
||||
if this.hongmengAdditions[1] then
|
||||
-- body
|
||||
this:SetInitList()
|
||||
else
|
||||
this:SetTowerInit()
|
||||
if this.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
this:SetTowerInit()
|
||||
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||
-- body
|
||||
else
|
||||
this:SetInitList()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function this.UpdateHongMengDataAdditions(hongmengAdditions)
|
||||
this.hongmengAdditions = hongmengAdditions
|
||||
|
||||
for i = 1, #this.hongmengAdditions do
|
||||
print(this.hongmengAdditions[i].heroTid)
|
||||
print(this.hongmengAdditions[i].value)
|
||||
end
|
||||
for i = 1, #this.hongmengAdditions do
|
||||
|
||||
if this.hongmengAdditions[i].additionType == HarmonyAddType.AddEquip then
|
||||
if this.hongmengAdditions[i].value ~= -1 then
|
||||
local curEquipIdList = {}
|
||||
local curEquipConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Star",this.hongmengAdditions[i].value)
|
||||
for i = 1, #curEquipConfigs do
|
||||
if this.hongmengAdditions[i].value > 0 then
|
||||
local curEquipIdList = {}
|
||||
local curEquipConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Star",this.hongmengAdditions[i].value)
|
||||
for i = 1, #curEquipConfigs do
|
||||
|
||||
table.insert(curEquipIdList,curEquipConfigs[i].Id)
|
||||
end
|
||||
this.HarmonyUpdateEquipData(curEquipIdList, "")
|
||||
table.insert(curEquipIdList,curEquipConfigs[i].Id)
|
||||
end
|
||||
this.HarmonyUpdateEquipData(curEquipIdList, "")
|
||||
end
|
||||
end
|
||||
end
|
||||
if this.hongmengAdditions[1].additionTypetion == 0 then
|
||||
if this.hongmengAdditions[1] then
|
||||
-- body
|
||||
|
||||
end
|
||||
if this.hongmengTablet < this.TowerStartLimit then
|
||||
-- body
|
||||
this:SetInitList()
|
||||
else
|
||||
this:SetTowerInit()
|
||||
if this.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
this:SetTowerInit()
|
||||
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||
-- body
|
||||
else
|
||||
this:SetInitList()
|
||||
end
|
||||
end
|
||||
-- if this.hongmengTablet < this.TowerStartLimit then
|
||||
-- -- body
|
||||
|
||||
-- else
|
||||
|
||||
-- end
|
||||
end
|
||||
|
||||
--初始化共鸣列表数据
|
||||
|
@ -293,8 +314,6 @@ function this:IsEnvoy(did)
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
return false
|
||||
end
|
||||
-- 设置、获取鸿蒙守卫的列表
|
||||
|
@ -383,7 +402,7 @@ function this.GetHongMengUpData()
|
|||
|
||||
for key, value in ConfigPairs(HongmengUp) do
|
||||
-- body
|
||||
if value.HongmengLevel == this.hongmengTablet+1 then
|
||||
if value.HongmengLevel == this.hongmengAdditions[1].value + 1 then
|
||||
-- body
|
||||
|
||||
return ConfigManager.TryGetConfigData(ConfigName.HongmengUp,key)
|
||||
|
@ -528,6 +547,7 @@ end
|
|||
|
||||
function this.RefreshOpenBoxPoint()
|
||||
local tab = ConfigManager.GetConfig(ConfigName.Hongmeng)
|
||||
local keys = GameDataBase.SheetBase.GetKeys(this.tab)
|
||||
local Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi)
|
||||
local DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal)
|
||||
if #this.hongmengHeroInfos<=0 then
|
||||
|
@ -543,15 +563,20 @@ end
|
|||
|
||||
function this.RefreshEnvoyPoint()
|
||||
-- body
|
||||
if this.hongmengTablet >= this.TowerStartLimit then
|
||||
if this.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
for i = 1, #this.hongmengGuards do
|
||||
local sum = this:HongMengTowerUpLimit()
|
||||
if this.hongmengAdditions[1].value > sum then
|
||||
-- body
|
||||
if this.hongmengGuards[i].heroId == "" then
|
||||
for i = 1, #this.hongmengGuards do
|
||||
-- body
|
||||
return true
|
||||
if this.hongmengGuards[i].heroId == "" then
|
||||
-- body
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return false
|
||||
|
@ -559,23 +584,30 @@ end
|
|||
|
||||
function this.RefreshUpTowerPoint()
|
||||
-- body
|
||||
local sum = this:HongMengTowerUpLimit()
|
||||
if this.hongmengTablet > this.TowerStartLimit + sum * 5 then
|
||||
|
||||
if this.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
return false
|
||||
else
|
||||
local data = this.GetHongMengUpData()
|
||||
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
|
||||
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
|
||||
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
|
||||
local sum = this:HongMengTowerUpLimit()
|
||||
if this.hongmengAdditions[1].value > sum then
|
||||
-- body
|
||||
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
|
||||
return true
|
||||
return false
|
||||
else
|
||||
local data = this.GetHongMengUpData()
|
||||
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
|
||||
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
|
||||
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
|
||||
-- body
|
||||
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
--票战力
|
||||
local oldPowerNum = 0
|
||||
|
|
|
@ -119,7 +119,14 @@ function GongMingResultTips:OnOpen(skinId)
|
|||
|
||||
-- body
|
||||
else
|
||||
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
|
||||
if data[i].value ~= -1 then
|
||||
-- body
|
||||
print(data[i].heroTid )
|
||||
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
|
||||
else
|
||||
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=red>无</color>")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
--else
|
||||
|
|
|
@ -94,7 +94,7 @@ function HongMengEnvoyPanel:BindEvent()
|
|||
--二级共鸣弹窗
|
||||
local count = HarmonyManager:IsEnvoyCount()
|
||||
LogGreen(count)
|
||||
if count >= 6 then
|
||||
if count > 6 then
|
||||
-- body
|
||||
UIManager.OpenPanel(UIName.GongMingResultTips)
|
||||
else
|
||||
|
@ -127,17 +127,19 @@ function HongMengEnvoyPanel:BindEvent()
|
|||
LogGreen("回调函数")
|
||||
Gold = Gold - data.LevelUp[1][2]
|
||||
GrowthAmulet = GrowthAmulet - data.LevelUp[2][2]
|
||||
HarmonyManager.hongmengTablet = HarmonyManager.hongmengTablet + 1
|
||||
HarmonyManager.hongmengAdditions[1].value = HarmonyManager.hongmengAdditions[1].value + 1
|
||||
self.TextGold.text = Gold
|
||||
self.TextGrowthAmulet.text = GrowthAmulet
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
self.GradeText.text =
|
||||
string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
||||
--检测红点
|
||||
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
|
||||
string.format("%d/%d", HarmonyManager.hongmengAdditions[1].value, sum)
|
||||
--检测红点 UpdateGongMingLv
|
||||
|
||||
for i = 1, #self.EnvoyItemList do
|
||||
self.EnvoyItemList[i]:UpdateFun()
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.UpdateGongMingLv)
|
||||
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
|
||||
end
|
||||
)
|
||||
else
|
||||
|
@ -176,7 +178,7 @@ function HongMengEnvoyPanel:RunTimerFun()
|
|||
end
|
||||
function HongMengEnvoyPanel:IsUpBtnGray()
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit + sum * 5 then
|
||||
if HarmonyManager.hongmengAdditions[1].value >= sum then
|
||||
-- body
|
||||
Util.SetGray(self.UpBtn, true)
|
||||
self.imageGame:SetActive(false)
|
||||
|
@ -346,12 +348,12 @@ function HongMengEnvoyPanel:OnOpen(equipSId)
|
|||
self.TextGrowthAmulet.text = GrowthAmulet
|
||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||
|
||||
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
||||
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengAdditions[1].value, sum)
|
||||
self:IsUpBtnGray()
|
||||
self:InitTextMum()
|
||||
|
||||
self:RunTimerFun()
|
||||
self.timerEffect:Start()
|
||||
-- self.timerEffect:Start()
|
||||
end
|
||||
function HongMengEnvoyPanel:InitTextMum()
|
||||
local HeroCount = 0
|
||||
|
|
|
@ -75,7 +75,7 @@ function HongMengUnLoadPanel:SetItem(go,data,index)
|
|||
Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
||||
if index == 0 then
|
||||
-- body
|
||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",heroSingleData.lv)
|
||||
else
|
||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("%d",heroSingleData.oriLv)
|
||||
end
|
||||
|
|
|
@ -94,16 +94,11 @@ function this:InitBox()
|
|||
local key = keys[index]
|
||||
-- print(index)
|
||||
this.SingleBoxDataShow(go, this.tab[key], index)
|
||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
ItemList[go] ={}
|
||||
ItemList[go].index = index
|
||||
|
||||
ItemList[go].TimerText = TimerText
|
||||
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
|
||||
ItemList[go].Empty = Empty
|
||||
end)
|
||||
|
||||
print(LengthOfTable(ItemList))
|
||||
|
||||
|
||||
|
||||
|
@ -114,26 +109,33 @@ function this.RunTimerFun()
|
|||
local refreshFunc = function()
|
||||
|
||||
for key, value in pairs(ItemList) do
|
||||
if value.index <= #HarmonyManager.hongmengHeroInfos then
|
||||
--value.TimerText.text = ""
|
||||
if value.index <= #HarmonyManager.hongmengHeroInfos and value.index <= LengthOfTable(ItemList) then
|
||||
--value.TimerText.text = "" value.index <= #HarmonyManager.hongmengHeroInfos and
|
||||
-- print("倒计时开启 .."..HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
|
||||
if value.TimerText ~=nil and value.Empty ~=nil then
|
||||
-- body
|
||||
if HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp() > 0 then
|
||||
if value.Empty ~=nil then
|
||||
-- body
|
||||
print(value.Empty," ")
|
||||
--print(value.Empty," ")
|
||||
if value.Empty.activeSelf == false then
|
||||
-- body
|
||||
value.Empty:SetActive(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp())
|
||||
--print(" ~~~~~ ",value.TimerText," xxxxx",time_content)
|
||||
value.TimerText.text = string.format("<color=#ffbc22>%s</color>\n<color=#bd922a>后恢复</color>",time_content)
|
||||
else
|
||||
HarmonyManager.hongmengHeroInfos[value.index].time = 0
|
||||
value.TimerText.text = ""
|
||||
|
||||
HarmonyManager.hongmengHeroInfos[value.index].time = 0
|
||||
|
||||
if value.TimerText then
|
||||
-- body
|
||||
value.TimerText.text = ""
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -155,6 +157,11 @@ function this.SingleBoxDataShow(go,boxData,index)
|
|||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
local redPoint = Util.GetGameObject(go.transform,"Box/Empty/redPoint")
|
||||
|
||||
ItemList[go] ={}
|
||||
ItemList[go].index = index
|
||||
ItemList[go].TimerText = TimerText
|
||||
ItemList[go].Empty = Empty
|
||||
|
||||
Empty:SetActive(true)
|
||||
mask:SetActive(true)
|
||||
|
@ -311,10 +318,10 @@ end
|
|||
function this:OnOpen()
|
||||
|
||||
this:AwakeLength()
|
||||
|
||||
ItemList = {}
|
||||
this:InitBox()
|
||||
this.RunTimerFun()
|
||||
this.timerEffect:Start()
|
||||
--this.timerEffect:Start()
|
||||
end
|
||||
function this.SingleItemDataShow(clone,Itemdata)
|
||||
--LogGreen(clone.name.."||"..Itemdata.heroConfig.Id)
|
||||
|
@ -363,14 +370,14 @@ function this:Refesh(id)
|
|||
this.ScrollView:SetData(keys,function (index, go)
|
||||
local key = keys[index]
|
||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
ItemList[go] ={}
|
||||
ItemList[go].index = index
|
||||
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
-- ItemList[go] ={}
|
||||
-- ItemList[go].index = index
|
||||
|
||||
ItemList[go].TimerText = TimerText
|
||||
-- ItemList[go].TimerText = TimerText
|
||||
|
||||
ItemList[go].Empty = Empty
|
||||
-- ItemList[go].Empty = Empty
|
||||
end)
|
||||
end
|
||||
function this:OpenBoxFun()
|
||||
|
@ -421,37 +428,37 @@ function this:UpdateHero(Herodata)
|
|||
this.ScrollView:SetData(keys,function (index, go)
|
||||
local key = keys[index]
|
||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
ItemList[go] ={}
|
||||
ItemList[go].index = index
|
||||
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
-- ItemList[go] ={}
|
||||
-- ItemList[go].index = index
|
||||
|
||||
ItemList[go].TimerText = TimerText
|
||||
-- ItemList[go].TimerText = TimerText
|
||||
|
||||
ItemList[go].Empty = Empty
|
||||
-- ItemList[go].Empty = Empty
|
||||
end)
|
||||
end
|
||||
|
||||
function this:GetItemList(index)
|
||||
-- body
|
||||
for key, value in pairs(ItemList) do
|
||||
-- body
|
||||
if value == index then
|
||||
-- body
|
||||
return key
|
||||
end
|
||||
end
|
||||
end
|
||||
-- function this:GetItemList(index)
|
||||
-- -- body
|
||||
-- for key, value in pairs(ItemList) do
|
||||
-- -- body
|
||||
-- if value == index then
|
||||
-- -- body
|
||||
-- return key
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function this:UnLoadFun(msg)
|
||||
HeroCount = HeroCount - 1
|
||||
|
||||
for key, value in pairs(ItemList) do
|
||||
if value == TempItem then
|
||||
if value.index == TempItem then
|
||||
-- body
|
||||
HarmonyManager.hongmengHeroInfos[value].time = msg.leftTime + GetTimeStamp()
|
||||
HarmonyManager.hongmengHeroInfos[value.index].time = msg.leftTime + GetTimeStamp()
|
||||
|
||||
HarmonyManager.hongmengHeroInfos[value].heroId = ""
|
||||
HarmonyManager.hongmengHeroInfos[value.index].heroId = ""
|
||||
|
||||
end
|
||||
|
||||
|
@ -480,16 +487,34 @@ function this:UnLoadFun(msg)
|
|||
this.ScrollView:SetData(keys,function (index, go)
|
||||
local key = keys[index]
|
||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
ItemList[go] ={}
|
||||
ItemList[go].index = index
|
||||
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
-- ItemList[go] ={}
|
||||
-- ItemList[go].index = index
|
||||
|
||||
ItemList[go].TimerText = TimerText
|
||||
-- ItemList[go].TimerText = TimerText
|
||||
|
||||
ItemList[go].Empty = Empty
|
||||
-- ItemList[go].Empty = Empty
|
||||
end)
|
||||
end
|
||||
|
||||
function this:OnlyRefeshHeroLv()
|
||||
ItemList = {}
|
||||
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||
this.ScrollView:SetData(keys,function (index, go)
|
||||
local key = keys[index]
|
||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||
-- ItemList[go] ={}
|
||||
-- ItemList[go].index = index
|
||||
|
||||
-- ItemList[go].TimerText = TimerText
|
||||
|
||||
-- ItemList[go].Empty = Empty
|
||||
end)
|
||||
|
||||
end
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function this:OnClose()
|
||||
if this.timerEffect then
|
||||
|
@ -506,6 +531,8 @@ function this:AddListener()
|
|||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||
|
||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UpdateGongMingLv,self.OnlyRefeshHeroLv,self)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
|
@ -514,6 +541,8 @@ function this:RemoveListener()
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UpdateGongMingLv,self.OnlyRefeshHeroLv,self)
|
||||
end
|
||||
function this:OnShow(...)
|
||||
-- body
|
||||
|
|
|
@ -18,22 +18,31 @@ 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) and HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit then
|
||||
print(self._star.." "..tostring(HeroManager.IsTenTalent(self._star)).." "..HarmonyManager.hongmengAdditions[1].heroTid..self.heroConfig.ReadingName)
|
||||
if HeroManager.IsTenTalent(self._star) and HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
endLv = HarmonyManager.hongmengTablet
|
||||
else
|
||||
|
||||
endLv = HarmonyManager.hongmengAdditions[1].value
|
||||
print(endLv," "..self.heroConfig.ReadingName)
|
||||
else
|
||||
local curlvEen = HeroManager.heroLvEnd[self.id]
|
||||
--print(curlvEen," "..self.heroConfig.ReadingName)
|
||||
--
|
||||
endLv = temp_lv > curlvEen and curlvEen or temp_lv
|
||||
end
|
||||
|
||||
|
||||
return endLv
|
||||
elseif HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit and HarmonyManager:IsEnvoy(self.dynamicId) then
|
||||
elseif HarmonyManager.hongmengAdditions[1] and HarmonyManager:IsEnvoy(self.dynamicId) then
|
||||
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
return HarmonyManager.hongmengAdditions[1].value
|
||||
else
|
||||
return self._lv
|
||||
end
|
||||
-- body
|
||||
--self._lv = HarmonyManager.hongmengTablet
|
||||
|
||||
return HarmonyManager.hongmengTablet
|
||||
|
||||
else
|
||||
return self._lv
|
||||
end
|
||||
|
|
|
@ -479,7 +479,7 @@ function this.ExecuteLoading()
|
|||
--[[[34] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end,
|
||||
--[[[34] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end,
|
||||
function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end,
|
||||
--function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
||||
function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
||||
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
|
||||
if AppConst.isGuide then
|
||||
|
|
|
@ -61,8 +61,10 @@ local mainDynamicActivityIcon = {
|
|||
[9] = "r_zjm_huodongicon-xuanjimiaosuan", ----玄机妙算
|
||||
[10] = "r_zjm_huodongicon-xianglongfuhu", ----降龙伏虎
|
||||
[11] = "r_zjm_huodongicon-qikaidesheng", ----旗开得胜
|
||||
[12] = "r_zjm_huodongicon-qikaidesheng",
|
||||
[13] = "r_zjm_huodongicon-qikaidesheng",
|
||||
[12] = "r_zjm_huodongicon-bianhuanmoce", ----变幻莫测
|
||||
[13] = "r_zjm_huodongicon-bowenduoshi", ----博文多识
|
||||
[14] = "r_zjm_huodongicon-tianxiangjiren", ----天相吉人
|
||||
[15] = "r_zjm_huodongicon-suoxiangpimi", ----所向披靡
|
||||
}
|
||||
function this:AddFuncItem(btnGO, pos)
|
||||
return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
|
||||
|
@ -234,6 +236,7 @@ function this:InitComponent()
|
|||
-- 无尽
|
||||
this.btnEndLess = Util.GetGameObject(self.gameObject, "LeftDown/btnRoot/btnEndLess")
|
||||
this.btnEndLess:SetActive(false)
|
||||
|
||||
--鸿蒙
|
||||
this.btnHongMeng=Util.GetGameObject(self.gameObject,"RightDown/btnHongMeng")
|
||||
this.HongMengRedPoint = Util.GetGameObject(this.btnHongMeng,"redPoint")
|
||||
|
@ -283,7 +286,6 @@ function this:InitComponent()
|
|||
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:AddFuncItem(this.btnWaiDi, 0),
|
||||
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:AddFuncItem(this.btnCompoundHero, 0),--神将合成、置换
|
||||
[FUNCTION_OPEN_TYPE.POKEMON] = this:AddFuncItem(this.btnPokemon, -1200),--神将合成、置换
|
||||
|
||||
}
|
||||
|
||||
this.operateNewText = {
|
||||
|
@ -305,7 +307,6 @@ function this:InitComponent()
|
|||
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:InsertNewText(this.btnWaiDi),
|
||||
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:InsertNewText(this.btnCompoundHero),--神将合成、置换
|
||||
[FUNCTION_OPEN_TYPE.POKEMON] = this:InsertNewText(this.btnPokemon),--神将合成、置换
|
||||
|
||||
}
|
||||
|
||||
-- 红点
|
||||
|
@ -331,7 +332,7 @@ function this:InitComponent()
|
|||
this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint")
|
||||
this.rpCompoundHero = Util.GetGameObject(this.btnCompoundHero, "redPoint")--神将合成、置换
|
||||
this.rpPokemon = Util.GetGameObject(this.btnPokemon, "redPoint")--灵兽
|
||||
|
||||
|
||||
|
||||
|
||||
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
|
||||
|
@ -394,7 +395,7 @@ function this:InitComponent()
|
|||
this.GuideEffectGo.transform.localScale = Vector3.one
|
||||
Util.GetGameObject(this.GuideEffectGo, "GameObject"):SetActive(false)
|
||||
this.GuideJumpEffectGo = poolManager:LoadAsset("GuideEffect", PoolManager.AssetType.GameObject)
|
||||
--this.GuideJumpEffectGo.transform:SetParent(this.mainTaskJumpImage.transform)
|
||||
-- this.GuideJumpEffectGo.transform:SetParent(this.mainTaskJumpImage.transform)
|
||||
this.GuideJumpEffectGo.transform.localPosition = Vector3.zero
|
||||
this.GuideJumpEffectGo.transform.localScale = Vector3.one
|
||||
Util.GetGameObject(this.GuideJumpEffectGo, "GameObject"):SetActive(false)
|
||||
|
@ -406,6 +407,7 @@ function this:InitComponent()
|
|||
this.btnFunHide[FUNCTION_OPEN_TYPE.GOODFRIEND] = this.btnFriend
|
||||
this.btnFunHide[FUNCTION_OPEN_TYPE.ALLRANKING] = this.btnRank
|
||||
this.btnFunHide[FUNCTION_OPEN_TYPE.HongMengZhen] = this.btnHongMeng
|
||||
|
||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.NORMALCARBON] = this.btnFuBen
|
||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.MONSTER_COMING] = this.btnMonster
|
||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.ADVENTURE] = this.btnMijing
|
||||
|
@ -885,9 +887,9 @@ function this:BindEvent()
|
|||
Util.AddClick(this.btnDemonSlayer, function()
|
||||
UIManager.OpenPanel(UIName.DemonSlayerPanel)
|
||||
end)
|
||||
|
||||
|
||||
Util.AddClick(this.btnHongMeng,function()
|
||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
if HarmonyManager:HongMengTowerUpLimit() > 0 then
|
||||
-- body
|
||||
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
|
||||
else
|
||||
|
@ -1194,7 +1196,7 @@ function this:OnShow()
|
|||
-- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||
--end
|
||||
CheckRedPointStatus(RedPointType.RankingSort)
|
||||
if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then
|
||||
if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5)
|
||||
PlayerManager.IsGetFiveStarHero = false
|
||||
end
|
||||
|
@ -1479,7 +1481,6 @@ function this.TimeFormat()
|
|||
if dynamicAct then
|
||||
if isRefeshIcon then
|
||||
local curindex = GlobalActConfig[dynamicAct].ShowArt
|
||||
print(curindex," ",mainDynamicActivityIcon[curindex])
|
||||
Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
|
||||
isRefeshIcon = false
|
||||
end
|
||||
|
|
|
@ -4793,11 +4793,12 @@ end
|
|||
-- 鸿蒙阵 游戏开始 拿到的数据
|
||||
function this.HongMengInfoResponse(func)
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_GET_INFO_REQUEST,MessageTypeProto_pb.HONGMENG_GET_INFO_RESPONSE,nil,function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = HeroInfoProto_pb.GetHongmengInfoResponse()
|
||||
msg:ParseFromString(data)
|
||||
-- print("接收数据成功")
|
||||
HarmonyManager.InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
||||
LogGreen("请求鸿蒙阵数据")
|
||||
-- local data = buffer:DataByte()
|
||||
-- local msg = HeroInfoProto_pb.GetHongmengInfoResponse()
|
||||
-- msg:ParseFromString(data)
|
||||
-- -- print("接收数据成功")
|
||||
-- HarmonyManager.InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
|
|
|
@ -124,9 +124,14 @@ function this.SingleHeroDataShow(go,_heroData)
|
|||
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Util.AddOnceClick(GongMingMask, function()
|
||||
|
|
|
@ -155,9 +155,13 @@ function this.SingleHeroDataShow(go,_heroData)
|
|||
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Util.AddOnceClick(GongMingMask, function()
|
||||
|
|
|
@ -241,7 +241,7 @@ function this:UpdateHeroUpLvAndBreakMaterialShow()
|
|||
end
|
||||
end
|
||||
|
||||
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengTablet >=HarmonyManager.TowerStartLimit)
|
||||
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengAdditions[1].heroTid == 0)
|
||||
if isGongMing then
|
||||
this.gongmingText:SetActive(true)
|
||||
this.upLv:SetActive(false)
|
||||
|
|
|
@ -266,8 +266,14 @@ 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 >= HarmonyManager.TowerStartLimit then
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||
-- body
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
|
||||
else
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = heroData.lv
|
||||
end
|
||||
else
|
||||
|
||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = heroData.lv
|
||||
|
|
Loading…
Reference in New Issue