[功能]==============修行技能添加战斗力提交

dev_chengFeng
wangzhenxing 2022-03-21 17:46:30 +08:00
parent def9ca5701
commit 4562629709
4 changed files with 24 additions and 0 deletions

View File

@ -315,6 +315,7 @@ function this.GetFormationPower(formationId)
power2 = power2 + HeroPowerManager.GetHeroPower(formationList.teamHeroInfos[i].heroId, formationId) power2 = power2 + HeroPowerManager.GetHeroPower(formationList.teamHeroInfos[i].heroId, formationId)
end end
end end
power2=power2+PracticeManager.GetPracticeAddPower()
-- LogGreen("新方式战斗力:"..power2) -- LogGreen("新方式战斗力:"..power2)
-- 主线编队战斗力 -- 主线编队战斗力

View File

@ -472,6 +472,7 @@ function this.InitArmData()
UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,nil,this.choosedList,#this.choosedList) UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,nil,this.choosedList,#this.choosedList)
end, 0.5) end, 0.5)
end end
this.formationPower=this.formationPower+PracticeManager.GetPracticeAddPower()
if this.curFormationIndex == FormationTypeDef.EXPEDITION then-- 远征加圣物战力 if this.curFormationIndex == FormationTypeDef.EXPEDITION then-- 远征加圣物战力
this.formationPower = math.floor(this.formationPower * (1 + ExpeditionManager.CalculateallHolyWarPower()/10000)) this.formationPower = math.floor(this.formationPower * (1 + ExpeditionManager.CalculateallHolyWarPower()/10000))
-- Log("所有圣物战力万分比 "..ExpeditionManager.CalculateallHolyWarPower()) -- Log("所有圣物战力万分比 "..ExpeditionManager.CalculateallHolyWarPower())

View File

@ -37,6 +37,18 @@ function this.UpdataPlayerSkill(msg)
end end
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) function this.SetPlayerSkill(id,lv)

View File

@ -37,8 +37,18 @@ function PracticeSkillInfoPanel:BindEvent()
LogError("point skillId=="..skillId) LogError("point skillId=="..skillId)
PopupTipPanel.ShowTip("技能升级成功!") PopupTipPanel.ShowTip("技能升级成功!")
if nextData then if nextData then
local oldPower=PlayerManager.maxForce
PracticeSkillInfoPanel:RefreshShow(skillId,skillLv+1) PracticeSkillInfoPanel:RefreshShow(skillId,skillLv+1)
PracticeManager.SetPlayerSkill(skillId,skillLv) 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
end) end)
elseif btnState==5 then elseif btnState==5 then