@@ -888,10 +888,8 @@ function TradeQueryClass:findValidSlotForWatchersEye()
888888 end
889889 end
890890 for _ ,v in pairs (self .itemsTab .sockets ) do
891- if not v .inactive then
892- if self .itemsTab :IsItemValidForSlot (tmpWE ,v .slotName ,self .itemsTab .activeItemSet ) then
893- return self .itemsTab .sockets [v .nodeId ]
894- end
891+ if not v .inactive and self .itemsTab :IsItemValidForSlot (tmpWE ,v .slotName ,self .itemsTab .activeItemSet ) then
892+ return self .itemsTab .sockets [v .nodeId ]
895893 end
896894 end
897895end
@@ -1042,7 +1040,16 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
10421040 local result = self .resultTbl [row_idx ][pb_index ]
10431041 local item = new (" Item" , result .item_string )
10441042 tooltip :Clear ()
1045- self .itemsTab :AddItemTooltip (tooltip , item , slotTbl )
1043+ if slotTbl .slotName == " Watcher's Eye" then
1044+ local firstValidSlot = self :findValidSlotForWatchersEye ()
1045+ local currentItem = firstValidSlot .selItemId ~= 0 and self .itemsTab .items [firstValidSlot .selItemId ]
1046+ local eyeEquipped = currentItem and currentItem .name :find (" Watcher's Eye" )
1047+ -- for watcher's eye we can compare to an already existing one, or
1048+ -- default to comparing with all active sockets
1049+ self .itemsTab :AddItemTooltip (tooltip , item , eyeEquipped and firstValidSlot or nil )
1050+ else
1051+ self .itemsTab :AddItemTooltip (tooltip , item , slotTbl )
1052+ end
10461053 addMegalomaniacCompareToTooltipIfApplicable (tooltip , pb_index )
10471054 tooltip :AddSeparator (10 )
10481055 tooltip :AddLine (16 , string.format (" ^7Price: %s %s" , result .amount , result .currency ))
@@ -1070,7 +1077,18 @@ function TradeQueryClass:PriceItemRowDisplay(row_idx, top_pane_alignment_ref, ro
10701077 -- item.baseName is nil and throws error in the following AddItemTooltip func
10711078 -- if the item is unidentified
10721079 local item = new (" Item" , item_string )
1073- self .itemsTab :AddItemTooltip (tooltip , item , slotTbl , true )
1080+ -- for watcher's eye we can compare to an already existing one, or
1081+ -- default to comparing with all active sockets
1082+ if slotTbl .slotName == " Watcher's Eye" then
1083+ local firstValidSlot = self :findValidSlotForWatchersEye ()
1084+ local currentItem = firstValidSlot .selItemId ~= 0 and self .itemsTab .items [firstValidSlot .selItemId ]
1085+ local eyeEquipped = currentItem and currentItem .name :find (" Watcher's Eye" )
1086+ -- for watcher's eye we can compare to an already existing one, or
1087+ -- default to comparing with all active sockets
1088+ self .itemsTab :AddItemTooltip (tooltip , item , eyeEquipped and firstValidSlot or nil , true )
1089+ else
1090+ self .itemsTab :AddItemTooltip (tooltip , item , slotTbl , true )
1091+ end
10741092 addMegalomaniacCompareToTooltipIfApplicable (tooltip , selected_result_index )
10751093 end
10761094 end
0 commit comments