@@ -656,7 +656,21 @@ function calcs.initEnv(build, mode, override, specEnv)
656
656
local allocatedMasteryTypeCount = env .spec .allocatedMasteryTypeCount
657
657
local allocatedMasteryTypes = copyTable (env .spec .allocatedMasteryTypes )
658
658
659
+ -- Determine main skill group
660
+ if env .mode == " CALCS" then
661
+ env .calcsInput .skill_number = m_min (m_max (# build .skillsTab .socketGroupList , 1 ), env .calcsInput .skill_number or 1 )
662
+ env .mainSocketGroup = env .calcsInput .skill_number
663
+ else
664
+ build .mainSocketGroup = m_min (m_max (# build .skillsTab .socketGroupList , 1 ), build .mainSocketGroup or 1 )
665
+ env .mainSocketGroup = build .mainSocketGroup
666
+ end
659
667
668
+ -- alway use WeaponSet 1 for condition unless set 1 false and set 2 true
669
+ local mainSkill = build .skillsTab .socketGroupList [env .mainSocketGroup ]
670
+ local usingSkillSet = mainSkill and not mainSkill .set1 and mainSkill .set2 and 2 or 1
671
+
672
+ env .usingSkillSet = usingSkillSet
673
+ modDB :NewMod (" Condition:WeaponSet" .. usingSkillSet , " FLAG" , true , " Weapon Set" )
660
674
661
675
if not accelerate .nodeAlloc then
662
676
-- Build list of passive nodes
@@ -1423,29 +1437,13 @@ function calcs.initEnv(build, mode, override, specEnv)
1423
1437
env .player .weaponData2 = env .player .itemList [" Weapon 2" ].weaponData and env .player .itemList [" Weapon 2" ].weaponData [2 ] or { }
1424
1438
end
1425
1439
1426
- -- Determine main skill group
1427
- if env .mode == " CALCS" then
1428
- env .calcsInput .skill_number = m_min (m_max (# build .skillsTab .socketGroupList , 1 ), env .calcsInput .skill_number or 1 )
1429
- env .mainSocketGroup = env .calcsInput .skill_number
1430
- else
1431
- build .mainSocketGroup = m_min (m_max (# build .skillsTab .socketGroupList , 1 ), build .mainSocketGroup or 1 )
1432
- env .mainSocketGroup = build .mainSocketGroup
1433
- end
1434
-
1435
1440
-- Process supports and put them into the correct buckets
1436
1441
env .crossLinkedSupportGroups = {}
1437
1442
for _ , mod in ipairs (env .modDB :Tabulate (" LIST" , nil , " LinkedSupport" )) do
1438
1443
env .crossLinkedSupportGroups [mod .mod .sourceSlot ] = env .crossLinkedSupportGroups [mod .mod .sourceSlot ] or {}
1439
1444
t_insert (env .crossLinkedSupportGroups [mod .mod .sourceSlot ], mod .value .targetSlotName )
1440
1445
end
1441
1446
1442
- -- alway use WeaponSet 1 for condition unless set 1 false and set 2 true
1443
- local mainSkill = build .skillsTab .socketGroupList [env .mainSocketGroup ]
1444
- local usingSkillSet = mainSkill and not mainSkill .set1 and mainSkill .set2 and 2 or 1
1445
-
1446
- env .usingSkillSet = usingSkillSet
1447
- modDB :NewMod (" Condition:WeaponSet" .. usingSkillSet , " FLAG" , true , " Weapon Set" )
1448
-
1449
1447
local supportLists = { }
1450
1448
local groupCfgList = { }
1451
1449
local processedSockets = {}
0 commit comments