@@ -2479,15 +2479,18 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
24792479
24802480 if self .displayItem .base .type == " Helmet" then
24812481 t_insert (sourceList , " Glimpse of Chaos" )
2482- enchantNum = 8
2482+ if self .displayItem .title == " Glimpse of Chaos" then
2483+ currentModType = " SpecialCorrupted"
2484+ enchantNum = 8
2485+ end
24832486 end
24842487 local function buildEnchantList (modType )
24852488 if enchantList [modType ] then
24862489 return
24872490 end
24882491 enchantList [modType ] = {}
24892492 for modId , mod in pairs (data .itemMods .Corruption ) do
2490- if mod .type == modType and self .displayItem :GetModSpawnWeight (mod ) > 0 then
2493+ if mod .type == modType and ( modType == " SpecialCorrupted " or self .displayItem :GetModSpawnWeight (mod ) > 0 ) then
24912494 t_insert (enchantList [modType ], { mod = mod })
24922495 end
24932496 end
@@ -2570,7 +2573,7 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
25702573 end
25712574 end
25722575 local function rebuildEnchantControls (resetSelection )
2573- for i = 1 , enchantNum do
2576+ for i = 1 , 8 do
25742577 local shown = i <= enchantNum
25752578 controls [" enchant" .. i ].shown = shown
25762579 controls [" enchant" .. i .. " Label" ].shown = shown
@@ -2686,7 +2689,7 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
26862689 return self .displayItem .rarity == " UNIQUE" or self .displayItem .rarity == " RELIC"
26872690 end
26882691 controls .rolls = new (" ButtonControl" , {" LEFT" , controls .enchants , " RIGHT" }, {5 , 0 , 80 , 20 }, " Roll Ranges" , function ()
2689- for i = 1 , enchantNum do
2692+ for i = 1 , 8 do
26902693 controls [" enchant" .. i ].shown = false
26912694 controls [" enchant" .. i .. " Label" ].shown = false
26922695 end
@@ -2710,7 +2713,7 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
27102713 controls .source = new (" DropDownControl" , {" TOPLEFT" ,nil ," TOPLEFT" }, {100 , 30 , 150 , 18 }, sourceList , function (index , value )
27112714 if value == " Corrupted" then
27122715 currentModType = " Corrupted"
2713- enchantNum = 1
2716+ enchantNum = 2
27142717 elseif value == " Glimpse of Chaos" and self .displayItem .base .type == " Helmet" then -- special corruption enchants
27152718 currentModType = " SpecialCorrupted"
27162719 if self .displayItem .title == " Glimpse of Chaos" then -- glimpse of chaos can have all 8 special enchants
@@ -2727,12 +2730,13 @@ function ItemsTabClass:CorruptDisplayItem() -- todo implement vaal orb new outco
27272730 controls .close .y = 73 + 20 * enchantNum
27282731 controls .save .y = 73 + 20 * enchantNum
27292732 end )
2733+ controls .source :SelByValue (currentModType == " SpecialCorrupted" and " Glimpse of Chaos" or " Corrupted" )
27302734 controls .sortLabel = new (" LabelControl" , {" TOPRIGHT" ,nil ," TOPLEFT" }, {350 , 30 , 0 , 16 }, " ^7Sort by:" )
27312735 controls .sort = new (" DropDownControl" , {" TOPLEFT" ,nil ," TOPLEFT" }, {355 , 30 , 240 , 18 }, sortList , function (index , value )
27322736 sortEnchantList (value .stat )
27332737 rebuildEnchantControls ()
27342738 end )
2735- for i = 1 , enchantNum do
2739+ for i = 1 , 8 do
27362740 if i == 1 then
27372741 controls .enchant1Label = new (" LabelControl" , {" TOPRIGHT" ,nil ," TOPLEFT" }, {95 , 55 , 0 , 16 }, function ()
27382742 if enchantNum == 1 then -- update label so 1 doesn't appear in case of 1 enchant.
0 commit comments