From 50c78ef88888ee822637b036ea3bcedd28fb7885 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 6 Apr 2022 14:15:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90bug=E3=80=91=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E8=81=8C=E4=B8=9A=E5=90=8E=E5=8D=B8=E4=B8=8B?= =?UTF-8?q?=E9=AD=82=E5=AE=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua | 7 +++++++ Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index eecbd1e609..41dd3b404c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -3909,6 +3909,13 @@ function this.RemoveTreasure(dId, jId) end end + +function this.ClearHeroAllJewels(did) + if heroDatas[did] then + heroDatas[did].jewels={} + end +end + --根据界面数据加载动态立绘 function this.LoadHerolive(_heroData, _objPoint) --TODO:动态加载立绘 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index a33389074c..8d291235fa 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -3286,7 +3286,7 @@ function this.HeroRetureEvent(heroId, func, indexType) end) end ---请求英雄回溯 +--改变英雄阵营 function this.ChangeHeroPro(heroId,pro,func) local data = HeroInfoProto_pb.GodDevilHeroSelectPropRequest() LogError("HeroRetureEvent "..heroId) @@ -3297,6 +3297,9 @@ function this.ChangeHeroPro(heroId,pro,func) --local data = buffer:DataByte() HeroManager.SetHeroPro(heroId,pro) PopupTipPanel.ShowTip("阵营转换成功") + HeroManager.ClearHeroAllJewels(heroId) + --HeroManager.CompareWarPower1(heroId) + HeroPropManager.SetDirtyByType(heroId, Hero_Prop_Type.EquipTreasure) if func then func() end