In this case you may need to change the texture every time it is set by the default UI. This can be achieved using the funciton
hooksecurefunc. Otherwise you will keep tainting the UI.
This work around is provided you can not find where it keeps resetting the texture. If you happen to know where/how it is being reset there may be some other options.
Lua Code:
-- So instead of:
-- castBar.SetStatusBarTexture = function(...) end
-- You'd use:
local redundant
hooksecurefunc(castBar, "SetStatusBarTexture", function(self, ...)
if not redundant then
redundant = true
self:SetStatusBarTexture(textureB)
redundant = false
end
end)