Quantcast ArenaEnemyFrame1CastingBar behaviour - WoWInterface
Thread Tools Display Modes
01-29-12, 01:52 PM   #1
Spyro
A Deviate Faerie Dragon
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 19
Question ArenaEnemyFrame1CastingBar behaviour

Hi.

I want to attach the cast bars of Blizzard's Arena Frames to my Gladius. I'm ONLY interested in the cast bars, so I want to hide the rest of Blizzard's Arena Frames.

But I have a problem: I can ONLY see ArenaEnemyFrame1CastingBar (castbar's frame) when ArenaEnemyFrame1 (enemy's frame) is also visible. If I hide ArenaEnemyFrame1, ArenaEnemyFrame1CastingBar also hides itselfs, but I want to see ONLY ArenaEnemyFrame1CastingBar (having ArenaEnemyFrame1 hidden). As an informative detail, they have the same behaviour with SetScale(), if I change the scale of ArenaEnemyFrame1, the scale of ArenaEnemyFrame1CastingBar also changes.

How can I "break" the relation between these 2 frames?
  Reply With Quote
01-29-12, 02:11 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,556
This is because ArenaEnemyFrame1 is set as the cast bar's parent. You'll need to change its parent to your Gladius frame using

ArenaEnemyFrame1CastingBar:SetParent(whateverGladius'framenameis)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-01-12, 08:45 AM   #3
Spyro
A Deviate Faerie Dragon
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 19
Question Auto-anchor

Worked perfect thx.

Now I want to auto-anchor the cast bars when Gladius creates the "GladiusClassIconFramearenaN" frame (one for each enemy). So I have been thinking in using hooksecurefunc() to execute the SetPoint() and stuff after that frame is created. But I have come to the problem that this frame is created by the Gladius' ClassIcon Module (by the ClassIcon:CreateFrame() function) which object (ClassIcon) is declared as LOCAL... so I can't hook that function from my addon . Any workaround for this?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ArenaEnemyFrame1CastingBar behaviour

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