-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
34 lines (28 loc) · 916 Bytes
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
tinsert(UISpecialFrames, 'WeeklyRewardsFrame')
SLASH_GREATVAULTSLASHCOMMAND1 = '/vault'
SlashCmdList['GREATVAULTSLASHCOMMAND'] = function()
local frame = WeeklyRewardsFrame
if frame == nil then
C_AddOns.LoadAddOn("Blizzard_WeeklyRewards")
frame = WeeklyRewardsFrame
frame:HookScript(
"OnShow",
function()
-- Disable the overlay that reminds the player to go to their
-- vault.
if frame.Overlay then
frame.Overlay.Show = function() end
frame.Overlay:Hide()
end
-- Pass mouse events through the blackout.
if frame.Blackout then
frame.Blackout:EnableMouse(false)
end
end)
end
if frame:IsVisible() then
frame:Hide()
else
frame:Show()
end
end