diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua index 5ad8f03ac0..653bd5744b 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua @@ -29,11 +29,15 @@ function this:BindEvent() UIManager.OpenPanel(UIName.GodWeaponUpPanel,2,godwData) end) Util.AddClick(this.unloadBtn, function() + local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) NetManager.RequestMagicSoldierLocation(godwData.Did,0,function() PopupTipPanel.ShowTip("下阵成功") this.unloadBtn.gameObject:SetActive(false) this.changeBtn.gameObject:SetActive(false) GodWeaponManager.SetWeaponUpZhen(godwData.Did,0) + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) end) end) Util.AddClick(this.changeBtn, function() diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua index d633734bf5..a4be9bdbf9 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua @@ -77,6 +77,7 @@ function this.SingleItemDataShow(_go,_itemData) SetHeroStars(this.spLoader, Util.GetGameObject(_go.transform, "star/starGrid"), _itemData.star,1,starSize,-5,Vector2.New(0.5,0.5)) Util.AddOnceClick(Util.GetGameObject(_go.transform,"upZhen"), function() if curUpZhenPokemonData then + local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) NetManager.RequestMagicSoldierLocation(curUpZhenPokemonData.Did,0,function() local upPos=curUpZhenPokemonData.point GodWeaponManager.SetWeaponUpZhen(curUpZhenPokemonData.Did,0) diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua index 50a76b5517..6299de77f0 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua @@ -55,6 +55,7 @@ function this:BindEvent() this.UpdateWinInfo() end) Util.AddClick(this.upStarBtn, function() + local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) local haveUpStarCost=GodWeaponManager.GetUpStarCost(godWeaponData) local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ShenbingStar,"Star",godWeaponData.star,"Quality",godWeaponData.config.Quality) local needNum=starConfig.ConsumeItemNum @@ -65,6 +66,9 @@ function this:BindEvent() end NetManager.RequestMagicSoldierStrong(godWeaponData.Did,2,0,costList,function(msg) this.UpdateWinInfo() + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) end) else PopupTipPanel.ShowTip("道具不足") @@ -141,12 +145,17 @@ function this.LvUpClick(isSingleLvUp) return end if isSingleLvUp then --单次点击升级 + local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) NetManager.RequestMagicSoldierStrong(godWeaponData.Did,1,1,nil,function(msg) GodWeaponManager.SetGodWeaponLv(godWeaponData.Did,1) this.UpdateWinInfo() + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) end) else isTriggerLongClick = true + local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) --前端先扣除材料 for i = 1, #costItems do BagManager.HeroLvUpUpdateItemsNum(costItems[i][1],costItems[i][2]) @@ -154,6 +163,9 @@ function this.LvUpClick(isSingleLvUp) addLvNum=addLvNum+1 GodWeaponManager.SetGodWeaponLv(godWeaponData.Did,1) this.UpdateWinInfo() + local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) + --飘战力 + PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) _isReqLvUp = false end end