diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index 3127e5e026..f08fc3e13d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -315,6 +315,7 @@ function this.GetFormationPower(formationId) power2 = power2 + HeroPowerManager.GetHeroPower(formationList.teamHeroInfos[i].heroId, formationId) end end + power2=power2+PracticeManager.GetPracticeAddPower() -- LogGreen("新方式战斗力:"..power2) -- 主线编队战斗力 diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 68a188fe16..4bca0cdf57 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -472,6 +472,7 @@ function this.InitArmData() UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,nil,this.choosedList,#this.choosedList) end, 0.5) end + this.formationPower=this.formationPower+PracticeManager.GetPracticeAddPower() if this.curFormationIndex == FormationTypeDef.EXPEDITION then-- 远征加圣物战力 this.formationPower = math.floor(this.formationPower * (1 + ExpeditionManager.CalculateallHolyWarPower()/10000)) -- Log("所有圣物战力万分比 "..ExpeditionManager.CalculateallHolyWarPower()) diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua index d1ae207c12..2cf7056e4c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeManager.lua @@ -37,6 +37,18 @@ function this.UpdataPlayerSkill(msg) end end +--获取修行技能添加的战斗 +function this.GetPracticeAddPower() + local addPower=0 + for key, value in pairs(this.playerSkillList) do + local lvConfig=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PlayerSkill,"SkillID",key,"Level",value) + if lvConfig then + addPower=addPower+lvConfig.Fight + end + end + return addPower +end + --设置角色技能等级 function this.SetPlayerSkill(id,lv) diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua index c9536639bd..4755621749 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticeSkillInfoPanel.lua @@ -37,8 +37,18 @@ function PracticeSkillInfoPanel:BindEvent() LogError("point skillId=="..skillId) PopupTipPanel.ShowTip("技能升级成功!") if nextData then + local oldPower=PlayerManager.maxForce PracticeSkillInfoPanel:RefreshShow(skillId,skillLv+1) PracticeManager.SetPlayerSkill(skillId,skillLv) + local newPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + if newPower>oldPower then + NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL,function() + PlayerManager.maxForce=newPower + UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldPower,newValue = newPower}) + end) + + end + end end) elseif btnState==5 then