命石飘战力提交

dev_one_discount
wangzhenxing 2023-09-01 18:29:25 +08:00
parent 55f0c6d3e6
commit ffaab0f625
3 changed files with 37 additions and 9 deletions

View File

@ -983,6 +983,7 @@ function this.GetTableByBackDropData(drop)
end
end
if drop.gemNew ~= nil and #drop.gemNew > 0 then
local isChange=false
for i = 1, #drop.gemNew do
local itemdata = {}
itemdata.sId = drop.gemNew[i].id
@ -1000,6 +1001,7 @@ function this.GetTableByBackDropData(drop)
itemdata.num = 1
if drop.gemNew[i].isReplace==1 then
itemdata.isReplace=true
isChange=true
else
itemdata.isReplace=false
end
@ -1012,6 +1014,18 @@ function this.GetTableByBackDropData(drop)
end
itemdata.pro=pros
table.insert(itemDataList, itemdata)
if isChange then
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gem)
--获取新战力
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
-- LogError("oldwar====".. .." temppower=="..tempPower)
if GemNewManager.oldPower ~= tempPower then
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = GemNewManager.oldPower,newValue = tempPower})
GemNewManager.oldPower=tempPower
end
end
--PokemonManager.UpdatePokemonDatas(itemdata.backData,true)
end
end

View File

@ -9,6 +9,7 @@ function this.Initialize()
this.sperGemList ={} --高级命石
this.typeGemList = {}
this.timer=nil
this.oldPower=0
end
--初始化命石
@ -62,14 +63,14 @@ function this.InitGemsInfo(msg)
end
end
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gem)
--获取新战力
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
LogError("oldwar===="..oldWarPower.." temppower=="..tempPower)
if oldWarPower ~= tempPower then
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = tempPower})
end
-- HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gem)
-- --获取新战力
-- NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
-- local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
-- LogError("oldwar===="..oldWarPower.." temppower=="..tempPower)
-- if oldWarPower ~= tempPower then
-- UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = tempPower})
-- end
if this.timer~=nil then
this.timer:Stop()
this.timer=nil

View File

@ -30,6 +30,7 @@ local curType=0
local activityId=0
local progresss=0
local wishLv=0
local oldWarPower=0
function Gem:InitComponent()
self.spLoader = SpriteLoader.New()
if not self.playerInfoView then
@ -316,6 +317,16 @@ function Gem:UpdatePanelData(_type)
--end
end)
end
-- HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gem)
-- --获取新战力
-- NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
-- local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
-- LogError("oldwar===="..oldWarPower.." temppower=="..tempPower)
-- if oldWarPower ~= tempPower then
-- oldWarPower=tempPower
-- UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = tempPower})
-- end
end
@ -335,7 +346,6 @@ end
function Gem:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Gem })
self.BtView:OnOpen(self,{ sortOrder = self.sortingOrder, panelType = PanelTypeView.Practice })
local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
self.TabCtrl:Init(self.tab, _TabData,2)
end
@ -350,6 +360,9 @@ function Gem:OnSortingOrderChange()
end
function Gem:OnShow()
oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
GemNewManager.oldPower=oldWarPower
LogError("oldWarPower====================="..oldWarPower)
self.playerInfoView:OnShow()
Util.SetParticleSortLayer(self.fx_ui_xiuxingshengxin_cangzhu, self.sortingOrder + 1)
--self:Refresh()