From 24cc80abb263f2fad4b98bb1163dc49f4bdcc7bc Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 13 Oct 2012 11:46:29 +0200 Subject: [PATCH] Don't start quests from items while at a merchant --- Monomyth.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 666b804..e2bc5bf 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -1,7 +1,7 @@ local Monomyth = CreateFrame('Frame') Monomyth:SetScript('OnEvent', function(self, event, ...) self[event](...) end) -local atBank, atMail +local atBank, atMail, atMerchant function Monomyth:Register(event, func) self:RegisterEvent(event) @@ -202,8 +202,16 @@ Monomyth:Register('MAIL_CLOSED', function() atMail = false end) +Monomyth:Register('MERCHANT_SHOW', function() + atMerchant = true +end) + +Monomyth:Register('MERCHANT_CLOSED', function() + atMerchant = false +end) + Monomyth:Register('BAG_UPDATE', function(bag) - if(atBank or atMail) then return end + if(atBank or atMail or atMerchant) then return end for slot = 1, GetContainerNumSlots(bag) do local __, id, active = GetContainerItemQuestInfo(bag, slot) -- 1.7.9.5