View Single Post
06-23-09, 05:24 AM   #24
Coren
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 6
Originally Posted by Ambrya View Post
(...)
Results in two dings (I think...) and two copies of the alert text on the screen.
You could store the current time of your warning and suppress following ones in a time frame:
Code:
...
if name:find(self.listOfNames[i][1]) then
    -- only one warning per 10 seconds
    if ((me.Time == nil) or (time() - me.Time > 10)) then
        me.Time = time();
        PlaySound("RaidWarning")
        ...
    end
...
Originally Posted by Ambrya View Post
(...), but the alert being triggered by quotes/emotes at the start of the quest and when the "special event requiring attention" has already been dealt with could be confusing to some people. (...).
You could register "QUEST_LOG_UPDATE" and set me.Time to time() + 20 at that event. Then the first 20s after the quest start nothing would be output.
  Reply With Quote