【鸿蒙阵修改】

dev_chengFeng
guowei 2020-12-28 20:02:36 +08:00
parent 3b3467d94b
commit 4939dd69b8
9 changed files with 175 additions and 175 deletions

View File

@ -317,15 +317,11 @@ import "CommonProto.proto";
message HongmengAddition{
optional int32 additionType = 1; // 1 2 3 4 5
optional int32 value = 2; //
optional int32 heroTid = 3; //
optional int32 heroTid = 3; // 0鸿-1id
}
// 鸿
message GetHongmengInfoResponse{
repeated HongmengHeroInfo hongmengGuards = 1; // 鸿鸿使
repeated HongmengHeroInfo hongmengHeroInfos = 2; //
optional int32 hongmengTablet = 3; // 鸿
repeated HongmengAddition hongmengAdditions = 4; //
}
// 鸿
@ -333,4 +329,5 @@ import "CommonProto.proto";
repeated HongmengHeroInfo hongmengGuards = 1; // 鸿鸿使
repeated HongmengAddition hongmengAdditions = 2; //
repeated HongmengHeroInfo hongmengResonacnes = 3; // 使
optional int32 hongmengTabletMax = 4; // 鸿,0鸿
}

View File

@ -183,14 +183,11 @@ HONGMENGADDITION_ADDITIONTYPE_FIELD = protobuf.FieldDescriptor();
HONGMENGADDITION_VALUE_FIELD = protobuf.FieldDescriptor();
HONGMENGADDITION_HEROTID_FIELD = protobuf.FieldDescriptor();
GETHONGMENGINFORESPONSE = protobuf.Descriptor();
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD = protobuf.FieldDescriptor();
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD = protobuf.FieldDescriptor();
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD = protobuf.FieldDescriptor();
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION = protobuf.Descriptor();
HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD = protobuf.FieldDescriptor();
GETHEROLISTINFOREQUEST_INDEX_FIELD.name = "index"
GETHEROLISTINFOREQUEST_INDEX_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHeroListInfoRequest.index"
@ -1804,54 +1801,11 @@ HONGMENGADDITION.enum_types = {}
HONGMENGADDITION.fields = {HONGMENGADDITION_ADDITIONTYPE_FIELD, HONGMENGADDITION_VALUE_FIELD, HONGMENGADDITION_HEROTID_FIELD}
HONGMENGADDITION.is_extendable = false
HONGMENGADDITION.extensions = {}
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.name = "hongmengGuards"
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHongmengInfoResponse.hongmengGuards"
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.number = 1
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.index = 0
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.label = 3
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.has_default_value = false
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.default_value = {}
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.message_type = HONGMENGHEROINFO
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.type = 11
GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD.cpp_type = 10
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.name = "hongmengHeroInfos"
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHongmengInfoResponse.hongmengHeroInfos"
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.number = 2
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.index = 1
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.label = 3
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.has_default_value = false
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.default_value = {}
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.message_type = HONGMENGHEROINFO
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.type = 11
GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD.cpp_type = 10
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.name = "hongmengTablet"
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHongmengInfoResponse.hongmengTablet"
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.number = 3
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.index = 2
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.label = 1
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.has_default_value = false
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.default_value = 0
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.type = 5
GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD.cpp_type = 1
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.name = "hongmengAdditions"
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHongmengInfoResponse.hongmengAdditions"
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.number = 4
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.index = 3
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.label = 3
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.has_default_value = false
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.default_value = {}
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.message_type = HONGMENGADDITION
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.type = 11
GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD.cpp_type = 10
GETHONGMENGINFORESPONSE.name = "GetHongmengInfoResponse"
GETHONGMENGINFORESPONSE.full_name = ".com.ljsd.jieling.protocols.GetHongmengInfoResponse"
GETHONGMENGINFORESPONSE.nested_types = {}
GETHONGMENGINFORESPONSE.enum_types = {}
GETHONGMENGINFORESPONSE.fields = {GETHONGMENGINFORESPONSE_HONGMENGGUARDS_FIELD, GETHONGMENGINFORESPONSE_HONGMENGHEROINFOS_FIELD, GETHONGMENGINFORESPONSE_HONGMENGTABLET_FIELD, GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD}
GETHONGMENGINFORESPONSE.fields = {}
GETHONGMENGINFORESPONSE.is_extendable = false
GETHONGMENGINFORESPONSE.extensions = {}
HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD.name = "hongmengGuards"
@ -1887,11 +1841,21 @@ HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.message_type = HONGMENGHEROINFO
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.type = 11
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.cpp_type = 10
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.name = "hongmengTabletMax"
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.full_name = ".com.ljsd.jieling.protocols.HongmengInfoIndication.hongmengTabletMax"
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.number = 4
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.index = 3
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.label = 1
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.has_default_value = false
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.default_value = 0
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.type = 5
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD.cpp_type = 1
HONGMENGINFOINDICATION.name = "HongmengInfoIndication"
HONGMENGINFOINDICATION.full_name = ".com.ljsd.jieling.protocols.HongmengInfoIndication"
HONGMENGINFOINDICATION.nested_types = {}
HONGMENGINFOINDICATION.enum_types = {}
HONGMENGINFOINDICATION.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD, HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD}
HONGMENGINFOINDICATION.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD, HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD, HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD}
HONGMENGINFOINDICATION.is_extendable = false
HONGMENGINFOINDICATION.extensions = {}

