diff --git a/lua/app/userdata/hero/hero_data.lua b/lua/app/userdata/hero/hero_data.lua index 2686cec2..65772b3e 100644 --- a/lua/app/userdata/hero/hero_data.lua +++ b/lua/app/userdata/hero/hero_data.lua @@ -291,18 +291,6 @@ function HeroData:getAllHeroesSort(formationType) sort = sort + (10 - info.elementType) * 1000000 -- 位置预留1位 sort = sort + 10000000 * heroEntity:getQlt() -- 品质1位 sort = sort + 100000000 * heroEntity:getLv() -- 预留3位 - if heroEntity:isUnlock() then - sort = sort + 300000000000 - if heroEntity:isActived() then - sort = sort + 400000000000 - else - sort = sort + 300000000000 - end - elseif DataManager.BagData.ItemData:getItemNumById(heroEntity:getFragmentId()) > 0 then - sort = sort + 200000000000 - else - sort = sort + 100000000000 - end if formationMap and formationMap[info.cfgId] then --在布阵中 sort = sort + 10000000000000 @@ -310,6 +298,19 @@ function HeroData:getAllHeroesSort(formationType) if not heroEntity:isActived() and heroEntity:canLvUp() then sort = sort + 1000000000000 + else + if heroEntity:isUnlock() then + sort = sort + 300000000000 + if heroEntity:isActived() then + sort = sort + 400000000000 + else + sort = sort + 300000000000 + end + elseif DataManager.BagData.ItemData:getItemNumById(heroEntity:getFragmentId()) > 0 then + sort = sort + 200000000000 + else + sort = sort + 100000000000 + end end info.sort = sort