From b59717d06c1aa1b95cff544ee3d530277f63f043 Mon Sep 17 00:00:00 2001 From: atomaka Date: Mon, 3 Oct 2011 22:04:55 -0400 Subject: [PATCH] Use INSTANCE_ENCOUNTER_ENGAGE_UNIT for better detection. --- ChoreTracker.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ChoreTracker.lua b/ChoreTracker.lua index bc58c47..7a695ff 100644 --- a/ChoreTracker.lua +++ b/ChoreTracker.lua @@ -206,8 +206,8 @@ function core:OnEnable() self:RegisterEvent('UPDATE_INSTANCE_INFO') self:RegisterEvent('CHAT_MSG_CURRENCY') self:RegisterEvent('LFG_UPDATE_RANDOM_INFO') - -- Need another event to catch instance lockouts. CHAT_MSG_CURRENCY will not fire if you - -- receive no currency (ie. are Valor Point capped). + -- Since CHAT_MSG_CURRENCY will not fire if you have max currency + self:RegisterEvent('INSTANCE_ENCOUNTER_ENGAGE_UNIT') end -- Get calendar events information @@ -239,6 +239,12 @@ function core:CHAT_MSG_CURRENCY() RequestLFDPlayerLockInfo() end +-- Might only fire for encounters with a boss frame. +function core:INSTANCE_ENCOUNTER_ENGAGE_UNIT() + RequestRaidInfo() + RequestLFDPlayerLockInfo() +end + @@ -472,7 +478,10 @@ end function core:DrawTooltip() -- UpdateChores before we show the tooltip to make sure we have the most recent data - core:UpdateChores() + local level = UnitLevel('player') + if level == 85 then + core:UpdateChores() + end if tooltip then tooltip:ClearAllPoints()