Originally Posted by Chr0nicxHack3r
I am working on an addon that does call outs for the group. I am wondering if someone can tell me if it is possible for the addon to recognize that someone already had the callout that way 2+ people are not making the same call out at once?
|
The easiest way to do that would probably be to bounce some addon messages around on group changes to maintain a list of members with the addon installed / enabled; then have the addon decide to send or self-mute based on a rule applied to that list (if you are not in the first alphabetical spot or the lowest group index of available members for example)
Edit: To clarify by bounce addon messages around I mean the addon comms that are hidden from players with
SendAddonMessage to maintain a list of players in the group that have your addon installed / enabled when
GROUP_ROSTER_UPDATE happens.
Then apply a rule to that list of group members with your addon that ensures only one of them will try to broadcast.
For example sort it alphabetically or by group index and only the instance of the addon with the first / lowest index broadcasts and other instances do not.
The other way would be to add an arbitrary delay to the broadcasts and do chat parsing to self-mute when a message from another instance of the addon has already gone out.
This is real messy and I wouldn't recommend it though.