Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-13-23, 11:06 PM   #1
Platine
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 72
Bubbles in dungeons

Hello, I normally use the following code to define a bubble object:

Lua Code:
  1. function BB_findChatBubble(msg)
  2.    for _, bubble in pairs(C_ChatBubbles.GetAllChatBubbles()) do
  3.       -- Iterate the children, as the actual bubble content
  4.       for i = 1, bubble:GetNumChildren() do
  5.          local child = select(i, select(i, bubble:GetChildren()))
  6.          if ((child:GetObjectType() == "Frame") and (child.String) and (child.Center)) then
  7.             -- This is hopefully the frame with the content
  8.             for i = 1, child:GetNumRegions() do
  9.                local region = select(i, child:GetRegions());
  10.                if region and not region:GetName() and region:IsVisible() and region.GetText and (region:GetText() == msg) then
  11.                   return region;      -- this is serching object
  12.                end
  13.             end
  14.          end
  15.       end
  16.    end
  17. end

But this code doesn't work in dungeons. Bubbles in dungeons do not spawn from variable C_ChatBubbles.GetAllChatBubbles().
Is there another way to determine the currently displayed bubble in a dungeon?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Bubbles in dungeons


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