From cc0eebfad8cbeddf9ea5bbb9e08f2a47f094af14 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Sun, 23 Apr 2023 15:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E6=8E=92=E5=BA=8Fbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/hero_comp.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lua/app/ui/hero/hero_comp.lua b/lua/app/ui/hero/hero_comp.lua index 34b86c67..7a5c1a99 100644 --- a/lua/app/ui/hero/hero_comp.lua +++ b/lua/app/ui/hero/hero_comp.lua @@ -122,18 +122,21 @@ function HeroComp:sortHeroList() local heroEntity = HeroData:getHeroById(info.cfgId) local sort = info.cfgId -- id 预留6位 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 + 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 - sort = sort + 20000000 + sort = sort + 200000000000 else - sort = sort + 10000000 + sort = sort + 100000000000 end - sort = sort + 100000000 * heroEntity:getQlt() -- 品质1位 - sort = sort + 1000000000 * heroEntity:getLv() -- 预留3位 - info.sort = sort end table.sort(self.heroList, function(a, b)