From c72d3af8532e89e86a7949ead779f24a58f4e69e Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 8 Oct 2021 19:32:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID1018697=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E4=BD=A9=E6=88=B4=E9=AD=82=E5=8D=B0=E3=80=91=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?dev=E4=BD=A9=E6=88=B4=E9=AD=82=E5=8D=B0=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=88=98=E5=8A=9B=E4=B8=8A=E5=8D=87=E6=8F=90=E7=A4=BA=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Hero/HeroManager.lua | 20 +++++++++++++++++++ .../~Lua/Modules/Net/NetManager.lua | 4 ++++ .../~Lua/Modules/SoulPrint/SoulPrintPanel.lua | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 9b2d761363..64b538e101 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -590,6 +590,26 @@ function this.CompareWarPower(heroDId) FormationManager.CheckHeroIdExist(heroDId) end +--对比战力并更新战力值 +function this.CompareWarPower1(heroDId,oldWarPowerValue) + local newWarPowerValue = HeroPowerManager.GetHeroPower(heroDId) + heroDatas[heroDId].warPower = newWarPowerValue + if oldWarPowerValue and newWarPowerValue then + if oldWarPowerValue ~= newWarPowerValue then + if + not UIManager.IsOpen(UIName.RoleUpStarSuccessPanel) and + not UIManager.IsOpen(UIName.RoleUpLvBreakSuccessPanel) + then + UIManager.OpenPanel( + UIName.WarPowerChangeNotifyPanelV2, + {oldValue = oldWarPowerValue, newValue = newWarPowerValue} + ) + end + end + end + FormationManager.CheckHeroIdExist(heroDId) +end + --更新本地单个英雄技能信息 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 28c3f13462..5198fa57b2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -3914,6 +3914,8 @@ function NetManager.SoulEquipWearRequest(wearInfo, unloadInfo, func) end local msg = data:SerializeToString() Network:SendMessageWithCallBack(MessageTypeProto_pb.SOUL_EQUIP_WEAR_REQUEST, MessageTypeProto_pb.SOUL_EQUIP_WEAR_RESPONSE, msg, function() + NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL) + HeroPropManager.SetDirtyByType(wearInfo.heroId, Hero_Prop_Type.SoulPrint) if func then func(msg) end @@ -3929,6 +3931,8 @@ function NetManager.SoulEquipUnLoadWearRequest(_heroId, _equipId,_pos, func) c.position =_pos local msg = data:SerializeToString() Network:SendMessageWithCallBack(MessageTypeProto_pb.SOUL_EQUIP_UNLOAD_OPT_REQUEST, MessageTypeProto_pb.SOUL_EQUIP_UNLOAD_OPT_RESPONSE, msg, function() + NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL) + HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.SoulPrint) if func then func(msg) end diff --git a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintPanel.lua b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintPanel.lua index 159fd48bfd..60af34a50f 100644 --- a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintPanel.lua @@ -411,11 +411,12 @@ function this.SetScrollPre(root,data) return end local pos=this.GetPos()--位置 + local oldPower = HeroManager.GetSingleHeroData(curHeroData.dynamicId).warPower UIManager.OpenPanel(UIName.SoulPrintPopUp,1,curHeroData.dynamicId,data.id,pos,function() PopupTipPanel.ShowTip(Language[11526]) this.RefreshShow() --对比战力并更新战力值 播放战力变更动画 - HeroManager.CompareWarPower(curHeroData.dynamicId) + HeroManager.CompareWarPower1(curHeroData.dynamicId,oldPower) end,data) -- end end)