Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-25-14, 08:11 PM   #1
kaytotes
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 18
Event triggering multiple times.

I have searched but have some how not found anything that hints towards help on this matter. PARTY_KILL seems to run twice every time. I can't seem to discern why or how to prevent this. Any help is much appreciated.

Code:
killTracker = CreateFrame( "Frame" );
killTracker:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" );

killTracker:SetScript("OnEvent", function(_, _, _, event, _, sourceGUID, sourceName, _, _, destGUID, destName,  destFlags)
	if ( event == "PARTY_KILL" and sourceGUID == player) then
		if( inInstance == true ) then
			if( instanceType == "pvp" or instanceType == "arena" ) then
				message:AddMessage( "Killing Blow!", 1, 1, 0, 53, 3 );
			end
		end
	end

	if( event == "PARTY_KILL" ) then
		local string = sourceName.." killed "..destName;
		UpdateKills( string );
	end
end);
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Event triggering multiple times.


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