修复获取奖励卡顿的问题
parent
461c64b04a
commit
edc24d7efd
|
@ -95,7 +95,7 @@ function this.GetAllEquipData()
|
|||
--v.warPower = this.CalculateWarForce(v.did)
|
||||
table.insert(equips,v)
|
||||
end
|
||||
table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
-- table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
return equips
|
||||
end
|
||||
--背包专用 去除已穿装备
|
||||
|
@ -131,7 +131,7 @@ function this.GetEquipDataByEquipQuality(_equipQuality)
|
|||
table.insert(equips,v)
|
||||
end
|
||||
end
|
||||
table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
-- table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
return equips
|
||||
end
|
||||
--通过装备品品质获得装备list (已穿装备去除)
|
||||
|
@ -142,7 +142,7 @@ function this.GetEquipDataByEquipQuality2(_equipQuality)
|
|||
table.insert(equips,v)
|
||||
end
|
||||
end
|
||||
table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
-- table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
return equips
|
||||
end
|
||||
|
||||
|
@ -155,21 +155,28 @@ function this.GetEquipDataByEquipPosition(_position)
|
|||
table.insert(equips,v)
|
||||
end
|
||||
end
|
||||
table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
-- table.sort(equips, function(a,b) return a.id < b.id end)
|
||||
return equips
|
||||
end
|
||||
--通过装备品职业和位置获得装备list 自己穿的装备也要显示
|
||||
function this.GetEquipDataByEquipJobAndPos(_pos,_job,_heroDid)
|
||||
local equips = {}
|
||||
local repeatEquips = {}
|
||||
for i, v in pairs(this.equipDatas) do
|
||||
if v.equipConfig.ProfessionLimit == _job or v.equipConfig.ProfessionLimit==0 then
|
||||
if v.equipConfig.Position== _pos then
|
||||
if v.upHeroDid =="0" or v.upHeroDid == _heroDid then
|
||||
table.insert(equips,v)
|
||||
if not repeatEquips[v.id] then
|
||||
if v.equipConfig.ProfessionLimit == _job or v.equipConfig.ProfessionLimit==0 then
|
||||
if v.equipConfig.Position== _pos then
|
||||
if v.upHeroDid =="0" or v.upHeroDid == _heroDid then
|
||||
repeatEquips[v.id] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--
|
||||
for _, v in pairs(repeatEquips) do
|
||||
table.insert(equips,v)
|
||||
end
|
||||
return equips
|
||||
end
|
||||
--设置装备穿戴的英雄
|
||||
|
@ -276,6 +283,9 @@ function this.CalculateWarForce(equipDid,data)
|
|||
end
|
||||
--根据装备数据计算战斗力
|
||||
function this.CalculateEquipWarForce(curEquip)
|
||||
if curEquip.warForce then
|
||||
return curEquip.warForce
|
||||
end
|
||||
local addAllProVal={}
|
||||
for i, v in ConfigPairs(propertyConfig) do
|
||||
addAllProVal[i]=0
|
||||
|
@ -313,7 +323,8 @@ function this.CalculateEquipWarForce(curEquip)
|
|||
if curEquip.equipConfig and curEquip.equipConfig.Score > 0 then
|
||||
powerEndVal = powerEndVal + curEquip.equipConfig.Score
|
||||
end
|
||||
return math.floor(powerEndVal)
|
||||
curEquip.warForce = math.floor(powerEndVal)
|
||||
return curEquip.warForce--math.floor(powerEndVal)
|
||||
end
|
||||
--根据装备数据计算战斗力
|
||||
function this.CalculateEquipWarForce2(curEquip)
|
||||
|
|
|
@ -272,7 +272,7 @@ function RewardItemPopup:SetItemShow(drop)
|
|||
end
|
||||
end, 0.5):Start()
|
||||
--在关卡界面获得装备 刷新下btview成员红点
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
|
||||
end)
|
||||
for i = #itemDataList, 1, -1 do
|
||||
isPlayerAniEnd = false
|
||||
|
@ -312,7 +312,7 @@ function RewardItemPopup:SetItemShow(drop)
|
|||
callList:Pop()()
|
||||
end
|
||||
-- 根据物品列表数据显示物品
|
||||
function RewardItemPopup:SetItemShowMax(drop)
|
||||
function RewardItemPopup:SetItemShowMax(drop)
|
||||
BagManager.OnShowTipDropNumZero(drop)
|
||||
if drop==nil then return end
|
||||
for i = 1, #itemDataList do
|
||||
|
@ -346,7 +346,7 @@ function RewardItemPopup:SetItemShowMax(drop)
|
|||
HeroManager.DetectionOpenFiveStarActivity(isOpenGeiSSRAvtivity)
|
||||
end
|
||||
--在关卡界面获得装备 刷新下btview成员红点
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
|
||||
end)
|
||||
for i = #itemDataList, 1, -1 do
|
||||
isPlayerAniEnd = false
|
||||
|
|
Loading…
Reference in New Issue