View Single Post
06-09-17, 01:09 AM   #13
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by siweia View Post
"self.nameFrame" is the parent for healthBar's name and health value.

How to disable castbar for playerplate? It seems like not working if I just simply show/hide in callbacks.
Like w/ any other oUF unit frame, you're better off using unitframe:ElementEnable("element") and unitframe:ElementDisable("element") instead of simple element:Show() and element:Hide().

You need to add this:
Lua Code:
  1. -- enables castbar
  2. if not self:IsElementEnabled("Castbar") then
  3.     self:EnableElement("Castbar")
  4.     self.Castbar:ForceUpdate()
  5. end
  6.  
  7. -- disables castbar
  8. if self:IsElementEnabled("Castbar") then
  9.     self:DisableElement("Castbar")
  10. end

Sorry for numerous edits I'm having a lunch break at work right now
__________________

Last edited by lightspark : 06-09-17 at 01:14 AM.
  Reply With Quote