战力相关提交

dev_chengFeng
yuanshuai 2023-04-04 11:59:36 +08:00
parent 12e2cecaa1
commit 3d5e8c8c5b
3 changed files with 17 additions and 0 deletions

View File

@ -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()

View File

@ -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)

View File

@ -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