WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Table (https://www.wowinterface.com/forums/showthread.php?t=59774)

Hubb777 01-26-24 01:53 AM

Table
 
Lua Code:
  1. local addonName, addon = ...
  2. local listener = CreateFrame("Frame")
  3. listener:RegisterEvent("CHAT_MSG_MONSTER_SAY")
  4. listener:SetScript("OnEvent", function(self, event, text, monsterName)
  5.     if event == "CHAT_MSG_MONSTER_SAY" then
  6.         local mapID = C_Map.GetBestMapForUnit("player")
  7.         if mapID ~= 2200 then return end
  8.  
  9.         for _, data in pairs(addon.db) do
  10.             local announce = data.announce
  11.             if announce and announce[GetLocale()] and (announce[GetLocale()] == text) then
  12.                 RaidNotice_AddMessage(RaidWarningFrame, data.name[GetLocale()], ChatTypeInfo["RAID_WARNING"])
  13.             end
  14.         end
  15.     end
  16. end)

I need a table window with text from addon.db to appear instead of RAID_WARNING


All times are GMT -6. The time now is 08:28 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI