WoWInterface - View Single Post - Anchoring cast bar to personal resource display
View Single Post
09-17-17, 11:16 AM   #8
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
No, that's no good. This tries to attach the castbar to Personal Resource Display whenever -any- nameplate appears on screen and puts it back in your default location whenever any nameplate disappears.
So you'd be out of combat and your castbar doesn't show up anymore because it tried attaching to a nameplate that isn't in view, or you'd be in middle of combat and castbar goes back to default location when you want it to stay on personal resource display.

Just replace RegisterUnitEvent in the previous code with RegisterEvent and use NAMEPLATE_UNIT_ADDED/NAMEPLATE_UNIT_REMOVED instead of the spellcast events.
  Reply With Quote