View Single Post
01-28-10, 10:39 PM   #2
wurmfood
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 122
Not directly. You can use a custom PostCastStart/PostChannelStart function to identify if the spell is interruptible and change the display of the castbar based on that. You should also track the UNIT_SPELLCAST_INTERRUPTABLE/UNIT_SPELLCAST_NOT_INTERRUPTABLE events in case the interrupt-ability of the spell changes during cast (e.g. during the Twin Valkyrs).

To add to this, here's how I'm doing it (in my non-updated version):

Code:
local postCastStart = function(self, event, unit, name, rank, text, castid, interrupt)
	if( interrupt ) then
		self.Castbar.bg:Hide()
		self.Castbar.Shield:Show()
	else
		self.Castbar.bg:Show()
		self.Castbar.Shield:Hide()
	end
end

local spellInterruptable = function(self, event, unitID)
	if( self.unit == unitID ) then
		if( event == 'UNIT_SPELLCAST_NOT_INTERRUPTABLE' ) then
			self.Castbar.bg:Hide()
			self.Castbar.Shield:Show()
		else
			self.Castbar.bg:Show()
			self.Castbar.Shield:Hide()
		end
	end
end
and in the layout function:

Code:
self:RegisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTABLE', spellInterruptable)
self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTABLE', spellInterruptable)

Last edited by wurmfood : 01-29-10 at 12:36 AM.
  Reply With Quote