生命卡排序
parent
4f507b4e76
commit
27bc8f5442
|
@ -57,14 +57,45 @@ function this.GetAllEquipDataNoBless()
|
|||
end
|
||||
table.sort(list,function(a,b)
|
||||
if a.lv==b.lv then
|
||||
return a.lv > b.lv
|
||||
return a.staticId > b.staticId
|
||||
else
|
||||
return a.staticId > b.staticId
|
||||
return a.lv > b.lv
|
||||
end
|
||||
|
||||
end)
|
||||
return list
|
||||
end
|
||||
|
||||
function this.GetAllEquipDataNoBlessAndSort(_id)
|
||||
local list={}
|
||||
for k, v in pairs(this.allEquipData) do
|
||||
if CheckListIsContainValue1(this.allBlessIds,k)==false and (v.belongHero==nil or v.belongHero=="") then
|
||||
if _id and v.staticId==_id then
|
||||
v.isOwn=1
|
||||
else
|
||||
v.isOwn=0
|
||||
end
|
||||
table.insert(list,v)
|
||||
end
|
||||
end
|
||||
table.sort(list,function(a,b)
|
||||
if a.isOwn==b.isOwn then
|
||||
if a.lv==b.lv then
|
||||
return a.staticId > b.staticId
|
||||
else
|
||||
return a.lv > b.lv
|
||||
end
|
||||
else
|
||||
return a.isOwn>b.isOwn
|
||||
end
|
||||
|
||||
|
||||
end)
|
||||
return list
|
||||
end
|
||||
|
||||
|
||||
|
||||
--获取升级升星需要的材料
|
||||
function this.GetAllUpListNoBless(_id)
|
||||
local list={}
|
||||
|
@ -75,9 +106,9 @@ function this.GetAllUpListNoBless(_id)
|
|||
end
|
||||
table.sort(list,function(a,b)
|
||||
if a.lv==b.lv then
|
||||
return a.lv > b.lv
|
||||
else
|
||||
return a.staticId > b.staticId
|
||||
return a.staticId < b.staticId
|
||||
else
|
||||
return a.lv < b.lv
|
||||
end
|
||||
|
||||
end)
|
||||
|
@ -95,9 +126,9 @@ function this.GetCanBlessEquipList()
|
|||
end
|
||||
table.sort(list,function(a,b)
|
||||
if a.lv==b.lv then
|
||||
return a.lv > b.lv
|
||||
return a.staticId > b.staticId
|
||||
else
|
||||
return a.staticId > b.staticId
|
||||
return a.lv > b.lv
|
||||
end
|
||||
|
||||
end)
|
||||
|
|
|
@ -289,7 +289,7 @@ function RoleInfoPanel:BindEvent()
|
|||
|
||||
if talismanIsOpen then
|
||||
if curHeroData.baublesId==nil or curHeroData.baublesId=="" then
|
||||
local list=FaLingManager.GetAllEquipDataNoBless()
|
||||
local list=FaLingManager.GetAllEquipDataNoBlessAndSort(curHeroData.heroConfig.EquipTalismana[2])
|
||||
local curSelectList={}
|
||||
UIManager.OpenPanel(UIName.FaLingListPanel,list,this,curSelectList,curHeroData,1)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue