Originally Posted by siweia
"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:
-- enables castbar
if not self:IsElementEnabled("Castbar") then
self:EnableElement("Castbar")
self.Castbar:ForceUpdate()
end
-- disables castbar
if self:IsElementEnabled("Castbar") then
self:DisableElement("Castbar")
end
Sorry for numerous edits
I'm having a lunch break at work right now