修改道具排序顺序

dev_chengFeng
jiaoyangna 2021-09-28 10:12:12 +08:00
parent 33acb35f82
commit b0c02a7ff0
1 changed files with 7 additions and 3 deletions

View File

@ -92,10 +92,14 @@ function this.GetAllItemsData()
table.insert(list,data)
end
table.sort(list,function(a,b)
if a.property == b.property then
return a.id < b.id
if a.Quantity == b.Quantity then
if a.property == b.property then
return a.id < b.id
end
return a.property < b.property
else
return a.Quantity > b.Quantity
end
return a.property < b.property
end)
return list
end