Thread: Table
View Single Post
01-26-24, 01:53 AM   #1
Hubb777
A Flamescale Wyrmkin
 
Hubb777's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2024
Posts: 122
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
  Reply With Quote