Skip to content

Commit 3d1452c

Browse files
committed
Fix cases where an empty loadout of a different spec gets created
1 parent 19198bf commit 3d1452c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ImprovedTalentLoadouts.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ function TalentLoadouts:UpdateTempLoadout()
379379
self.charDB.tempLoadout = configID
380380
end
381381
end
382+
383+
self.charDB.activeConfigIDs = self.charDB.activeConfigIDs or {}
384+
self.charDB.activeConfigIDs[C_ClassTalents.GetActiveConfigID()] = true
382385
end
383386

384387
function TalentLoadouts:UpdateActionBar()
@@ -526,7 +529,7 @@ end
526529
function TalentLoadouts:SaveLoadout(configID, currentSpecID)
527530
local specLoadouts = self.globalDB.configIDs[currentSpecID]
528531
local configInfo = C_Traits.GetConfigInfo(configID)
529-
if configInfo.type == 1 and configInfo.name ~= ITL_LOADOUT_NAME then
532+
if configInfo.type == 1 and configInfo.name ~= ITL_LOADOUT_NAME and (not self.charDB.activeConfigIDs or not self.charDB.activeConfigIDs[configInfo.ID]) then
530533
configInfo.default = configID == C_ClassTalents.GetActiveConfigID() or nil
531534
specLoadouts[configID] = configInfo
532535
self:InitializeTalentLoadout(configID)

0 commit comments

Comments
 (0)