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)