@@ -12,12 +12,6 @@ local m_max = math.max
1212local m_floor = math.floor
1313
1414local toolTipText = " Prefix tag searches with a colon and exclude tags with a dash. e.g. :fire:lightning:-cold:area"
15- local altQualMap = {
16- [" Default" ] = " " ,
17- [" Alternate1" ] = " Anomalous " ,
18- [" Alternate2" ] = " Divergent " ,
19- [" Alternate3" ] = " Phantasmal " ,
20- }
2115
2216local GemSelectClass = newClass (" GemSelectControl" , " EditControl" , function (self , anchor , rect , skillsTab , index , changeFunc , forceTooltip )
2317 self .EditControl (anchor , rect , nil , nil , " ^ %a':-" )
@@ -58,7 +52,7 @@ local GemSelectClass = newClass("GemSelectControl", "EditControl", function(self
5852 }
5953end )
6054
61- function GemSelectClass :CalcOutputWithThisGem (calcFunc , gemData , qualityId , useFullDPS )
55+ function GemSelectClass :CalcOutputWithThisGem (calcFunc , gemData , useFullDPS )
6256 local gemList = self .skillsTab .displayGroup .gemList
6357 local displayGemList = self .skillsTab .displayGroup .displayGemList
6458 local oldGem
@@ -67,7 +61,6 @@ function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, qualityId, useF
6761 else
6862 gemList [self .index ] = {
6963 level = gemData .naturalMaxLevel ,
70- qualityId = qualityId ,
7164 quality = self .skillsTab .defaultGemQuality or 0 ,
7265 count = 1 ,
7366 enabled = true ,
@@ -84,9 +77,6 @@ function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, qualityId, useF
8477 gemInstance .level = self .skillsTab :ProcessGemLevel (gemData )
8578 gemInstance .gemData = gemData
8679 gemInstance .displayEffect = nil
87- if gemInstance .qualityId == nil or gemInstance .qualityId == " " then
88- gemInstance .qualityId = " Default"
89- end
9080 -- Calculate the impact of using this gem
9181 local output = calcFunc (nil , useFullDPS )
9282 -- Put the original gem back into the list
@@ -120,23 +110,13 @@ function GemSelectClass:PopulateGemList()
120110 self .gems [" Default:" .. gemId ] = gemData
121111 end
122112 elseif showNormal or showAll then
123- if self .skillsTab .showAltQualityGems and (self .skillsTab .defaultGemQuality or 0 ) > 0 then
124- for _ , altQual in ipairs (self .skillsTab :getGemAltQualityList (gemData )) do
125- self .gems [altQual .type .. " :" .. gemId ] = gemData
126- end
127- else
128- self .gems [" Default:" .. gemId ] = gemData
129- end
113+ self .gems [" Default:" .. gemId ] = gemData
130114 end
131115 end
132116 end
133117 end
134118end
135119
136- function GemSelectClass :GetQualityType (gemId )
137- return gemId and gemId :gsub (" :.+" ," " ) or " Default"
138- end
139-
140120function GemSelectClass :FilterSupport (gemId , gemData )
141121 local showSupportTypes = self .skillsTab .showSupportGemTypes
142122 local isLegacyAwakened = (gemData .grantedEffect .legacy and gemData .grantedEffect .plusVersionOf )
@@ -147,7 +127,6 @@ function GemSelectClass:FilterSupport(gemId, gemData)
147127 or showSupportTypes == " ALL"
148128 or (showSupportTypes == " NORMAL" and not (isLegacyAwakened or gemData .tagString :match (" Exceptional" )))
149129 or (showSupportTypes == " EXCEPTIONAL" and (isLegacyAwakened or gemData .tagString :match (" Exceptional" ))))
150- and (self .skillsTab .showAltQualityGems or (not self .skillsTab .showAltQualityGems and self :GetQualityType (gemId ) == " Default" ))
151130end
152131
153132function GemSelectClass :BuildList (buf )
@@ -177,7 +156,7 @@ function GemSelectClass:BuildList(buf)
177156 for i , pattern in ipairs (patternList ) do
178157 local matchList = { }
179158 for gemId , gemData in pairs (self .gems ) do
180- if self :FilterSupport (gemId , gemData ) and not added [gemId ] and ((" " .. gemData .name :lower ()):match (pattern ) or altQualMap [ self : GetQualityType ( gemId )]: lower (): match ( pattern ) ) then
159+ if self :FilterSupport (gemId , gemData ) and not added [gemId ] and ((" " .. gemData .name :lower ()):match (pattern )) then
181160 addThisGem = true
182161 if # tagsList > 0 then
183162 for _ , tag in ipairs (tagsList ) do
@@ -259,12 +238,11 @@ function GemSelectClass:UpdateSortCache()
259238 and sortCache .outputRevision == self .skillsTab .build .outputRevision and sortCache .defaultLevel == self .skillsTab .defaultGemLevel
260239 and (sortCache .characterLevel == self .skillsTab .build .characterLevel or self .skillsTab .defaultGemLevel ~= " characterLevel" )
261240 and sortCache .defaultQuality == self .skillsTab .defaultGemQuality and sortCache .sortType == self .skillsTab .sortGemsByDPSField
262- and sortCache .considerAlternates == self .skillsTab .showAltQualityGems and sortCache .considerGemType == self .skillsTab .showSupportGemTypes
263- and sortCache .showLegacyGems == self .skillsTab .showLegacyGems then
241+ and sortCache .considerGemType == self .skillsTab .showSupportGemTypes and sortCache .showLegacyGems == self .skillsTab .showLegacyGems then
264242 return
265243 end
266244
267- if not sameSortBy or not sortCache or (sortCache .considerAlternates ~= self . skillsTab . showAltQualityGems or sortCache . considerGemType ~= self .skillsTab .showSupportGemTypes
245+ if not sameSortBy or not sortCache or (sortCache .considerGemType ~= self .skillsTab .showSupportGemTypes
268246 or sortCache .showLegacyGems ~= self .skillsTab .showLegacyGems
269247 or sortCache .defaultQuality ~= self .skillsTab .defaultGemQuality
270248 or sortCache .defaultLevel ~= self .skillsTab .defaultGemLevel
@@ -276,7 +254,6 @@ function GemSelectClass:UpdateSortCache()
276254 -- Initialize a new sort cache
277255 sortCache = {
278256 considerGemType = self .skillsTab .showSupportGemTypes ,
279- considerAlternates = self .skillsTab .showAltQualityGems ,
280257 showLegacyGems = self .skillsTab .showLegacyGems ,
281258 socketGroup = self .skillsTab .displayGroup ,
282259 gemInstance = self .skillsTab .displayGroup .gemList [self .index ],
@@ -346,7 +323,7 @@ function GemSelectClass:UpdateSortCache()
346323 sortCache .dps [gemId ] = baseDPS
347324 -- Ignore gems that don't support the active skill
348325 if sortCache .canSupport [gemId ] or (gemData .grantedEffect .hasGlobalEffect and not gemData .grantedEffect .support ) then
349- local output = self :CalcOutputWithThisGem (calcFunc , gemData , self : GetQualityType ( gemId ), useFullDPS )
326+ local output = self :CalcOutputWithThisGem (calcFunc , gemData , useFullDPS )
350327 -- Check for nil because some fields may not be populated, default to 0
351328 sortCache .dps [gemId ] = (dpsField == " FullDPS" and output [dpsField ] ~= nil and output [dpsField ]) or (output .Minion and output .Minion .CombinedDPS ) or (output [dpsField ] ~= nil and output [dpsField ]) or 0
352329 end
@@ -391,7 +368,7 @@ function GemSelectClass:UpdateGem(setText, addUndo)
391368 if setText then
392369 self :SetText (self .gemName )
393370 end
394- self .gemChangeFunc (self .gemId and self .gemId :gsub (" %w+:" , " " ), self : GetQualityType ( self . gemId ), addUndo and self .gemName ~= self .initialBuf )
371+ self .gemChangeFunc (self .gemId and self .gemId :gsub (" %w+:" , " " ), addUndo and self .gemName ~= self .initialBuf )
395372end
396373
397374function GemSelectClass :ScrollSelIntoView ()
@@ -471,9 +448,6 @@ function GemSelectClass:Draw(viewPort, noTooltip)
471448 end
472449 end
473450 local gemText = gemData and gemData .name or " <No matches>"
474- if gemId and gemId ~= " " then
475- gemText = altQualMap [self :GetQualityType (gemId )] .. gemText
476- end
477451 DrawString (0 , y , " LEFT" , height - 4 , " VAR" , gemText )
478452 if gemData then
479453 if gemData .grantedEffect .support and self .sortCache .canSupport [gemId ] then
@@ -492,11 +466,9 @@ function GemSelectClass:Draw(viewPort, noTooltip)
492466 if calcFunc then
493467 self .tooltip :Clear ()
494468 local gemData = self .gems [self .list [self .hoverSel ]]
495- local qualityType = self :GetQualityType (self .list [self .hoverSel ])
496- local output = self :CalcOutputWithThisGem (calcFunc , gemData , qualityType , self .skillsTab .sortGemsByDPSField == " FullDPS" )
469+ local output = self :CalcOutputWithThisGem (calcFunc , gemData , self .skillsTab .sortGemsByDPSField == " FullDPS" )
497470 local gemInstance = {
498471 level = self .skillsTab :ProcessGemLevel (gemData ),
499- qualityId = qualityType ,
500472 quality = self .skillsTab .defaultGemQuality or 0 ,
501473 count = 1 ,
502474 enabled = true ,
@@ -537,10 +509,6 @@ function GemSelectClass:Draw(viewPort, noTooltip)
537509 local cursorX , cursorY = GetCursorPos ()
538510 self .tooltip :Clear ()
539511 if gemInstance and gemInstance .gemData then
540- -- Check valid qualityId, set to 'Default' if missing
541- if gemInstance .qualityId == nil or gemInstance .qualityId == " " then
542- gemInstance .qualityId = " Default"
543- end
544512 self :AddGemTooltip (gemInstance )
545513 else
546514 self .tooltip :AddLine (16 , toolTipText )
@@ -599,7 +567,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
599567 if secondary and (not secondary .support or gemInstance .gemData .secondaryEffectName ) then
600568 local grantedEffect = gemInstance .gemData .VaalGem and secondary or primary
601569 local grantedEffectSecondary = gemInstance .gemData .VaalGem and primary or secondary
602- self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. altQualMap [ gemInstance . qualityId ] .. grantedEffect .name , " FONTIN SC" )
570+ self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. grantedEffect .name , " FONTIN SC" )
603571 self .tooltip :AddSeparator (10 )
604572 self .tooltip :AddLine (fontSizeBig , " ^x7F7F7F" .. gemInstance .gemData .tagString , " FONTIN SC" )
605573 self :AddCommonGemInfo (gemInstance , grantedEffect , true )
@@ -609,7 +577,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
609577 self :AddCommonGemInfo (gemInstance , grantedEffectSecondary )
610578 else
611579 local grantedEffect = gemInstance .gemData .grantedEffect
612- self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. altQualMap [ gemInstance . qualityId ] .. grantedEffect .name , " FONTIN SC" )
580+ self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. grantedEffect .name , " FONTIN SC" )
613581 self .tooltip :AddSeparator (10 )
614582 if grantedEffect .legacy then
615583 self .tooltip :AddLine (fontSizeTitle , colorCodes .WARNING .. " Legacy Gem" , " FONTIN SC" )
0 commit comments