From 981f88f9e713626385dc89ad20d97808576bf2cd Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Tue, 3 Jan 2017 20:16:16 +0100 Subject: [PATCH] throttling --- Postal.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Postal.lua b/Postal.lua index 693f435..df6174e 100644 --- a/Postal.lua +++ b/Postal.lua @@ -185,7 +185,17 @@ function hook.InboxFrameItem_OnEnter() GameTooltip:Show() end -CreateFrame('Frame', InboxFrame):SetScript('OnUpdate', function() if not Inbox_opening then CheckInbox() end end) +do + local x = 0 + CreateFrame('Frame', InboxFrame):SetScript('OnUpdate', function() + if x > 0 then + x = x - 1 + elseif not Inbox_opening then + x = 50 + CheckInbox() + end + end) +end function Inbox_Load() MailItem1:SetPoint('TOPLEFT', InboxFrame, 'TOPLEFT', 48, -80)