@@ -2477,6 +2477,28 @@ function CompareTabClass:ComparePowerBuilder(compareEntry, powerStat, categories
24772477 if self :ShouldShowRing3 (compareEntry ) then
24782478 t_insert (baseSlots , 10 , " Ring 3" )
24792479 end
2480+
2481+ -- abyssal sockets
2482+ local socketSet = {}
2483+ local function saveActiveAbyssSocket (k , v )
2484+ if type (k ) == " string" and k :match (" Abyssal Socket" )
2485+ and v .shown () then
2486+ socketSet [k ] = (socketSet [k ] or 0 ) + 1
2487+ end
2488+ end
2489+ for k , v in pairs (compareEntry .itemsTab .slots ) do
2490+ saveActiveAbyssSocket (k , v )
2491+ end
2492+ for k , v in pairs (self .primaryBuild .itemsTab .slots ) do
2493+ saveActiveAbyssSocket (k , v )
2494+ end
2495+ -- consider only if both have the socket allocated
2496+ for k , count in pairs (socketSet ) do
2497+ if count == 2 then
2498+ t_insert (baseSlots , k )
2499+ end
2500+ end
2501+
24802502 for _ , slotName in ipairs (baseSlots ) do
24812503 local cSlot = compareEntry .itemsTab and compareEntry .itemsTab .slots [slotName ]
24822504 local cItem = cSlot and compareEntry .itemsTab .items [cSlot .selItemId ]
@@ -2641,6 +2663,28 @@ function CompareTabClass:ComparePowerBuilder(compareEntry, powerStat, categories
26412663 if self :ShouldShowRing3 (compareEntry ) then
26422664 t_insert (baseSlots , 10 , " Ring 3" )
26432665 end
2666+
2667+ -- abyssal sockets
2668+ local socketSet = {}
2669+ local function saveActiveAbyssSocket (k , v )
2670+ if type (k ) == " string" and k :match (" Abyssal Socket" )
2671+ and v .shown () then
2672+ socketSet [k ] = (socketSet [k ] or 0 ) + 1
2673+ end
2674+ end
2675+ for k , v in pairs (compareEntry .itemsTab .slots ) do
2676+ saveActiveAbyssSocket (k , v )
2677+ end
2678+ for k , v in pairs (self .primaryBuild .itemsTab .slots ) do
2679+ saveActiveAbyssSocket (k , v )
2680+ end
2681+ -- consider only if both have the socket allocated
2682+ for k , count in pairs (socketSet ) do
2683+ if count == 2 then
2684+ t_insert (baseSlots , k )
2685+ end
2686+ end
2687+
26442688 for _ , slotName in ipairs (baseSlots ) do
26452689 local cSlot = compareEntry .itemsTab and compareEntry .itemsTab .slots [slotName ]
26462690 local cItem = cSlot and compareEntry .itemsTab .items [cSlot .selItemId ]
@@ -3555,16 +3599,17 @@ function CompareTabClass:DrawItems(vp, compareEntry, inputEvents)
35553599 local socketSet = {}
35563600 local function saveActiveAbyssSocket (k , v )
35573601 if type (k ) == " string" and k :match (" Abyssal Socket" )
3558- and v .selItemId and v . selItemId ~= 0 then
3602+ and v .shown () then
35593603 socketSet [k ] = true
35603604 end
35613605 end
3562- for k , v in pairs (compareEntry .itemsTab .activeItemSet ) do
3606+ for k , v in pairs (compareEntry .itemsTab .slots ) do
35633607 saveActiveAbyssSocket (k , v )
35643608 end
3565- for k , v in pairs (self .primaryBuild .itemsTab .activeItemSet ) do
3609+ for k , v in pairs (self .primaryBuild .itemsTab .slots ) do
35663610 saveActiveAbyssSocket (k , v )
35673611 end
3612+ -- show if either has a socket allocated
35683613 for k , _ in pairs (socketSet ) do
35693614 t_insert (baseSlots , k )
35703615 end
0 commit comments