From 4939dd69b8dc05a3fc72f67029662e5fb05752ad Mon Sep 17 00:00:00 2001 From: guowei Date: Mon, 28 Dec 2020 20:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=B8=BF=E8=92=99=E9=98=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Message/HeroInfoProto.proto | 7 +- .../~Lua/Message/HeroInfoProto_pb.lua | 62 ++------ .../Harmony/Manager/HarmonyManager.lua | 53 ++++--- .../Harmony/Panel/GongMingResultPanel.lua | 3 +- .../Harmony/Panel/GongMingResultTips.lua | 135 ++++++++++-------- .../Harmony/Panel/HongMengUnLoadPanel.lua | 1 + .../Modules/Harmony/View/HarmonyScrllow.lua | 83 +++++++---- .../~Lua/Modules/Login/LoginPanel.lua | 2 +- .../~Lua/Modules/Net/IndicationManager.lua | 4 + 9 files changed, 175 insertions(+), 175 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto b/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto index 6dc1f2510b..a19d105c22 100644 --- a/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto +++ b/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto @@ -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:鸿蒙碑状态,-1:未共鸣,其他共鸣英雄id } // 获取鸿蒙阵信息 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:未开启,其他为鸿蒙碑等级 } diff --git a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua index e90c05f644..0ff79849f0 100644 --- a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua @@ -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 = {} diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index 86a49a8529..7c563c2151 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua index 85772c312c..24eaa4ea24 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultPanel.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua index 6796f310f4..316eba6a59 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/GongMingResultTips.lua @@ -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("%d级(当前上限%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("%d级(当前上限%d级)",data[i].value,num) + elseif data[i].heroTid == -1 then + -- body + + else + Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("%d级(%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("%d(%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("%d级(%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("无") - else - Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("装备%d品(%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("%d级(%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("无") + -- else + -- Util.GetGameObject(this.TextAll,"textEqiue"):GetComponent("Text").text = string.format("装备%d品(%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("%d(%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("无") - end - -- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("%d",data[i].value) - --Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("无") - 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("%d(%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("无") + -- end + -- -- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("%d",data[i].value) + -- --Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("无") + -- 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("%d(%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("%d(%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("无") - end - -- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("%d",data[i].value) - --Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("无") - 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("无") + -- end + -- -- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("%d",data[i].value) + -- --Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("无") + -- end - -- body - else - if data[i].value > 0 then - -- body - Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("%d(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) - else - Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("无") - end + -- -- body + -- else + -- if data[i].value > 0 then + -- -- body + -- Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("%d(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) + -- else + -- Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("无") + -- end - end - end + -- end + -- end - end + --end end diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua index ab74811561..127dbe7163 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua @@ -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("%d",data.lv) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua index 5551d8cabd..a473001c7a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -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("%s\n后恢复",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("%s\n后恢复",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 --界面关闭时调用(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index decf7ae487..8917986fef 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index ba0c8f6919..07f6fa8f6e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -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)