Skip to content

Commit

Permalink
Fix cases where an empty loadout of a different spec gets created
Browse files Browse the repository at this point in the history
  • Loading branch information
Lardeck committed Aug 31, 2024
1 parent 19198bf commit 3d1452c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ImprovedTalentLoadouts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ function TalentLoadouts:UpdateTempLoadout()
self.charDB.tempLoadout = configID
end
end

self.charDB.activeConfigIDs = self.charDB.activeConfigIDs or {}
self.charDB.activeConfigIDs[C_ClassTalents.GetActiveConfigID()] = true
end

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

0 comments on commit 3d1452c

Please sign in to comment.