@@ -623,19 +623,50 @@ function SkillsTabClass:PasteSocketGroup(testInput)
623623 if slot then
624624 newGroup .slot = slot
625625 end
626- for nameSpec , level , quality , state , count , cFlag , cDelta in
627- skillText :gmatch (" ([ %a']+) (%d+)/(%d+) ?(%a*) (%d+) ?(C?)([+-]?%d*)" )
626+ for nameSpec , level , quality , state , count , cFlag , cLevel in
627+ skillText :gmatch (" ([ %a': ]+) (%d+)/(%d+) ?(%a*) (%d+) ?(C?)([+-]?%d*)" )
628628 do
629+ local skillMinion = nil
630+ local skillMinionCalcs = nil
631+ local minionName = nil
632+ local minionList = nil
633+
634+ if nameSpec :find (" Spectre" ) then
635+ minionName = nameSpec :match (" : (.+)" )
636+ nameSpec = " Summon Spectre"
637+ minionList = self .build .spectreList
638+ elseif nameSpec :find (" Companion" ) then
639+ minionName = nameSpec :match (" : (.+)" )
640+ nameSpec = " Tamed Companion"
641+ minionList = self .build .beastList
642+ end
643+
644+ -- Search for the minion if we found a spectre or companion
645+ if minionName then
646+ for id , spectre in pairs (data .spectres ) do
647+ if spectre .name == minionName then
648+ if not isValueInArray (minionList , id ) then
649+ t_insert (minionList , id )
650+ end
651+ skillMinion = id
652+ skillMinionCalcs = id
653+ break
654+ end
655+ end
656+ end
657+
629658 t_insert (newGroup .gemList , {
630659 nameSpec = nameSpec ,
631660 level = tonumber (level ) or 20 ,
632661 quality = tonumber (quality ) or 0 ,
633662 enabled = state ~= " DISABLED" ,
634663 count = tonumber (count ) or 1 ,
635664 corrupted = cFlag == " C" ,
636- corruptLevel = tonumber (cDelta ) or 0 ,
665+ corruptLevel = tonumber (cLevel ) or 0 ,
637666 enableGlobal1 = true ,
638- enableGlobal2 = true
667+ enableGlobal2 = true ,
668+ skillMinion = skillMinion ,
669+ skillMinionCalcs = skillMinionCalcs
639670 })
640671 end
641672 if # newGroup .gemList > 0 then
0 commit comments