View File

@ -32,7 +32,8 @@ local keys = nil
function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions)
-- body
this.hongmengGuards = hongmengGuards
LogGreen("hongmengGuards",#this.hongmengGuards)
--LogGreen("hongmengGuards",#this.hongmengGuards)
this.TowerStartLimit = tonumber(string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value,"#")[2])
-- LogGreen("TowerStartLimit"..HarmonyManager.TowerStartLimit)
@ -50,19 +51,7 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
end
this.hongmengTablet = hongmengTablet
this.hongmengAdditions = hongmengAdditions
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
table.insert(curEquipIdList,curEquipConfigs[i].Id)
end
this.HarmonyUpdateEquipData(curEquipIdList, "")
end
end
end
end
@ -97,13 +86,24 @@ end
function this.UpdateHongMengDataAdditions(hongmengAdditions)
this.hongmengAdditions = hongmengAdditions
if this.hongmengAdditions then
-- body
for i = 1, #this.hongmengAdditions do
-- body
LogPink("this.hongmengAdditions"..i.." "..this.hongmengAdditions[i].value)
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
table.insert(curEquipIdList,curEquipConfigs[i].Id)
end
this.HarmonyUpdateEquipData(curEquipIdList, "")
end
end
end
if this.hongmengAdditions[1].additionTypetion == 0 then
-- body
end
if this.hongmengTablet < this.TowerStartLimit then
-- body
this:SetInitList()
@ -126,16 +126,13 @@ function this:InitGongMingDataList()
end
--鸿蒙塔上限
local len = 0
function this:SetHongMengTowerUpLimit(limit)
len = limit
end
function this:HongMengTowerUpLimit()
local list = HeroManager.GetAllHerosByStar(HeroManager.awakeNextStarIndex)
local temp_list = {}
for i = 1, #list do
-- body
-- table.insert(temp_list,list[i])
temp_list[list[i].name] = {}
end
local len = LengthOfTable(temp_list)
return len
end

View File

@ -97,7 +97,8 @@ function GongMingResultTips:OnOpen(flag)
-- Util.GetGameObject(this.TextOneAll,"textFa"):GetComponent("Text").text = string.format("%d",herodata.talismanList)
if HeroManager.IsTenTalent(herodata.star) then
-- body
Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = HarmonyManager.hongmengTablet
local data = HarmonyManager:GetAdditions()
Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = data[1].value
else
Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = herodata.lv
end

View File

@ -49,14 +49,23 @@ function GongMingResultTips:OnOpen(skinId)
-- print(key, " ",value)
-- end
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit 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,HarmonyManager.TowerStartLimit+num*5)
if data[i].heroTid == 0 then
-- body
local num = HarmonyManager:HongMengTowerUpLimit()
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(当前上限%d级)",data[i].value,num)
elseif data[i].heroTid == -1 then
-- body
else
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
end
elseif data[i].additionType == 2 then
if data[i].value == -1 then
-- body
@ -113,73 +122,73 @@ function GongMingResultTips:OnOpen(skinId)
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)
end
end
else
for i = 1, #data do
--else
-- for i = 1, #data do
if data[i].additionType == 1 then
print(data[i].value," ")
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
elseif data[i].additionType == 2 then
if data[i].value == -1 then
-- body
Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("<color=red>无</color>")
else
Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("<color=red>装备%d品</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
end
-- if data[i].additionType == 1 then
-- print(data[i].value," ")
-- Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
-- elseif data[i].additionType == 2 then
-- if data[i].value == -1 then
-- -- body
-- Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("<color=red>无</color>")
-- else
-- Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("<color=red>装备%d品</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
-- end
-- body ReadingName
elseif data[i].additionType == 3 then
if data[i].heroTid~=0 then
-- body
this.contentLingText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else
if PlayerManager.level<75 then
-- body
this.contentLingText:SetActive(false)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
else
this.contentLingText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
-- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value)
--Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
-- -- body ReadingName
-- elseif data[i].additionType == 3 then
-- if data[i].heroTid~=0 then
-- -- body
-- this.contentLingText:SetActive(true)
-- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
-- else
-- if PlayerManager.level<75 then
-- -- body
-- this.contentLingText:SetActive(false)
-- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
-- else
-- this.contentLingText:SetActive(true)
-- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
-- end
-- -- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value)
-- --Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
-- end
-- body
elseif data[i].additionType == 4 then
if data[i].heroTid ~= 0 then
-- body
-- print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ")
this.contentHunText:SetActive(true)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
-- -- body
-- elseif data[i].additionType == 4 then
-- if data[i].heroTid ~= 0 then
-- -- body
-- -- print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ")
-- this.contentHunText:SetActive(true)
-- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else
if PlayerManager.level<75 then
-- body
this.contentHunText:SetActive(false)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = ""
else
this.contentHunText:SetActive(true)
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>")
end
-- else
-- if PlayerManager.level<75 then
-- -- body
-- this.contentHunText:SetActive(false)
-- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = ""
-- else
-- this.contentHunText:SetActive(true)
-- 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>")
-- end
-- body
else
if data[i].value > 0 then
-- body
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
-- -- body
-- else
-- if data[i].value > 0 then
-- -- body
-- 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
-- end
-- end
end
--end
end

