@@ -10,22 +10,6 @@ local t_remove = table.remove
10
10
local m_min = math.min
11
11
local m_max = math.max
12
12
13
- local groupSlotDropList = {
14
- { label = " None" },
15
- { label = " Weapon 1" , slotName = " Weapon 1" },
16
- { label = " Weapon 2" , slotName = " Weapon 2" },
17
- { label = " Weapon 1 (Swap)" , slotName = " Weapon 1 Swap" },
18
- { label = " Weapon 2 (Swap)" , slotName = " Weapon 2 Swap" },
19
- { label = " Helmet" , slotName = " Helmet" },
20
- { label = " Body Armour" , slotName = " Body Armour" },
21
- { label = " Gloves" , slotName = " Gloves" },
22
- { label = " Boots" , slotName = " Boots" },
23
- { label = " Amulet" , slotName = " Amulet" },
24
- { label = " Ring 1" , slotName = " Ring 1" },
25
- { label = " Ring 2" , slotName = " Ring 2" },
26
- { label = " Belt" , slotName = " Belt" },
27
- }
28
-
29
13
local defaultGemLevelList = {
30
14
{
31
15
label = " Normal Maximum" ,
@@ -161,31 +145,20 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
161
145
self :AddUndoState ()
162
146
self .build .buildFlag = true
163
147
end )
164
- self . controls . groupSlotLabel = new ( " LabelControl " , { " TOPLEFT " , self . anchorGroupDetail , " TOPLEFT " }, { 0 , 30 , 0 , 16 }, " ^7Socketed in: " )
165
- self .controls .groupSlot = new (" DropDownControl " , { " TOPLEFT" , self .anchorGroupDetail , " TOPLEFT" }, { 85 , 28 , 130 , 20 }, groupSlotDropList , function (index , value )
166
- self .displayGroup .slot = value . slotName
148
+
149
+ self .controls .set1Enabled = new (" CheckBoxControl " , { " TOPLEFT" , self .anchorGroupDetail , " TOPLEFT" }, { 42 , 30 , 20 }, " Set 1: " , function (state )
150
+ self .displayGroup .set1 = state
167
151
self :AddUndoState ()
168
152
self .build .buildFlag = true
169
153
end )
170
- self .controls .groupSlot .tooltipFunc = function (tooltip , mode , index , value )
171
- tooltip :Clear ()
172
- if mode == " OUT" or index == 1 then
173
- tooltip :AddLine (16 , " Select the item in which this skill is socketed." )
174
- tooltip :AddLine (16 , " This will allow the skill to benefit from modifiers on the item that affect socketed gems." )
175
- else
176
- local slot = self .build .itemsTab .slots [value .slotName ]
177
- local ttItem = self .build .itemsTab .items [slot .selItemId ]
178
- if ttItem then
179
- self .build .itemsTab :AddItemTooltip (tooltip , ttItem , slot )
180
- else
181
- tooltip :AddLine (16 , " No item is equipped in this slot." )
182
- end
183
- end
184
- end
185
- self .controls .groupSlot .enabled = function ()
186
- return self .displayGroup .source == nil
187
- end
188
- self .controls .groupEnabled = new (" CheckBoxControl" , { " LEFT" , self .controls .groupSlot , " RIGHT" }, { 70 , 0 , 20 }, " Enabled:" , function (state )
154
+
155
+ self .controls .set2Enabled = new (" CheckBoxControl" , { " LEFT" , self .controls .set1Enabled , " RIGHT" }, { 50 , 0 , 20 }, " Set 2:" , function (state )
156
+ self .displayGroup .set2 = state
157
+ self :AddUndoState ()
158
+ self .build .buildFlag = true
159
+ end )
160
+
161
+ self .controls .groupEnabled = new (" CheckBoxControl" , { " LEFT" , self .controls .set2Enabled , " RIGHT" }, { 70 , 0 , 20 }, " Enabled:" , function (state )
189
162
self .displayGroup .enabled = state
190
163
self :AddUndoState ()
191
164
self .build .buildFlag = true
@@ -207,7 +180,7 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
207
180
self .controls .groupCount .shown = function ()
208
181
return self .displayGroup .source ~= nil
209
182
end
210
- self .controls .sourceNote = new (" LabelControl" , { " TOPLEFT" , self .controls .groupSlotLabel , " TOPLEFT" }, { 0 , 30 , 0 , 16 })
183
+ self .controls .sourceNote = new (" LabelControl" , { " TOPLEFT" , self .controls .set1Enabled , " TOPLEFT" }, { - 42 , 30 , 0 , 16 })
211
184
self .controls .sourceNote .shown = function ()
212
185
return self .displayGroup .source ~= nil
213
186
end
@@ -273,8 +246,9 @@ function SkillsTabClass:LoadSkill(node, skillSetId)
273
246
socketGroup .includeInFullDPS = node .attrib .includeInFullDPS and node .attrib .includeInFullDPS == " true"
274
247
socketGroup .groupCount = tonumber (node .attrib .groupCount )
275
248
socketGroup .label = node .attrib .label
276
- socketGroup .slot = node .attrib .slot
277
249
socketGroup .source = node .attrib .source
250
+ socketGroup .set1 = node .attrib .set1 and node .attrib .set1 == " true"
251
+ socketGroup .set2 = node .attrib .set2 and node .attrib .set2 == " true"
278
252
socketGroup .mainActiveSkill = tonumber (node .attrib .mainActiveSkill ) or 1
279
253
socketGroup .mainActiveSkillCalcs = tonumber (node .attrib .mainActiveSkillCalcs ) or 1
280
254
socketGroup .gemList = { }
@@ -429,8 +403,9 @@ function SkillsTabClass:Save(xml)
429
403
includeInFullDPS = tostring (socketGroup .includeInFullDPS ),
430
404
groupCount = socketGroup .groupCount ~= nil and tostring (socketGroup .groupCount ),
431
405
label = socketGroup .label ,
432
- slot = socketGroup .slot ,
433
406
source = socketGroup .source ,
407
+ set1 = tostring (socketGroup .set1 or true ),
408
+ set2 = tostring (socketGroup .set2 or true ),
434
409
mainActiveSkill = tostring (socketGroup .mainActiveSkill ),
435
410
mainActiveSkillCalcs = tostring (socketGroup .mainActiveSkillCalcs ),
436
411
} }
@@ -570,9 +545,6 @@ function SkillsTabClass:CopySocketGroup(socketGroup)
570
545
if socketGroup .label and socketGroup .label :match (" %S" ) then
571
546
skillText = skillText .. " Label: " .. socketGroup .label .. " \r\n "
572
547
end
573
- if socketGroup .slot then
574
- skillText = skillText .. " Slot: " .. socketGroup .slot .. " \r\n "
575
- end
576
548
for _ , gemInstance in ipairs (socketGroup .gemList ) do
577
549
skillText = skillText .. string.format (" %s %d/%d %s %d\r\n " , gemInstance .nameSpec , gemInstance .level , gemInstance .quality , gemInstance .enabled and " " or " DISABLED" , gemInstance .count or 1 )
578
550
end
@@ -587,10 +559,6 @@ function SkillsTabClass:PasteSocketGroup(testInput)
587
559
if label then
588
560
newGroup .label = label
589
561
end
590
- local slot = skillText :match (" Slot: (%C+)" )
591
- if slot then
592
- newGroup .slot = slot
593
- end
594
562
for nameSpec , level , quality , state , count in skillText :gmatch (" ([ %a']+) (%d+)/(%d+) ?(%a*) (%d+)" ) do
595
563
t_insert (newGroup .gemList , {
596
564
nameSpec = nameSpec ,
@@ -1096,9 +1064,10 @@ function SkillsTabClass:SetDisplayGroup(socketGroup)
1096
1064
1097
1065
-- Update the main controls
1098
1066
self .controls .groupLabel :SetText (socketGroup .label )
1099
- self .controls .groupSlot :SelByValue (socketGroup .slot , " slotName" )
1100
1067
self .controls .groupEnabled .state = socketGroup .enabled
1101
1068
self .controls .includeInFullDPS .state = socketGroup .includeInFullDPS and socketGroup .enabled
1069
+ self .controls .set1Enabled .state = socketGroup .set1 == nil and true or socketGroup .set1
1070
+ self .controls .set2Enabled .state = socketGroup .set2 == nil and true or socketGroup .set2
1102
1071
self .controls .groupCount :SetText (socketGroup .groupCount or 1 )
1103
1072
1104
1073
-- Update the gem slot controls
@@ -1122,9 +1091,6 @@ function SkillsTabClass:AddSocketGroupTooltip(tooltip, socketGroup)
1122
1091
end
1123
1092
return
1124
1093
end
1125
- if socketGroup .enabled and not socketGroup .slotEnabled then
1126
- tooltip :AddLine (16 , " ^7Note: this group is disabled because it is socketed in the inactive weapon set." )
1127
- end
1128
1094
local sourceSingle = socketGroup .sourceItem or socketGroup .sourceNode
1129
1095
if sourceSingle then
1130
1096
tooltip :AddLine (18 , " ^7Source: " .. colorCodes [sourceSingle .rarity or " NORMAL" ] .. sourceSingle .name )
@@ -1179,7 +1145,7 @@ function SkillsTabClass:AddSocketGroupTooltip(tooltip, socketGroup)
1179
1145
reason = " (Unsupported)"
1180
1146
elseif not gemInstance .enabled then
1181
1147
reason = " (Disabled)"
1182
- elseif not socketGroup .enabled or not socketGroup . slotEnabled then
1148
+ elseif not socketGroup .enabled then
1183
1149
elseif grantedEffect .support then
1184
1150
if displayEffect .superseded then
1185
1151
reason = " (Superseded)"
0 commit comments