function CT_RADetectSpells_OnLoad()
	this:RegisterEvent("UNIT_SPELLCAST_SENT");
	this:RegisterEvent("UNIT_SPELLCAST_STOP");
	this:RegisterEvent("UNIT_SPELLCAST_FAILED");
	this:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED");
end

function CT_RADetectSpells_OnEvent(event)
	if ( event == "UNIT_SPELLCAST_SENT" ) then
		CT_RA_SpellStartCast(arg2, arg4);
	elseif ( event == "UNIT_SPELLCAST_STOP" or event == "UNIT_SPELLCAST_FAILED" 
	         or event == "UNIT_SPELLCAST_INTERRUPTED" ) then
		CT_RA_SpellEndCast();
	end
end