View File

@ -76,6 +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>=HarmonyManager.TowerStartLimit then
-- body
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)

View File

@ -89,15 +89,19 @@ function this:InitBox()
--
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
this.ScrollView:SetData(keys,function (index, go)
local key = keys[index]
-- print(index)
this.SingleBoxDataShow(go, this.tab[key], index)
ItemList[go] = index
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
TextList[index] = TimerText
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
BoxList[index] = Empty
ItemList[go] ={}
ItemList[go].index = index
ItemList[go].TimerText = TimerText
ItemList[go].Empty = Empty
end)
@ -110,21 +114,29 @@ function this.RunTimerFun()
local refreshFunc = function()
for key, value in pairs(ItemList) do
if value <= #HarmonyManager.hongmengHeroInfos then
TextList[value].text = ""
if value.index <= #HarmonyManager.hongmengHeroInfos then
--value.TimerText.text = ""
-- print("倒计时开启 .."..HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
if HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp() > 0 then
if BoxList[value].activeSelf == false then
-- body
BoxList[value]:SetActive(true)
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," ")
if value.Empty.activeSelf == false then
-- body
value.Empty:SetActive(true)
end
end
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp())
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 = ""
end
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
TextList[value].text = string.format("<color=#ffbc22>%s</color>\n<color=#bd922a>后恢复</color>",time_content)
else
HarmonyManager.hongmengHeroInfos[value].time = 0
TextList[value].text = ""
end
end
else
end
@ -150,7 +162,7 @@ function this.SingleBoxDataShow(go,boxData,index)
redPoint:SetActive(false)
Util.SetGray(lock,true)
local gridData = HarmonyManager.hongmengHeroInfos[boxData.Id]
TimerText.text = ""
if gridData then
if gridData.gridId <= Box then
if gridData.heroId ~= "" then
@ -299,6 +311,8 @@ end
function this:OnOpen()
this:AwakeLength()
this:InitBox()
this.RunTimerFun()
this.timerEffect:Start()
end
@ -349,15 +363,22 @@ function this:Refesh(id)
this.ScrollView:SetData(keys,function (index, go)
local key = keys[index]
this.SingleBoxDataShow(go, this.tab[key],index)
ItemList[go] = index
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
TextList[index] = TimerText
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
BoxList[index] = Empty
ItemList[go] ={}
ItemList[go].index = index
ItemList[go].TimerText = TimerText
ItemList[go].Empty = Empty
end)
end
function this:OpenBoxFun()
this:AddBoxFun(tempData)
if tempData then
-- body
this:AddBoxFun(tempData)
end
end
function this:UpdateHero(Herodata)
@ -400,11 +421,14 @@ function this:UpdateHero(Herodata)
this.ScrollView:SetData(keys,function (index, go)
local key = keys[index]
this.SingleBoxDataShow(go, this.tab[key],index)
ItemList[go] = index
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
TextList[index] = TimerText
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
BoxList[index] = Empty
ItemList[go] ={}
ItemList[go].index = index
ItemList[go].TimerText = TimerText
ItemList[go].Empty = Empty
end)
end
@ -456,11 +480,14 @@ function this:UnLoadFun(msg)
this.ScrollView:SetData(keys,function (index, go)
local key = keys[index]
this.SingleBoxDataShow(go, this.tab[key],index)
ItemList[go] = index
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
TextList[index] = TimerText
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
BoxList[index] = Empty
ItemList[go] ={}
ItemList[go].index = index
ItemList[go].TimerText = TimerText
ItemList[go].Empty = Empty
end)
end
--界面关闭时调用(用于子类重写)

View File

@ -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

View File

@ -143,6 +143,10 @@ function this.HongMengIndication(buffer)
-- body UpdateHongMengDataHeroInfos
HarmonyManager.UpdateHongMengDataHeroInfos(msg.hongmengResonacnes)
end
if msg.hongmengTabletMax ~= 0 then
-- body
HarmonyManager:SetHongMengTowerUpLimit(msg.hongmengTabletMax)
end
end
function this.HeroSkinUseIndication(buffer)