Thread Tools Display Modes
07-12-21, 02:44 PM   #1
Chr0nicxHack3r
A Deviate Faerie Dragon
 
Chr0nicxHack3r's Avatar
Join Date: Jan 2021
Posts: 11
Message already sent?

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?
  Reply With Quote
07-13-21, 09:43 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
Originally Posted by Chr0nicxHack3r View Post
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.

Last edited by Dridzt : 07-13-21 at 09:51 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Message already sent?

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