@@ -412,6 +412,9 @@ function UI:BuildUI()
412412 if result .distance > 0 then
413413 text = WARBAND_MARKUP .. ' ' .. text ;
414414 end
415+ if result .upgradeLevel > 0 then
416+ text = text .. (' %d/%d' ):format (result .upgradeLevel , result .maxUpgradeLevel );
417+ end
415418 GameTooltip :AddDoubleLine (text , result .location , 1 , 1 , 1 , 1 , 1 , 1 );
416419 end
417420 else
@@ -616,6 +619,9 @@ function UI:OnUpdate()
616619 if a .distance ~= b .distance then
617620 return a .distance < b .distance ;
618621 end
622+ if a .upgradeLevel ~= b .upgradeLevel then
623+ return a .upgradeLevel > b .upgradeLevel ;
624+ end
619625 if a .location ~= b .location then
620626 return a .location > b .location ;
621627 end
693699--- @param classID number
694700--- @param seasonID number
695701--- @return nil | TUM_UI_ResultData info
696- --- @return nil | TUM_UI_ResultData upgradeInfo
702+ --- @return nil | TUM_UI_ResultData upgradedInfo
697703local function checkResult (scanResult , classID , seasonID )
698704 if
699705 scanResult .source .guild -- ignore guild banks, might add some filter setting later
@@ -749,8 +755,11 @@ local function checkResult(scanResult, classID, seasonID)
749755 location = CreateAtlasMarkup (' warbands-icon' , 17 , 13 ) .. ' Warband bank' ;
750756 distance = 100 + scanResult .source .warband ;
751757 end
758+ local upgradeInfo = C_Item .GetItemUpgradeInfo (scanResult .itemLink )
759+ local upgradeLevel = upgradeInfo and upgradeInfo .currentLevel or 0
760+ local maxUpgradeLevel = upgradeInfo and upgradeInfo .maxLevel or 0
752761
753- local info , upgradeInfo ;
762+ local info , upgradedInfo ;
754763 if not isItemCatalysed and tumResult .catalystAppearanceMissing then
755764 --- @type TUM_UI_ResultData
756765 info = {
@@ -762,12 +771,14 @@ local function checkResult(scanResult, classID, seasonID)
762771 itemLink = scanResult .itemLink ,
763772 location = location ,
764773 distance = distance ,
774+ upgradeLevel = upgradeLevel ,
775+ maxUpgradeLevel = maxUpgradeLevel ,
765776 };
766777 end
767778
768779 if tumResult .catalystUpgradeAppearanceMissing or (isItemCatalysed and tumResult .upgradeAppearanceMissing ) then
769780 --- @type TUM_UI_ResultData
770- upgradeInfo = {
781+ upgradedInfo = {
771782 slot = itemSlot ,
772783 tier = tumResult .contextData .tier + 1 ,
773784 knownFromOtherItem = (isItemCatalysed and tumResult .upgradeAppearanceLearnedFromOtherItem ) or tumResult .catalystUpgradeAppearanceLearnedFromOtherItem ,
@@ -776,10 +787,12 @@ local function checkResult(scanResult, classID, seasonID)
776787 itemLink = scanResult .itemLink ,
777788 location = location ,
778789 distance = distance ,
790+ upgradeLevel = upgradeLevel ,
791+ maxUpgradeLevel = maxUpgradeLevel ,
779792 };
780793 end
781794
782- return info , upgradeInfo ;
795+ return info , upgradedInfo ;
783796end
784797
785798--- @param result SyndicatorSearchResult
0 commit comments