@@ -201,7 +201,7 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
201
201
-- Unique database
202
202
self .controls .uniqueDB = new (" ItemDBControl" , {" TOPLEFT" ,self .controls .itemList ," BOTTOMLEFT" }, 0 , 76 , 360 , function (c ) return m_min (244 , self .maxY - select (2 , c :GetPos ())) end , self , main .uniqueDB [build .targetVersion ], " UNIQUE" )
203
203
self .controls .uniqueDB .y = function ()
204
- return self .controls .selectDBLabel :IsShown () and 98 or 76
204
+ return self .controls .selectDBLabel :IsShown () and 118 or 96
205
205
end
206
206
self .controls .uniqueDB .shown = function ()
207
207
return not self .controls .selectDBLabel :IsShown () or self .controls .selectDB .selIndex == 1
@@ -210,7 +210,7 @@ local ItemsTabClass = newClass("ItemsTab", "UndoHandler", "ControlHost", "Contro
210
210
-- Rare template database
211
211
self .controls .rareDB = new (" ItemDBControl" , {" TOPLEFT" ,self .controls .itemList ," BOTTOMLEFT" }, 0 , 76 , 360 , function (c ) return m_min (260 , self .maxY - select (2 , c :GetPos ())) end , self , main .rareDB [build .targetVersion ], " RARE" )
212
212
self .controls .rareDB .y = function ()
213
- return self .controls .selectDBLabel :IsShown () and 78 or 376
213
+ return self .controls .selectDBLabel :IsShown () and 78 or 396
214
214
end
215
215
self .controls .rareDB .shown = function ()
216
216
return not self .controls .selectDBLabel :IsShown () or self .controls .selectDB .selIndex == 2
@@ -343,7 +343,7 @@ If there's 2 slots an item can go in, holding Shift will put it in the second.]]
343
343
end
344
344
345
345
-- Section: Enchant / Anoint / Corrupt
346
- self .controls .displayItemSectionEnchant = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionSockets ," BOTTOMLEFT" , true }, 0 , 0 , 0 , function ()
346
+ self .controls .displayItemSectionEnchant = new (" Control" , {" TOPLEFT" ,self .controls .displayItemSectionSockets ," BOTTOMLEFT" }, 0 , 0 , 0 , function ()
347
347
return (self .controls .displayItemEnchant :IsShown () or self .controls .displayItemEnchant2 :IsShown () or self .controls .displayItemAnoint :IsShown () or self .controls .displayItemAnoint2 :IsShown () or self .controls .displayItemCorrupt :IsShown () ) and 28 or 0
348
348
end )
349
349
self .controls .displayItemEnchant = new (" ButtonControl" , {" TOPLEFT" ,self .controls .displayItemSectionEnchant ," TOPLEFT" }, 0 , 0 , 160 , 20 , " Apply Enchantment..." , function ()
@@ -541,6 +541,56 @@ If there's 2 slots an item can go in, holding Shift will put it in the second.]]
541
541
if mod .modTags and # mod .modTags > 0 then
542
542
tooltip :AddLine (16 , " Tags: " .. table.concat (mod .modTags , ' , ' ))
543
543
end
544
+
545
+ local notableName = mod [1 ] and mod [1 ]:match (" 1 Added Passive Skill is (.*)" )
546
+ local node = notableName and self .build .spec .tree .clusterNodeMap [notableName ]
547
+ if node then
548
+ tooltip :AddSeparator (14 )
549
+
550
+ -- Node name
551
+ self .socketViewer :AddNodeName (tooltip , node , self .build )
552
+
553
+ -- Node description
554
+ if node .sd [1 ] then
555
+ tooltip :AddLine (16 , " " )
556
+ for i , line in ipairs (node .sd ) do
557
+ tooltip :AddLine (16 , ((node .mods [i ].extra or not node .mods [i ].list ) and colorCodes .UNSUPPORTED or colorCodes .MAGIC ).. line )
558
+ end
559
+ end
560
+
561
+ -- Reminder text
562
+ if node .reminderText then
563
+ tooltip :AddSeparator (14 )
564
+ for _ , line in ipairs (node .reminderText ) do
565
+ tooltip :AddLine (14 , " ^xA0A080" .. line )
566
+ end
567
+ end
568
+
569
+ -- Comparison
570
+ tooltip :AddSeparator (14 )
571
+ self :AppendAnointTooltip (tooltip , node , " Allocating" )
572
+
573
+ -- Information of for this notable appears
574
+ local clusterInfo = self .build .data .clusterJewelInfoForNotable [notableName ]
575
+ if clusterInfo then
576
+ tooltip :AddSeparator (14 )
577
+ tooltip :AddLine (20 , " ^7" .. notableName .. " can appear on:" )
578
+ local isFirstSize = true
579
+ for size , v in pairs (clusterInfo .size ) do
580
+ tooltip :AddLine (18 , colorCodes .MAGIC .. size .. " :" )
581
+ local sizeSkills = self .build .data .clusterJewels .jewels [size ].skills
582
+ for i , type in ipairs (clusterInfo .jewelTypes ) do
583
+ if sizeSkills [type ] then
584
+ tooltip :AddLine (14 , " ^7 " .. sizeSkills [type ].name )
585
+ end
586
+ end
587
+ if not isFirstSize then
588
+ tooltip :AddLine (10 , " " )
589
+ end
590
+ isFirstSize = false
591
+ end
592
+ end
593
+ end
544
594
else
545
595
tooltip :AddLine (16 , " ^7" ..# modList .. " Tiers" )
546
596
local minMod = self .displayItem .affixes [modList [1 ]]
@@ -825,13 +875,15 @@ function ItemsTabClass:Draw(viewPort, inputEvents)
825
875
self .controls .scrollBarV .y = viewPort .y
826
876
do
827
877
local maxY = select (2 , self .lastSlot :GetPos ()) + 24
878
+ local maxX = self .anchorDisplayItem :GetPos () + 462
828
879
if self .displayItem then
829
880
local x , y = self .controls .displayItemTooltipAnchor :GetPos ()
830
- local ttW , ttH = self .displayItemTooltip :GetSize ( )
881
+ local ttW , ttH = self .displayItemTooltip :GetDynamicSize ( viewPort )
831
882
maxY = m_max (maxY , y + ttH + 4 )
883
+ maxX = m_max (maxX , x + ttW + 80 )
832
884
end
833
885
local contentHeight = maxY - self .y
834
- local contentWidth = self . anchorDisplayItem : GetPos () + 462 - self .x
886
+ local contentWidth = maxX - self .x
835
887
local v = contentHeight > viewPort .height
836
888
local h = contentWidth > viewPort .width - (v and 20 or 0 )
837
889
if h then
@@ -1270,6 +1322,11 @@ function ItemsTabClass:CraftClusterJewel()
1270
1322
local item = self .displayItem
1271
1323
wipeTable (item .enchantModLines )
1272
1324
t_insert (item .enchantModLines , { line = " Adds " .. (item .clusterJewelNodeCount or item .clusterJewel .maxNodes ).. " Passive Skills" , crafted = true })
1325
+ if item .clusterJewel .size == " Large" then
1326
+ t_insert (item .enchantModLines , { line = " 2 Added Passive Skills are Jewel Sockets" , crafted = true })
1327
+ elseif item .clusterJewel .size == " Medium" then
1328
+ t_insert (item .enchantModLines , { line = " 1 Added Passive Skill is a Jewel Socket" , crafted = true })
1329
+ end
1273
1330
local skill = item .clusterJewel .skills [item .clusterJewelSkill ]
1274
1331
t_insert (item .enchantModLines , { line = table.concat (skill .enchant , " \n " ), crafted = true })
1275
1332
item :BuildAndParseRaw ()
@@ -1798,38 +1855,42 @@ end
1798
1855
--- Appends tooltip information for anointing a new passive tree node onto the currently editing amulet
1799
1856
--- @param tooltip table @The tooltip to append into
1800
1857
--- @param node table @The passive tree node that will be anointed , or nil to remove the current anoint.
1801
- function ItemsTabClass :AppendAnointTooltip (tooltip , node )
1858
+ function ItemsTabClass :AppendAnointTooltip (tooltip , node , actionText )
1802
1859
if not self .displayItem then
1803
1860
return
1804
1861
end
1805
1862
1863
+ if not actionText then
1864
+ actionText = " Anointing"
1865
+ end
1866
+
1806
1867
local header
1807
1868
if node then
1808
1869
if self .build .spec .allocNodes [node .id ] then
1809
- tooltip :AddLine (14 , " ^7Anointing " .. node .dn .. " changes nothing because this node is already allocated on the tree." )
1870
+ tooltip :AddLine (14 , " ^7 " .. actionText .. " " .. node .dn .. " changes nothing because this node is already allocated on the tree." )
1810
1871
return
1811
1872
end
1812
1873
1813
1874
local curAnoints = self :getAnoint (self .displayItem )
1814
1875
if curAnoints and # curAnoints > 0 then
1815
1876
for _ , curAnoint in ipairs (curAnoints ) do
1816
1877
if curAnoint == node .dn then
1817
- tooltip :AddLine (14 , " ^7Anointing " .. node .dn .. " changes nothing because this node is already anointed." )
1878
+ tooltip :AddLine (14 , " ^7 " .. actionText .. " " .. node .dn .. " changes nothing because this node is already anointed." )
1818
1879
return
1819
1880
end
1820
1881
end
1821
1882
end
1822
1883
1823
- header = " ^7Anointing " .. node .dn .. " will give you: "
1884
+ header = " ^7 " .. actionText .. " " .. node .dn .. " will give you: "
1824
1885
else
1825
- header = " ^7Anointing nothing will give you: "
1886
+ header = " ^7 " .. actionText .. " nothing will give you: "
1826
1887
end
1827
1888
local calcFunc = self .build .calcsTab :GetMiscCalculator ()
1828
1889
local outputBase = calcFunc ({ repSlotName = " Amulet" , repItem = self .displayItem })
1829
1890
local outputNew = calcFunc ({ repSlotName = " Amulet" , repItem = self :anointItem (node ) })
1830
1891
local numChanges = self .build :AddStatComparesToTooltip (tooltip , outputBase , outputNew , header )
1831
1892
if node and numChanges == 0 then
1832
- tooltip :AddLine (14 , " ^7Anointing " .. node .dn .. " changes nothing." )
1893
+ tooltip :AddLine (14 , " ^7 " .. actionText .. " " .. node .dn .. " changes nothing." )
1833
1894
end
1834
1895
end
1835
1896
0 commit comments