Skip to content

Commit ef7c672

Browse files
committed
Fixed a bug when changing loadouts (fixes #33)
1 parent 1610ec8 commit ef7c672

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/TalentLoadoutManager.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,9 +842,13 @@ function TLM:ApplyCustomLoadout(loadoutInfo, autoApply)
842842
local talentsTab = PlayerSpellsFrame and PlayerSpellsFrame.TalentsFrame
843843
local talentsTabIsVisible = talentsTab and talentsTab.IsVisible and talentsTab:IsVisible();
844844
if autoApply and talentsTab and talentsTabIsVisible then
845-
local stagedNodes = C_Traits.GetStagedPurchases(activeConfigID);
846-
if next(stagedNodes) then
847-
talentsTab.stagedPurchaseNodes = C_Traits.GetStagedPurchases(activeConfigID);
845+
local stagedPurchases, _, stagedSelectionSwaps = C_Traits.GetStagedChanges(activeConfigID);
846+
if stagedPurchases and #stagedPurchases > 0 then
847+
local allGainedNodes = stagedPurchases or {};
848+
if stagedSelectionSwaps and #stagedSelectionSwaps > 0 then
849+
tAppendAll(allGainedNodes, stagedSelectionSwaps);
850+
end
851+
talentsTab.stagedPurchaseNodes = allGainedNodes;
848852
talentsTab:SetCommitVisualsActive(true, TalentFrameBaseMixin.VisualsUpdateReasons.CommitOngoing, true);
849853
end
850854
end

0 commit comments

Comments
 (0)