背包碎片排序 限时兑换调整预设

zhangqiang 2020-07-28 23:40:36 +08:00
parent 807d6745ac
commit 36e18b7519
2 changed files with 59 additions and 25 deletions

View File

@ -17820,7 +17820,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 245, y: 245, z: 0}
initFloat: 0
@ -35242,7 +35241,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: -350, z: 0}
initFloat: 0
@ -83585,7 +83583,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 350, y: 0, z: 0}
initFloat: 0
@ -165732,7 +165729,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: -350, y: 0, z: 0}
initFloat: 0
@ -196660,7 +196656,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: -245, y: 245, z: 0}
initFloat: 0
@ -211825,7 +211820,7 @@ RectTransform:
m_GameObject: {fileID: 5778745134577080660}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3327171285949190197}
m_RootOrder: 0
@ -259966,7 +259961,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 245, y: -245, z: 0}
initFloat: 0
@ -261456,7 +261450,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: -245, y: -245, z: 0}
initFloat: 0
@ -262329,7 +262322,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
m_Name:
m_EditorClassIdentifier:
tweenSequeue1:
tweenSequeue:
- initV3: {x: 0, y: 350, z: 0}
initFloat: 0

View File

@ -587,23 +587,31 @@ function this.ItemsSortData(_itemDatas)
if sortIndex == 0 then
--0全部 1装备 2材料 3消耗 4特殊 5碎片
if a.itemConfig.ItemBaseType == b.itemConfig.ItemBaseType then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.itemConfig.ItemType == a.itemConfig.ItemType then
if a.itemConfig.ItemType == ItemType.Talisman and b.itemConfig.ItemType == ItemType.Talisman then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.star == b.star then
return a.id < b.id
else
return a.star > b.star
end
else
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
end
if a.itemConfig.ItemType == ItemType.HunYin and b.itemConfig.ItemType == ItemType.HunYin then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.quality == b.quality then
return a.id > b.id
else
return a.quality > b.quality
end
else
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
end
if a.itemConfig.ItemType == ItemType.EquipTreasure and b.itemConfig.ItemType == ItemType.EquipTreasure then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.refineLv == b.refineLv then
if a.lv == b.lv then
return a.id > b.id
@ -613,17 +621,35 @@ function this.ItemsSortData(_itemDatas)
else
return a.refineLv > b.refineLv
end
end
else
return a.itemConfig.ItemType < b.itemConfig.ItemType
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
end
if a.itemConfig.ItemType == ItemType.HeroDebris and b.itemConfig.ItemType == ItemType.HeroDebris then
local aNum = BagManager.GetItemCountById(a.itemConfig.Id) >= a.itemConfig.UsePerCount and 2 or 1
local bNum = BagManager.GetItemCountById(b.itemConfig.Id) >= b.itemConfig.UsePerCount and 2 or 1
if aNum == bNum then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.itemConfig.PropertyName == b.itemConfig.PropertyName then
return a.id < b.id
else
return a.itemConfig.PropertyName < b.itemConfig.PropertyName
end
else
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
else
return aNum > bNum
end
end
else
return a.itemConfig.ItemType < b.itemConfig.ItemType
end
else
return a.itemConfig.ItemBaseType < b.itemConfig.ItemBaseType
end
elseif sortIndex == ItemBaseType.Equip or sortIndex == ItemBaseType.Materials or sortIndex == ItemBaseType.Special or sortIndex == ItemBaseType.HeroChip then
elseif sortIndex == ItemBaseType.Equip or sortIndex == ItemBaseType.Materials or sortIndex == ItemBaseType.Special then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.itemConfig.ItemType == b.itemConfig.ItemType then
return a.id > b.id
@ -633,6 +659,22 @@ function this.ItemsSortData(_itemDatas)
else
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
elseif sortIndex == ItemBaseType.HeroChip then
local aNum = BagManager.GetItemCountById(a.itemConfig.Id) >= a.itemConfig.UsePerCount and 2 or 1
local bNum = BagManager.GetItemCountById(b.itemConfig.Id) >= b.itemConfig.UsePerCount and 2 or 1
if aNum == bNum then
if a.itemConfig.Quantity == b.itemConfig.Quantity then
if a.itemConfig.PropertyName == b.itemConfig.PropertyName then
return a.id < b.id
else
return a.itemConfig.PropertyName < b.itemConfig.PropertyName
end
else
return a.itemConfig.Quantity > b.itemConfig.Quantity
end
else
return aNum > bNum
end
elseif sortIndex == ItemBaseType.DemonSoul then
local aNum = BagManager.GetItemCountById(a.itemConfig.Id) >= a.itemConfig.UsePerCount and 2 or 1
local bNum = BagManager.GetItemCountById(b.itemConfig.Id) >= b.itemConfig.UsePerCount and 2 or 1