Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-17-12, 11:41 AM   #1
Jonisaurus
A Fallenroot Satyr
 
Jonisaurus's Avatar
Join Date: Aug 2011
Posts: 29
Custom Aura Addon Breaks in Combat

I wrote an addon that hides or shows specific Bartender buttons in relation to specific auras (anyone wondering: I basically use it as part of a WeakAuras aura setup).

Anyway, it works perfectly outside of combat, and it stops working in combat.

Code:
local frame = CreateFrame("frame")
frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")


local function AuraEvent(self, event, timestamp, message, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
	local spellID, spellName, spellSchool = ...;
	
	-- These are the Aura functions that hide and show the Bartender buttons.

		if (message == "SPELL_AURA_APPLIED" or message == "SPELL_AURA_REFRESH") and sourceName == "Jyyn" then
			if  spellID == 100977 then
			BT4Button75:Show()
			elseif spellID == 16870 then
			BT4Button74:Show()
			elseif spellID == 126588 then
			BT4Button73:Show()
			elseif spellID == 117679 then
			BT4Button76:Show()
			elseif spellID == 124974 then
			BT4Button77:Show()
			end
		elseif (message == "SPELL_AURA_REMOVED") and sourceName == "Jyyn" then
			if  spellID == 100977 then
			BT4Button75:Hide()
			elseif spellID == 16870 then
			BT4Button74:Hide()
			elseif spellID == 126588 then
			BT4Button73:Hide()
			elseif spellID == 117679 then
			BT4Button76:Hide()
			elseif spellID == 124974 then
			BT4Button77:Hide()
			end
		end
	end
end

frame:SetScript("OnEvent", AuraEvent)
Halp!
Jonisaurus is offline   Reply With Quote
 

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Custom Aura Addon Breaks in Combat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off