Skip to content

Commit

Permalink
Update Misc.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
noname08662 authored Oct 10, 2024
1 parent 69e3b74 commit 52f78d1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Modules/Blizzard/Misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ end

function mod:CreatePingFrame()
local PlayerPingFrame = CreateFrame("Frame", nil, Minimap)
PlayerPingFrame:SetParent(Minimap)
PlayerPingFrame:SetParent(MinimapPing)
PlayerPingFrame:SetClampedToScreen(true)

PlayerPingFrame:Height(12)
Expand Down Expand Up @@ -221,15 +221,9 @@ function mod:PlayerPings(enable)
self:RegisterEvent("MINIMAP_PING", function(_, _, unitTarget, x, y)
mod:ShowPlayerPing(UnitName(unitTarget))
end, x, y)
if not self:IsHooked(MinimapPing, "OnHide") then
self:SecureHookScript(MinimapPing, "OnHide", function() E:UIFrameFadeOut(mod.PlayerPingFrame.PingText, 1, 1, 0) end)
end
elseif initialized.PlayerPings then
mod.PlayerPingFrame.PingText:Hide()
self:UnregisterEvent("MINIMAP_PING")
if self:IsHooked(MinimapPing, "OnHide") then
self:Unhook(MinimapPing, "OnHide")
end
end
end

Expand Down Expand Up @@ -390,4 +384,4 @@ function mod:InitializeCallback()
mod:Toggle()
end

core.modules[modName] = mod.InitializeCallback
core.modules[modName] = mod.InitializeCallback

0 comments on commit 52f78d1

Please sign in to comment.