Skip to content

Commit 157307d

Browse files
committed
Fixed a few issues with updating the sidebar when a new default UI loadout was created
1 parent af5636b commit 157307d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

core/TalentLoadoutManager.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ end
123123
function TLM:TRAIT_CONFIG_UPDATED(_, configID)
124124
RunNextFrame(function()
125125
self:UpdateBlizzardLoadout(configID);
126+
if configID == C_ClassTalents.GetActiveConfigID() then
127+
self:DiscoverNewLoadouts();
128+
self:TriggerEvent(self.Event.LoadoutListUpdated);
129+
end
126130
end);
127131
end
128132

@@ -422,6 +426,18 @@ function TLM:UpdateBlizzardLoadouts()
422426
self:TriggerEvent(self.Event.LoadoutListUpdated);
423427
end
424428

429+
function TLM:DiscoverNewLoadouts()
430+
local classID = self.playerClassID;
431+
for index = 1, GetNumSpecializations() do
432+
local specID = C_SpecializationInfo.GetSpecializationInfo(index);
433+
for _, configID in pairs(C_ClassTalents.GetConfigIDsBySpecID(specID)) do
434+
if not self.db.blizzardLoadouts[classID][specID][self.playerName][configID] then
435+
self:UpdateBlizzardLoadout(configID);
436+
end
437+
end
438+
end
439+
end
440+
425441
function TLM:UpdateBlizzardLoadout(configID, specID)
426442
local classID = self.playerClassID;
427443
specID = specID or self:GetBlizzardLoadoutSpec(configID);

0 commit comments

Comments
 (0)