Thread Tools Display Modes
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
07-14-23, 04:34 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,304
I wouldn't be surprised if the API is disabled in dungeons to prevent addons from triangulating party member positions. Blizzard has demonstrated previously that they don't like bossmods making encounters too trivial.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

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

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