英雄排序bug修复
This commit is contained in:
parent
5dd14eb4db
commit
cc0eebfad8
@ -122,18 +122,21 @@ function HeroComp:sortHeroList()
|
|||||||
local heroEntity = HeroData:getHeroById(info.cfgId)
|
local heroEntity = HeroData:getHeroById(info.cfgId)
|
||||||
local sort = info.cfgId -- id 预留6位
|
local sort = info.cfgId -- id 预留6位
|
||||||
sort = sort + (10 - info.elementType) * 1000000 -- 位置预留1位
|
sort = sort + (10 - info.elementType) * 1000000 -- 位置预留1位
|
||||||
|
sort = sort + 10000000 * heroEntity:getQlt() -- 品质1位
|
||||||
|
sort = sort + 100000000 * heroEntity:getLv() -- 预留3位
|
||||||
if heroEntity:isUnlock() then
|
if heroEntity:isUnlock() then
|
||||||
sort = sort + 30000000
|
sort = sort + 300000000000
|
||||||
|
if heroEntity:isActived() then
|
||||||
|
sort = sort + 400000000000
|
||||||
|
else
|
||||||
|
sort = sort + 300000000000
|
||||||
|
end
|
||||||
elseif DataManager.BagData.ItemData:getItemNumById(heroEntity:getFragmentId()) > 0 then
|
elseif DataManager.BagData.ItemData:getItemNumById(heroEntity:getFragmentId()) > 0 then
|
||||||
sort = sort + 20000000
|
sort = sort + 200000000000
|
||||||
else
|
else
|
||||||
sort = sort + 10000000
|
sort = sort + 100000000000
|
||||||
end
|
end
|
||||||
|
|
||||||
sort = sort + 100000000 * heroEntity:getQlt() -- 品质1位
|
|
||||||
sort = sort + 1000000000 * heroEntity:getLv() -- 预留3位
|
|
||||||
|
|
||||||
info.sort = sort
|
info.sort = sort
|
||||||
end
|
end
|
||||||
table.sort(self.heroList, function(a, b)
|
table.sort(self.heroList, function(a, b)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user