Skip to content

Commit 10cee0f

Browse files
committed
fix an issue when blizzard changes your spec when teleporting into/out of an LFG activity
1 parent 7596a0b commit 10cee0f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/TalentLoadoutManager.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ function TLM:TRAIT_CONFIG_LIST_UPDATED()
111111
self:RegisterEvent("TRAIT_CONFIG_DELETED");
112112
self:RegisterEvent("CONFIG_COMMIT_FAILED");
113113
self:RegisterEvent("ACTIVE_PLAYER_SPECIALIZATION_CHANGED");
114+
self:RegisterEvent("PLAYER_ENTERING_WORLD");
114115
end
115116

116117
function TLM:TRAIT_CONFIG_UPDATED()
@@ -165,6 +166,13 @@ function TLM:ACTIVE_PLAYER_SPECIALIZATION_CHANGED()
165166
self:TriggerEvent(self.Event.LoadoutListUpdated);
166167
end
167168

169+
function TLM:PLAYER_ENTERING_WORLD()
170+
-- forced respecs from LFG queues, do not trigger ACTIVE_PLAYER_SPECIALIZATION_CHANGED event
171+
if self.playerSpecID == PlayerUtil.GetCurrentSpecID() then return; end
172+
self.playerSpecID = PlayerUtil.GetCurrentSpecID(); ---@diagnostic disable-line: assign-type-mismatch
173+
self:TriggerEvent(self.Event.LoadoutListUpdated);
174+
end
175+
168176
function TLM:GetParentMappingForLoadout(loadout, specID)
169177
if not loadout then return {}; end
170178
local mapping = Mixin({}, loadout.parentMapping or {});

0 commit comments

Comments
 (0)