-- Localized Functions for the European Version
-- Outsorced functions:
-- _GFind

if ( GetLocale() == "deDE" or GetLocale() == "enGB" or GetLocale() == "enUS" or GetLocale() == "frFR") then

	if ( GetLocale() == "deDE" ) then

		function CEnemyCastBar_Gfind_Debuffs(arg1, event) --Gfind_Debuffs

			for mob, spell in string.gmatch(arg1, CEnemyCastBar_SPELL_AFFLICTED) do
				if (CEnemyCastBar.bSpellBreaks) then
					NECB_interrupt_casting(spell, mob); -- spell interrupting idea from Lazarus
				end
				CEnemyCastBar_Control(mob, spell, "afflicted", nil, event);
				return;
			end

			for spell in string.gmatch(arg1, CEnemyCastBar_SPELL_AFFLICTED2) do

				CEnemyCastBar_Control(CECB_SELF1, spell, "afflicted", nil, event);
				return;
			end

			if (CEnemyCastBar.bSpellBreaks) then
				-- event == "CHAT_MSG_SPELL_SELF_DAMAGE"
				for spell, mob in string.gmatch(arg1, CEnemyCastBar_SPELL_INTERRUPTED) do

					NECB_interrupt_casting(" ", mob);
					return;
				end

				-- event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"
				for interrupter, spell, mob in string.gmatch(arg1, CEnemyCastBar_SPELL_INTERRUPTED_OTHER) do

					NECB_interrupt_casting(" ", mob);
					return;
				end
			end

		end

	else

		function CEnemyCastBar_Gfind_Debuffs(arg1, event) --Gfind_Debuffs

			for mob, spell in string.gmatch(arg1, CEnemyCastBar_SPELL_AFFLICTED) do
				if (CEnemyCastBar.bSpellBreaks) then
					NECB_interrupt_casting(spell, mob); -- spell interrupting idea from Lazarus
				end
				CEnemyCastBar_Control(mob, spell, "afflicted", nil, event);
				return;
			end

			for spell in string.gmatch(arg1, CEnemyCastBar_SPELL_AFFLICTED2) do

				CEnemyCastBar_Control(CECB_SELF1, spell, "afflicted", nil, event);
				return;
			end

			if (CEnemyCastBar.bSpellBreaks) then
				for mob, spell in string.gmatch(arg1, CEnemyCastBar_SPELL_INTERRUPTED) do

					NECB_interrupt_casting(" ", mob);
					return;
				end

				for interrupter, mob, spell in string.gmatch(arg1, CEnemyCastBar_SPELL_INTERRUPTED_OTHER) do
						
					NECB_interrupt_casting(" ", mob);
					return;
				end
			end

		end

	end

end