Thread Tools Display Modes
01-25-11, 08:34 PM   #1
thatdudegrim
A Deviate Faerie Dragon
Join Date: Sep 2010
Posts: 10
Redundant Events

lua Code:
  1. local PWatcher = CreateFrame("Frame")
  2.    
  3.     PWatcher:RegisterEvent("PARTY_CONVERTED_TO_RAID")
  4.     PWatcher:RegisterEvent("PARTY_MEMBERS_CHANGED")
  5.     PWatcher:RegisterEvent("RAID_ROSTER_UPDATE")
  6.     PWatcher:SetScript("OnEvent", function(self,event,...)
  7.         WNC_MemberObject = ReadGroup()
  8.     end)

So this is my code to trigger whenever the group changes but in a raid group, if my party changes, both events are triggered. What can I do about this or must I let it trigger twice?
  Reply With Quote
01-26-11, 02:14 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Take a look at this ace-lib. It takes care of sth like this.

http://www.wowace.com/addons/ace3/pa...ce-bucket-3-0/
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
01-26-11, 03:19 PM   #3
kraftman
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 63
What are you trying to do with the events?

this might help

http://www.wowinterface.com/forums/s...ead.php?t=4538
  Reply With Quote
01-26-11, 03:26 PM   #4
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
I think the easiest way is to check which units you are interested in based on the numbers of raid|party members.

Code:
if GetNumRaidMembers() > 0 then
	-- In a raid
elseif GetNumPartyMembers() > 0 then
	-- In a party (note that there's no partyN unit for the player)		
else
	-- All alone
end
__________________
Oh, the simulated horror!
  Reply With Quote
01-27-11, 05:09 AM   #5
thatdudegrim
A Deviate Faerie Dragon
Join Date: Sep 2010
Posts: 10
Thanks guys.. I'll play with all the options available. Just feels irresponsible to let to it do the same thing twice.

Been idling in RIFT beta the last few days, rather than WoW.

I mean "playing".

It would be nice if there was just a general GROUP_ROSTER_UPDATE =)

Last edited by thatdudegrim : 01-27-11 at 05:11 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Redundant Events


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