Skip to content

Commit

Permalink
Hopefully fix taint spreading from gossip handler
Browse files Browse the repository at this point in the history
  • Loading branch information
seblindfors committed Nov 27, 2022
1 parent 01d6ae8 commit cd8a226
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 32 deletions.
38 changes: 7 additions & 31 deletions Display/Onload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ for _, event in pairs({

titles:RegisterUnitEvent('UNIT_QUEST_LOG_CHANGED', 'player')



----------------------------------
-- Load SavedVaribles, config and compat
----------------------------------
Expand Down Expand Up @@ -175,32 +173,16 @@ function frame:ADDON_LOADED(name)
end
end

----------------------------------
-- Hide regular frames
----------------------------------
L.HideFrame(GossipFrame)
L.HideFrame(QuestFrame)
--L.HideFrame(ItemTextFrame)
----------------------------------

----------------------------------
-- Set backdrops on elements
----------------------------------
L.SetBackdrop(talkbox.Hilite, L.Backdrops.TALKBOX_HILITE)

----------------------------------
-- Initiate titlebuttons
----------------------------------
L.Mixin(titles, L.TitlesMixin)

----------------------------------
-- Initiate elements
----------------------------------
L.Mixin(elements, L.ElementsMixin)

----------------------------------
-- Initiate reputation bar
----------------------------------
L.Mixin(talkbox.ReputationBar, NPCFriendshipStatusBarMixin or {})
talkbox.ReputationBar.Update = talkbox.ReputationBar.Update or nop;
if talkbox.ReputationBar.SetColorFill then
Expand All @@ -221,16 +203,11 @@ do
L.Mixin(inspector.Choices, AdjustToChildren)
end

----------------------------------
-- Set point since the relative
-- region didn't exist on load.
----------------------------------
-- Set point since the relative region didn't exist on load.
local name = talkbox.NameFrame.Name
name:SetPoint('TOPLEFT', talkbox.PortraitFrame.Portrait, 'TOPRIGHT', 2, -19)

----------------------------------
-- Model script, light
----------------------------------
local model = talkbox.MainFrame.Model
--L.SetLight(model, true, L.ModelMixin.LightValues)
L.Mixin(model, L.ModelMixin)
Expand Down Expand Up @@ -303,14 +280,13 @@ titles:SetUserPlaced(false)
-- Hooks and hacks
--------------------------------

-- Hide regular frames
L.HideFrame(GossipFrame)
L.HideFrame(QuestFrame)
--L.HideFrame(ItemTextFrame)

-- Handle custom gossip events (new in Shadowlands)
if CustomGossipFrameManager then
frame.gossipHandlers = CustomGossipFrameManager.handlers;
GossipFrame_HandleShow = nop; -- let's hope blizz doesn't call this anywhere else
GossipFrame.HandleShow = nop;
else
frame.gossipHandlers = {}
end
frame.gossipHandlers = CustomGossipFrameManager and CustomGossipFrameManager.handlers or {};

-- Anchor the real talking head to the fake talking head,
-- make it appear IN PLACE of the fake one if the fake one isn't shown.
Expand Down
2 changes: 1 addition & 1 deletion Immersion.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Interface-Wrath: 30400
## Title: Immersion
## Notes: Immersive replacement for quest & gossip
## Version: 1.4.14
## Version: 1.4.15

## Author: Sebastian Lindfors
## X-Website: https://github.com/seblindfors/Immersion
Expand Down
1 change: 1 addition & 0 deletions Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function L.HideFrame(frame)
frame:EnableKeyboard(false)
frame:SetAlpha(0)
frame:ClearAllPoints()
UIPanelWindows[frame:GetName()] = nil;
end

function L.SetGradient(texture, orientation, ...)
Expand Down

0 comments on commit cd8a226

Please sign in to comment.