Disable everything completely while at a mailbox, bank or guildbank
Adrian L Lange [06-06-12 - 21:48]
Disable everything completely while at a mailbox, bank or guildbank
diff --git a/Monomyth.lua b/Monomyth.lua
index 4fc5826..768bfc5 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -1,10 +1,12 @@
local Monomyth = CreateFrame('Frame')
Monomyth:SetScript('OnEvent', function(self, event, ...) self[event](...) end)
+local atBank, atMail
+
function Monomyth:Register(event, func)
self:RegisterEvent(event)
self[event] = function(...)
- if(IsShiftKeyDown()) then
+ if(IsShiftKeyDown() or atBank or atMail) then
if(event == 'QUEST_DETAIL') then
QuestFrame_OnEvent(nil, event)
end
@@ -176,7 +178,6 @@ Monomyth:Register('QUEST_AUTOCOMPLETE', function(id)
end
end)
-local atBank
Monomyth:Register('BANKFRAME_OPENED', function()
atBank = true
end)
@@ -193,6 +194,14 @@ Monomyth:Register('GUILDBANKFRAME_CLOSED', function()
atBank = false
end)
+Monomyth:Register('MAIL_SHOW', function()
+ atMail = true
+end)
+
+Monomyth:Register('MAIL_CLOSED', function()
+ atMail = false
+end)
+
local query, queried
Monomyth:Register('QUEST_QUERY_COMPLETE', function()
if(query) then