From 27bc8f54422b5128c66eab4cc22bb8ca1bb74c86 Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Tue, 16 Jan 2024 13:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E5=91=BD=E5=8D=A1=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Guild/Skill/FaLingManager.lua | 45 ++++++++++++++++--- .../~Lua/Modules/RoleInfo/RoleInfoPanel.lua | 2 +- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Skill/FaLingManager.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Skill/FaLingManager.lua index c476057658..81c53ee0c7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Skill/FaLingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Skill/FaLingManager.lua @@ -57,14 +57,45 @@ function this.GetAllEquipDataNoBless() end table.sort(list,function(a,b) if a.lv==b.lv then - return a.lv > b.lv + return a.staticId > b.staticId else - return a.staticId > b.staticId + return a.lv > b.lv end end) return list end + +function this.GetAllEquipDataNoBlessAndSort(_id) + local list={} + for k, v in pairs(this.allEquipData) do + if CheckListIsContainValue1(this.allBlessIds,k)==false and (v.belongHero==nil or v.belongHero=="") then + if _id and v.staticId==_id then + v.isOwn=1 + else + v.isOwn=0 + end + table.insert(list,v) + end + end + table.sort(list,function(a,b) + if a.isOwn==b.isOwn then + if a.lv==b.lv then + return a.staticId > b.staticId + else + return a.lv > b.lv + end + else + return a.isOwn>b.isOwn + end + + + end) + return list + end + + + --获取升级升星需要的材料 function this.GetAllUpListNoBless(_id) local list={} @@ -75,9 +106,9 @@ function this.GetAllUpListNoBless(_id) end table.sort(list,function(a,b) if a.lv==b.lv then - return a.lv > b.lv - else - return a.staticId > b.staticId + return a.staticId < b.staticId + else + return a.lv < b.lv end end) @@ -95,9 +126,9 @@ function this.GetCanBlessEquipList() end table.sort(list,function(a,b) if a.lv==b.lv then - return a.lv > b.lv + return a.staticId > b.staticId else - return a.staticId > b.staticId + return a.lv > b.lv end end) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index f9b249a7e7..60d28a5bb6 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -289,7 +289,7 @@ function RoleInfoPanel:BindEvent() if talismanIsOpen then if curHeroData.baublesId==nil or curHeroData.baublesId=="" then - local list=FaLingManager.GetAllEquipDataNoBless() + local list=FaLingManager.GetAllEquipDataNoBlessAndSort(curHeroData.heroConfig.EquipTalismana[2]) local curSelectList={} UIManager.OpenPanel(UIName.FaLingListPanel,list,this,curSelectList,curHeroData,1) else