@@ -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,7 @@ function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, qualityId, useF
6761 else
6862 gemList [self .index ] = {
6963 level = gemData .naturalMaxLevel ,
70- qualityId = qualityId ,
64+ qualityId = " Default " ,
7165 quality = self .skillsTab .defaultGemQuality or 0 ,
7266 count = 1 ,
7367 enabled = true ,
@@ -84,9 +78,7 @@ function GemSelectClass:CalcOutputWithThisGem(calcFunc, gemData, qualityId, useF
8478 gemInstance .level = self .skillsTab :ProcessGemLevel (gemData )
8579 gemInstance .gemData = gemData
8680 gemInstance .displayEffect = nil
87- if gemInstance .qualityId == nil or gemInstance .qualityId == " " then
88- gemInstance .qualityId = " Default"
89- end
81+ gemInstance .qualityId = " Default"
9082 -- Calculate the impact of using this gem
9183 local output = calcFunc (nil , useFullDPS )
9284 -- Put the original gem back into the list
@@ -120,23 +112,13 @@ function GemSelectClass:PopulateGemList()
120112 self .gems [" Default:" .. gemId ] = gemData
121113 end
122114 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
115+ self .gems [" Default:" .. gemId ] = gemData
130116 end
131117 end
132118 end
133119 end
134120end
135121
136- function GemSelectClass :GetQualityType (gemId )
137- return gemId and gemId :gsub (" :.+" ," " ) or " Default"
138- end
139-
140122function GemSelectClass :FilterSupport (gemId , gemData )
141123 local showSupportTypes = self .skillsTab .showSupportGemTypes
142124 local isLegacyAwakened = (gemData .grantedEffect .legacy and gemData .grantedEffect .plusVersionOf )
@@ -147,7 +129,6 @@ function GemSelectClass:FilterSupport(gemId, gemData)
147129 or showSupportTypes == " ALL"
148130 or (showSupportTypes == " NORMAL" and not (isLegacyAwakened or gemData .tagString :match (" Exceptional" )))
149131 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" ))
151132end
152133
153134function GemSelectClass :BuildList (buf )
@@ -177,7 +158,7 @@ function GemSelectClass:BuildList(buf)
177158 for i , pattern in ipairs (patternList ) do
178159 local matchList = { }
179160 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
161+ if self :FilterSupport (gemId , gemData ) and not added [gemId ] and ((" " .. gemData .name :lower ()):match (pattern )) then
181162 addThisGem = true
182163 if # tagsList > 0 then
183164 for _ , tag in ipairs (tagsList ) do
@@ -259,12 +240,11 @@ function GemSelectClass:UpdateSortCache()
259240 and sortCache .outputRevision == self .skillsTab .build .outputRevision and sortCache .defaultLevel == self .skillsTab .defaultGemLevel
260241 and (sortCache .characterLevel == self .skillsTab .build .characterLevel or self .skillsTab .defaultGemLevel ~= " characterLevel" )
261242 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
243+ and sortCache .considerGemType == self .skillsTab .showSupportGemTypes and sortCache .showLegacyGems == self .skillsTab .showLegacyGems then
264244 return
265245 end
266246
267- if not sameSortBy or not sortCache or (sortCache .considerAlternates ~= self . skillsTab . showAltQualityGems or sortCache . considerGemType ~= self .skillsTab .showSupportGemTypes
247+ if not sameSortBy or not sortCache or (sortCache .considerGemType ~= self .skillsTab .showSupportGemTypes
268248 or sortCache .showLegacyGems ~= self .skillsTab .showLegacyGems
269249 or sortCache .defaultQuality ~= self .skillsTab .defaultGemQuality
270250 or sortCache .defaultLevel ~= self .skillsTab .defaultGemLevel
@@ -276,7 +256,6 @@ function GemSelectClass:UpdateSortCache()
276256 -- Initialize a new sort cache
277257 sortCache = {
278258 considerGemType = self .skillsTab .showSupportGemTypes ,
279- considerAlternates = self .skillsTab .showAltQualityGems ,
280259 showLegacyGems = self .skillsTab .showLegacyGems ,
281260 socketGroup = self .skillsTab .displayGroup ,
282261 gemInstance = self .skillsTab .displayGroup .gemList [self .index ],
@@ -346,7 +325,7 @@ function GemSelectClass:UpdateSortCache()
346325 sortCache .dps [gemId ] = baseDPS
347326 -- Ignore gems that don't support the active skill
348327 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 )
328+ local output = self :CalcOutputWithThisGem (calcFunc , gemData , useFullDPS )
350329 -- Check for nil because some fields may not be populated, default to 0
351330 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
352331 end
@@ -391,7 +370,7 @@ function GemSelectClass:UpdateGem(setText, addUndo)
391370 if setText then
392371 self :SetText (self .gemName )
393372 end
394- self .gemChangeFunc (self .gemId and self .gemId :gsub (" %w+:" , " " ), self : GetQualityType ( self . gemId ) , addUndo and self .gemName ~= self .initialBuf )
373+ self .gemChangeFunc (self .gemId and self .gemId :gsub (" %w+:" , " " ), " Default " , addUndo and self .gemName ~= self .initialBuf )
395374end
396375
397376function GemSelectClass :ScrollSelIntoView ()
@@ -471,9 +450,6 @@ function GemSelectClass:Draw(viewPort, noTooltip)
471450 end
472451 end
473452 local gemText = gemData and gemData .name or " <No matches>"
474- if gemId and gemId ~= " " then
475- gemText = altQualMap [self :GetQualityType (gemId )] .. gemText
476- end
477453 DrawString (0 , y , " LEFT" , height - 4 , " VAR" , gemText )
478454 if gemData then
479455 if gemData .grantedEffect .support and self .sortCache .canSupport [gemId ] then
@@ -492,11 +468,10 @@ function GemSelectClass:Draw(viewPort, noTooltip)
492468 if calcFunc then
493469 self .tooltip :Clear ()
494470 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" )
471+ local output = self :CalcOutputWithThisGem (calcFunc , gemData , self .skillsTab .sortGemsByDPSField == " FullDPS" )
497472 local gemInstance = {
498473 level = self .skillsTab :ProcessGemLevel (gemData ),
499- qualityId = qualityType ,
474+ qualityId = " Default " ,
500475 quality = self .skillsTab .defaultGemQuality or 0 ,
501476 count = 1 ,
502477 enabled = true ,
@@ -537,10 +512,7 @@ function GemSelectClass:Draw(viewPort, noTooltip)
537512 local cursorX , cursorY = GetCursorPos ()
538513 self .tooltip :Clear ()
539514 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
515+ gemInstance .qualityId = " Default"
544516 self :AddGemTooltip (gemInstance )
545517 else
546518 self .tooltip :AddLine (16 , toolTipText )
@@ -599,7 +571,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
599571 if secondary and (not secondary .support or gemInstance .gemData .secondaryEffectName ) then
600572 local grantedEffect = gemInstance .gemData .VaalGem and secondary or primary
601573 local grantedEffectSecondary = gemInstance .gemData .VaalGem and primary or secondary
602- self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. altQualMap [ gemInstance . qualityId ] .. grantedEffect .name , " FONTIN SC" )
574+ self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. grantedEffect .name , " FONTIN SC" )
603575 self .tooltip :AddSeparator (10 )
604576 self .tooltip :AddLine (fontSizeBig , " ^x7F7F7F" .. gemInstance .gemData .tagString , " FONTIN SC" )
605577 self :AddCommonGemInfo (gemInstance , grantedEffect , true )
@@ -609,7 +581,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
609581 self :AddCommonGemInfo (gemInstance , grantedEffectSecondary )
610582 else
611583 local grantedEffect = gemInstance .gemData .grantedEffect
612- self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. altQualMap [ gemInstance . qualityId ] .. grantedEffect .name , " FONTIN SC" )
584+ self .tooltip :AddLine (fontSizeTitle , colorCodes .GEM .. grantedEffect .name , " FONTIN SC" )
613585 self .tooltip :AddSeparator (10 )
614586 if grantedEffect .legacy then
615587 self .tooltip :AddLine (fontSizeTitle , colorCodes .WARNING .. " Legacy Gem" , " FONTIN SC" )
0 commit comments