From d1dd3898aaca06763beed12f13fc47b50b79e6d3 Mon Sep 17 00:00:00 2001 From: pigmonkey Date: Sun, 5 Jun 2011 20:26:39 -0400 Subject: [PATCH] Getting player GUID every time --- modules/spellcast.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/spellcast.lua b/modules/spellcast.lua index 5428a69..7e307f2 100644 --- a/modules/spellcast.lua +++ b/modules/spellcast.lua @@ -119,7 +119,6 @@ function mod:ZONE_CHANGED_NEW_AREA() end end -local pid = UnitGUID("player") function mod:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, _, ...) if not enabled or not combatEvents[event] then return end @@ -131,7 +130,7 @@ function mod:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, _, ...) end -- source is player - if pid ~= srcGUID then return end + if UnitGUID("player") ~= srcGUID then return end local category = spellWatch[spellId] if category then @@ -148,10 +147,11 @@ function mod:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, _, ...) end function mod:UNIT_SPELLCAST_SUCCEEDED(_, unit, _, _, _, spellId) - if not enabled or UnitGUID(unit) ~= pid then return end + if not enabled or UnitGUID(unit) ~= UnitGUID("player") then return end local category = spellWatch[spellId] if category then + -- self:Print("UNIT_SPELLCAST_SUCCEEDED", category, spellId) if not auras[category] then local duration = durations[category] if not duration then @@ -169,6 +169,8 @@ function mod:SpellStart(category, endTime) local time = GetTime() if not icon or endTime