From d36276eb0c039edea649e883eaf94ad6ee960d3a Mon Sep 17 00:00:00 2001 From: guowei Date: Sat, 26 Dec 2020 15:07:51 +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 | 1 + .../~Lua/Message/HeroInfoProto_pb.lua | 14 ++- .../Harmony/Manager/HarmonyManager.lua | 21 +++- .../Harmony/Panel/HongMengEnvoyPanel.lua | 104 +++++++++--------- .../Modules/Harmony/View/HarmonyScrllow.lua | 1 + .../~Lua/Modules/Net/IndicationManager.lua | 22 +++- .../~Lua/Modules/RoleInfo/RoleEquipPanel.lua | 5 +- .../~Lua/View/HarmonyView.lua | 16 ++- 8 files changed, 118 insertions(+), 66 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto b/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto index a6e4bf30a8..6dc1f2510b 100644 --- a/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto +++ b/Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto @@ -332,4 +332,5 @@ import "CommonProto.proto"; message HongmengInfoIndication{ repeated HongmengHeroInfo hongmengGuards = 1; // 鸿蒙守卫、鸿蒙使者 repeated HongmengAddition hongmengAdditions = 2; // 共鸣加成 + repeated HongmengHeroInfo hongmengResonacnes = 3; // 共鸣使者 } diff --git a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua index 3abacc8f27..e90c05f644 100644 --- a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua @@ -190,6 +190,7 @@ GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor(); HONGMENGINFOINDICATION = protobuf.Descriptor(); HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD = protobuf.FieldDescriptor(); HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor(); +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD = protobuf.FieldDescriptor(); GETHEROLISTINFOREQUEST_INDEX_FIELD.name = "index" GETHEROLISTINFOREQUEST_INDEX_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHeroListInfoRequest.index" @@ -1875,11 +1876,22 @@ HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.message_type = HONGMENGADDITION HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.type = 11 HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.cpp_type = 10 +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.name = "hongmengResonacnes" +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.full_name = ".com.ljsd.jieling.protocols.HongmengInfoIndication.hongmengResonacnes" +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.number = 3 +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.index = 2 +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.label = 3 +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.has_default_value = false +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.default_value = {} +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.message_type = HONGMENGHEROINFO +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.type = 11 +HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.cpp_type = 10 + 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.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD, HONGMENGINFOINDICATION_HONGMENGRESONACNES_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 2dcd031dd9..50039f49cd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -35,8 +35,13 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet 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 + -- if this.hongmengGuards[i].heroId ~= "" then + -- -- body + -- LogGreen(this.hongmengGuards[i].heroId) + -- end + this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp() end @@ -63,10 +68,17 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet end -function this.UpdateHongMengData(hongmengGuards,hongmengAdditions) +function this.UpdateHongMengDataGuards(hongmengGuards) this.hongmengGuards = hongmengGuards + +end + +function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos) + this.hongmengHeroInfos = hongmengHeroInfos +end + +function this.UpdateHongMengDataAdditions(hongmengAdditions) this.hongmengAdditions = hongmengAdditions - if this.hongmengAdditions then -- body for i = 1, #this.hongmengAdditions do @@ -74,7 +86,7 @@ function this.UpdateHongMengData(hongmengGuards,hongmengAdditions) LogPink("this.hongmengAdditions"..i.." "..this.hongmengAdditions[i].value) end end - print("刷新hongmengGuards") + end --初始化共鸣列表数据 @@ -396,6 +408,7 @@ function this.InitUpdateEquipData(id, upHeroDid) equipdata.mainAttribute = this.GetMainProList(equipdata.equipConfig) equipdata.backData = equipdata + equipdata.star = equipStarsConfig[equipdata.equipConfig.Star].Stars this.equipDatas[id] = equipdata if not this.equipDatas[id].upHeroDidList then diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua index 3d43df1b04..5e4e3899ed 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua @@ -237,64 +237,64 @@ function HongMengEnvoyPanel:UpdateFun(data) end end end - local equip_count = 1 - local equip_list = {} + -- local equip_count = 1 + -- local equip_list = {} - local hun_count = 1 - local hun_list = {} + -- local hun_count = 1 + -- local hun_list = {} - local ling_count = 1 - local ling_list = {} + -- local ling_count = 1 + -- local ling_list = {} - local weapon_Lv = 999 - for i = 1, #HarmonyManager.hongmengGuards do - -- body - if HarmonyManager.hongmengGuards[i].heroId~= "" then - -- body - local herodata = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId) - for i = 1, #herodata.equipIdList do - -- body - equip_list[equip_count] = herodata.equipIdList[i] - equip_count = equip_count + 1 - end - if herodata.jewels then - -- body - if herodata.jewels[1] then - -- body - hun_list[hun_count] = herodata.jewels[1] - hun_count = hun_count + 1 - end - if herodata.jewels[2] then - -- body - ling_list[ling_count] = herodata.jewels[2] - ling_count = ling_count + 1 - end - end - if weapon_Lv > herodata.talismanList then - -- body - weapon_Lv = herodata.talismanList - end - end - end + -- local weapon_Lv = 999 + -- for i = 1, #HarmonyManager.hongmengGuards do + -- -- body + -- if HarmonyManager.hongmengGuards[i].heroId~= "" then + -- -- body + -- local herodata = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId) + -- for i = 1, #herodata.equipIdList do + -- -- body + -- equip_list[equip_count] = herodata.equipIdList[i] + -- equip_count = equip_count + 1 + -- end + -- if herodata.jewels then + -- -- body + -- if herodata.jewels[1] then + -- -- body + -- hun_list[hun_count] = herodata.jewels[1] + -- hun_count = hun_count + 1 + -- end + -- if herodata.jewels[2] then + -- -- body + -- ling_list[ling_count] = herodata.jewels[2] + -- ling_count = ling_count + 1 + -- end + -- end + -- if weapon_Lv > herodata.talismanList then + -- -- body + -- weapon_Lv = herodata.talismanList + -- end + -- end + -- end - if equip_count == 24 then - -- body - HarmonyManager:EquipMin(equip_list) - end + -- if equip_count == 24 then + -- -- body + -- HarmonyManager:EquipMin(equip_list) + -- end - if hun_count == 6 then - -- body - HarmonyManager:HunMin(hun_list) - end + -- if hun_count == 6 then + -- -- body + -- HarmonyManager:HunMin(hun_list) + -- end - if ling_count == 6 then - -- body - HarmonyManager:SoulMin(ling_list) - end - if weapon_Lv ~= 999 then - -- body - HarmonyManager:WeaponMin(weapon_Lv) - end + -- if ling_count == 6 then + -- -- body + -- HarmonyManager:SoulMin(ling_list) + -- end + -- if weapon_Lv ~= 999 then + -- -- body + -- HarmonyManager:WeaponMin(weapon_Lv) + -- end --LogGreen( " HarmonyManager.EnvoyList "..#HarmonyManager.EnvoyList) self:UpdateShow(HarmonyManager.hongmengGuards) -- HeroManager.UpdateSingleHeroDatas(data.dynamicId,1,data.star,data.breakId,data.upStarId) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua index d5c1d65755..233e4dc596 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -300,6 +300,7 @@ function this:OnOpen() end function this.SingleItemDataShow(clone,Itemdata) LogGreen(clone.name.."||"..Itemdata.heroConfig.Id) + --Util.GetGameObject(clone.transform, "Box/Empty"):SetActive(false) Util.GetGameObject(clone.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(Itemdata.heroConfig.Quality,Itemdata.star)) Util.GetGameObject(clone.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("%d",Itemdata.lv) Util.GetGameObject(clone.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(Itemdata.icon) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index 9b5898f174..ba0c8f6919 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -125,13 +125,23 @@ function this.HongMengIndication(buffer) msg:ParseFromString(data) LogGreen("更新数据") - if msg.hongmengGuards or msg.hongmengAdditions then + if msg.hongmengGuards then -- body - for i = 1, #msg.hongmengGuards do - -- body - print(HeroManager.GetSingleHeroData(msg.hongmengGuards[i].heroId).name) - end - HarmonyManager.UpdateHongMengData(msg.hongmengGuards,msg.hongmengAdditions) + -- for i = 1, #msg.hongmengGuards do + -- -- body + -- print(HeroManager.GetSingleHeroData(msg.hongmengGuards[i].heroId).name) + -- end + HarmonyManager.UpdateHongMengDataGuards(msg.hongmengGuards) + end + + if msg.hongmengAdditions then + -- body + HarmonyManager.UpdateHongMengDataAdditions(msg.hongmengAdditions) + end + + if msg.hongmengResonacnes then + -- body UpdateHongMengDataHeroInfos + HarmonyManager.UpdateHongMengDataHeroInfos(msg.hongmengResonacnes) end end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua index 12de7456f1..d239511d13 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua @@ -558,10 +558,13 @@ function this.ShowHeroEquip() Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(curEquipTreasureDatas[i].itemConfig.PropertyName)) --鸿蒙阵 共享数据判断 - if HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) then + if HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.HunSoulPrint) ~= -1 then -- body Util.GetGameObject(go.transform, "HongMenging"):SetActive(true) + elseif HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.LingSoulPrint) ~= -1 then + Util.GetGameObject(go.transform, "HongMenging"):SetActive(true) else + -- body Util.GetGameObject(go.transform, "HongMenging"):SetActive(false) end diff --git a/Assets/ManagedResources/~Lua/View/HarmonyView.lua b/Assets/ManagedResources/~Lua/View/HarmonyView.lua index d2e1e46386..13ecec54b7 100644 --- a/Assets/ManagedResources/~Lua/View/HarmonyView.lua +++ b/Assets/ManagedResources/~Lua/View/HarmonyView.lua @@ -58,13 +58,24 @@ function HarmonyView:OnOpen() for i = 1, #HarmonyManager.hongmengGuards do if HarmonyManager.hongmengGuards[i].heroId ~= "" then -- body + table.insert(heroDataList,HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)) - LogGreen("刷新"..i) + LogBlue("刷新IsHaveHero:"..HarmonyManager.hongmengGuards[i].heroId.." ::: "..tostring(HeroManager.IsHaveHero(HarmonyManager.hongmengGuards[i].heroId))) + if not HeroManager.IsHaveHero(HarmonyManager.hongmengGuards[i].heroId) then + for k = 1, #HarmonyManager.hongmengHeroInfos do + -- body + if HarmonyManager.hongmengGuards[i].heroId == HarmonyManager.hongmengHeroInfos[k].heroId then + -- body + LogPink(HeroManager.GetSingleHeroData(HarmonyManager.hongmengHeroInfos[k].heroId)) + end + end + -- body + end end end end - + LogGreen("heroDataList长度:"..#heroDataList) -- if #heroDataList > 0 then -- table.sort(heroDataList, function(a,b) -- if a.lv==b.lv then @@ -87,6 +98,7 @@ function HarmonyView:OnOpen() self.HongMengData[i] = singleHeroData if heroDataList[i].lv== heroDataList[#heroDataList].lv then -- body + self:SetItem(self.HongMengData[i],self.GongMingTable[i],1) else self:SetItem(self.HongMengData[i],self.GongMingTable[i],0)