SHADERMOD_VERSION = "|cFFFFFFFFv3.31 Modded";

--Message Color : Grey
DISPLAY_RED = ".55";
DISPLAY_GREEN = ".55";
DISPLAY_BLUE = ".5"; 
-- Message Color : Red
FDISPLAY_RED = ".7";
FDISPLAY_GREEN = ".1";
FDISPLAY_BLUE = ".1"; 
-- Message Color : Blue
ADISPLAY_RED = ".2";
ADISPLAY_GREEN = ".2";
ADISPLAY_BLUE = ".8";

function SMOnLoad()
	this:RegisterEvent("VARIABLES_LOADED");
	this:RegisterEvent("CHAT_MSG_COMBAT_SELF_HITS");
	this:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
	this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
	this:RegisterEvent("CHAT_MSG_COMBAT_SELF_MISSES");
	this:RegisterEvent("PLAYER_ENTERING_WORLD");
	this:RegisterEvent("PLAYER_REGEN_ENABLED");
	this:RegisterEvent("UNIT_COMBO_POINTS");
	this:RegisterEvent("PLAYER_TARGET_CHANGED");
	this:RegisterEvent("UNIT_HEALTH");
	this:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH");
	this:RegisterEvent("CHAT_MSG_COMBAT_FRIENDLY_DEATH");
	this:RegisterEvent("CHAT_MSG_SYSTEM");
	this:RegisterEvent("DUEL_INBOUNDS");
	this:RegisterEvent("DUEL_FINISHED");
	this:RegisterEvent("DUEL_REQUESTED");
	this:RegisterEvent("DUEL_OUTOFBOUNDS");
	this:RegisterEvent("UNIT_NAME_UPDATE");
	this:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL");
	this:RegisterEvent("CHAT_MSG_BG_SYSTEM_ALLIANCE");
	this:RegisterEvent("CHAT_MSG_BG_SYSTEM_HORDE");
	this:RegisterEvent("ZONE_CHANGED_NEW_AREA");
	this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
	this:RegisterEvent("COMBATLOG_FILTER_HOSTILE_PLAYERS");
	this:RegisterEvent("COMBATLOG_OBJECT_TYPE_PLAYER");
	this:RegisterEvent("PLAYER_DEAD");

	KillingBlow = 0;
	KillingBlowMsg =".";
	CritDmg = 0;
	CritCombo = 0;
	CritComboDmg = 0;
	CritDmgHeal = 0;
	CritComboHeal = 0;
	CritComboHealDmg = 0;
	CurrentSpell = 0;
	CritMsg = ".";

	SMMessageFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
	SMMessageFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
	SMMessageFrameBackground:SetAlpha(0.0);
	SMMessageFrame:EnableMouse(false);

	SM_OUT = {};
	SM_OUT.EXEC_ANNOUNCED = false;
	SMFightAnnounced = 0;
	SMFightBgAnnounced = 0;
	SMThreeBgAnnounced = 0;
	SMTwoBgAnnounced = 0;
	SMOneBgAnnounced = 0;

	DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod " .. SHADERMOD_VERSION .. " |cFF00FF00by |cFF00FFFFSky-|cFF0000FFDexter.  |cFFFF0000.:Loaded:. |cFFFFFFFF: /sm for options", .2, .0);

	SMPlayerRealm = GetCVar("realmName");
	SMPlayerName = UnitName("player");

	UIPanelWindows["ShaderModOptionsFrame"] = {area = "center", pushable = 0};
	UIPanelWindows["ShaderModOptionsFrame2"] = {area = "center", pushable = 0};
end

function SMInitialize()
	SlashCmdList["CritCombo"] = SMCommand;
	SLASH_CritCombo1 = "/ShaderMod";
	SLASH_CritCombo2 = "/ShaderM";
	SLASH_CritCombo3 = "/sm"

	SMInitializeSMData();
	SMSetFontSizes();
	SMSetDuelFontSizes();
	SMSetKillingBlowFontSizes();
	player = UnitName("player");
end

function SMSetDefaultOptions()
	SMData[SMPlayerRealm][SMPlayerName].Reset_Combo = true;
	SMData[SMPlayerRealm][SMPlayerName].Announce_Display = false;
	SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits = false;
	SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display = true;
	SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display = true;
	SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display = true;
	SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Yeah = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Oh_Yeah = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Unstoppable = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Killing_Spree = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Dominating = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ultra_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Wicked_Sick = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_God_Like = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Holy_Shit = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Monster_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ludicrous_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ownage = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Yeah = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Oh_Yeah = false;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Unstoppable = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Killing_Spree = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Dominating = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ultra_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Wicked_Sick = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_God_Like = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Holy_Shit = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Monster_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ludicrous_Kill = true;
	SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ownage = true;
	SMData[SMPlayerRealm][SMPlayerName].JustifyH_Left = true;
	SMData[SMPlayerRealm][SMPlayerName].JustifyH_Center = false;
	SMData[SMPlayerRealm][SMPlayerName].JustifyH_Right = false;
	SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Visible = true;
	SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Locked = false;
	SMData[SMPlayerRealm][SMPlayerName].White_Crits = false;
	SMData[SMPlayerRealm][SMPlayerName].No_White_Normal = false;
	SMData[SMPlayerRealm][SMPlayerName].Heal = false;
	SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos = false;
	SMData[SMPlayerRealm][SMPlayerName]["Channel"] = "Party";
	SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] = "4";
	SMData[SMPlayerRealm][SMPlayerName]["Splash"] = "3";
	SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display = true;
	SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound = true;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow = false;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Death = true;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Bg = true;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Players_Only = true;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound = true;
	SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Repeat = false;
	SMData[SMPlayerRealm][SMPlayerName].Duel = true;
	SMData[SMPlayerRealm][SMPlayerName].Duel_Sound = true;
	SMData[SMPlayerRealm][SMPlayerName].Bg = true;
	SMData[SMPlayerRealm][SMPlayerName].Bg_Sound = true;
	SMData[SMPlayerRealm][SMPlayerName].Bg_Text = true;
end

SMSavedVars = { 
	SMFontSize = 30;
	SMDuelFontSize = 30;
	SMKillingBlowFontSize = 30;
};

function getVar( varName)
	return SMSavedVars[varName];
end

function SMUpdate()
	ChannelBox:SetText(SMData[SMPlayerRealm][SMPlayerName]["Channel"]);
	AnnounceBox:SetText(SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"]);
	SplashBox:SetText(SMData[SMPlayerRealm][SMPlayerName]["Splash"]);
end 

function SM_OnUpdate()
	if (ShaderModInFight == 1) then
		local t = GetTime() - ShaderModTimer;
		local s = floor(t);
		if (s == 1) then
			SMFight();
		end
	end
	if (ShaderModInFightBg == 1) then
		local t = GetTime() - ShaderModTimerBg;
		local s = floor(t);
		if (s == 27) then
			SMThreeBg();
		end
	end
	if (ShaderModInFightBg == 1) then
		local t = GetTime() - ShaderModTimerBg;
		local s = floor(t);
		if (s == 28) then
			SMTwoBg();
		end
	end
	if (ShaderModInFightBg == 1) then
		local t = GetTime() - ShaderModTimerBg;
		local s = floor(t);
		if (s == 29) then
			SMOneBg();
		end
	end
	if (ShaderModInFightBg == 1) then
		local t = GetTime() - ShaderModTimerBg;
		local s = floor(t);
		if (s == 30) then
			SMFightBg();
		end
	end
end

function SM_SetChannel()
	SMData[SMPlayerRealm][SMPlayerName]["Channel"] = this:GetText();
end

function SM_SetAnnounceBox()
	SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] = this:GetText();
end

function SM_SetSplashBox()
	SMData[SMPlayerRealm][SMPlayerName]["Splash"] = this:GetText();
end

function setVar( varName, value)
	SMSavedVars[varName] = value;
end

function SMFontSize_OnValueChanged()
	setVar("SMFontSize", this:GetValue());
	getglobal(this:GetName() .. "Text"):SetText(SM_FONT_SIZE .. " " .. this:GetValue());
	SMSetFontSizes();
end

function SMFontSize_OnShow()
	getglobal(this:GetName().."High"):SetText("32");
	getglobal(this:GetName().."Low"):SetText("8");

	this:SetMinMaxValues(8, 32);
	this:SetValueStep(1);
	this:SetValue(getVar("SMFontSize"));

	getglobal(this:GetName() .. "Text"):SetText(SM_FONT_SIZE .. " " .. this:GetValue());
end

function SMSetFontSizes()
	local font, fontHeight, flags = SMMessageFrame:GetFont();
 	SMMessageFrame:SetFont(font, getVar("SMFontSize"), flags);
end

function SMDuelFontSize_OnValueChanged()
	setVar("SMDuelFontSize", this:GetValue());
	getglobal(this:GetName() .. "Text"):SetText(SM_DUEL_FONT_SIZE .. " " .. this:GetValue());
	SMSetDuelFontSizes();
end

function SMDuelFontSize_OnShow()
	getglobal(this:GetName().."High"):SetText("32");
	getglobal(this:GetName().."Low"):SetText("8");

	this:SetMinMaxValues(8, 32);
	this:SetValueStep(1);
	this:SetValue(getVar("SMDuelFontSize"));

	getglobal(this:GetName() .. "Text"):SetText(SM_DUEL_FONT_SIZE .. " " .. this:GetValue());
end

function SMSetDuelFontSizes()
	local font, fontHeight, flags = SMDuelFrame:GetFont();
 	SMDuelFrame:SetFont(font, getVar("SMDuelFontSize"), flags);
end

function SMKillingBlowFontSize_OnValueChanged()
	setVar("SMKillingBlowFontSize", this:GetValue());
	getglobal(this:GetName() .. "Text"):SetText(SM_KILLINGBLOW_FONT_SIZE .. " " .. this:GetValue());
	SMSetKillingBlowFontSizes();
end

function SMKillingBlowFontSize_OnShow()
	getglobal(this:GetName().."High"):SetText("32");
	getglobal(this:GetName().."Low"):SetText("8");

	this:SetMinMaxValues(8, 32);
	this:SetValueStep(1);
	this:SetValue(getVar("SMKillingBlowFontSize"));

	getglobal(this:GetName() .. "Text"):SetText(SM_KILLINGBLOW_FONT_SIZE .. " " .. this:GetValue());
end

function SMSetKillingBlowFontSizes()
	local font, fontHeight, flags = SMKillingBlowFrame:GetFont();
 	SMKillingBlowFrame:SetFont(font, getVar("SMKillingBlowFontSize"), flags);
end

function SMCommand(msg)
	if (string.lower(msg) == "records") then
		DEFAULT_CHAT_FRAME:AddMessage("ShaderMod " .. SHADERMOD_VERSION .. " ", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00--- Hits Based Record ---", .65, .65, .6);
		DEFAULT_CHAT_FRAME:AddMessage("*" .. SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo .. "* crits for *" .. SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg .. "* damage. ");
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00--- Damage Based Record ---", .65, .65, .6);
		DEFAULT_CHAT_FRAME:AddMessage("*" .. SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo .. "* crits for *" .. SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg .. "* damage. ");
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00--- Healing Combos Based Record ---", .65, .65, .6);
		DEFAULT_CHAT_FRAME:AddMessage("*" .. SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal .. "* crits for *" .. SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg .. "* Total Healing. ");
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00--- Total Healing Based Record ---", .65, .65, .6);
		DEFAULT_CHAT_FRAME:AddMessage("*" .. SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal .. "* crits for *" .. SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg .. "* Total Healing. ");
		return;
	end

	if (string.lower(msg) == "help") then
		SMDisplayHelp();
		return;
	end

	if (string.lower(msg) == "lock") then
		SMMessageFrame.Locked = true;
		SMMessageFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		SMMessageFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		SMMessageFrameBackground:SetAlpha(0.0);
		SMMessageFrame:EnableMouse(false);
		ShaderModMessageFrame.Locked = true;
		ShaderModMessageFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		ShaderModMessageFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		ShaderModMessageFrameBackground:SetAlpha(0.0);
		ShaderModMessageFrame:EnableMouse(false);
		SMKillingBlowFrame.Locked = true;
		SMKillingBlowFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		SMKillingBlowFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		SMKillingBlowFrameBackground:SetAlpha(0.0);
		SMKillingBlowFrame:EnableMouse(false);
		SMDuelFrame.Locked = true;
		SMDuelFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		SMDuelFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		SMDuelFrameBackground:SetAlpha(0.0);
		SMDuelFrame:EnableMouse(false);
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: All Frames : |cFF00FF00Now |cFFFF0000Locked.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "unlock") then
		SMMessageFrame.Locked = false;
		SMMessageFrame:SetBackdropColor( 1.0, 1.0, 1.0, 1.0 );
		SMMessageFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 1.0 );
		SMMessageFrameBackground:SetAlpha(1.0); 
		SMMessageFrame:EnableMouse(true);
		SMMessageFrame:AddMessage("Combat Log Frame", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
		ShaderModMessageFrame.Locked = false;
		ShaderModMessageFrame:SetBackdropColor( 1.0, 1.0, 1.0, 1.0 );
		ShaderModMessageFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 1.0 );
		ShaderModMessageFrameBackground:SetAlpha(1.0); 
		ShaderModMessageFrame:EnableMouse(true);
		ShaderModMessageFrame:AddMessage("Splash Combo Frame", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
		SMKillingBlowFrame.Locked = false;
		SMKillingBlowFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		SMKillingBlowFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		SMKillingBlowFrameBackground:SetAlpha(1.0);
		SMKillingBlowFrame:EnableMouse(true);
		SMKillingBlowFrame:AddMessage("Killing Blow Frame", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
		SMDuelFrame.Locked = false;
		SMDuelFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 );
		SMDuelFrame:SetBackdropBorderColor( 1.0, 1.0, 1.0, 0.0 );
		SMDuelFrameBackground:SetAlpha(1.0);
		SMDuelFrame:EnableMouse(true);
		SMDuelFrame:AddMessage("Duel Enhancer Frame", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: All Frames : |cFF00FF00Now |cFFFF0000Unlocked.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "minimap lock") then
		SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Locked = true;
		SMMiniMapButton.Locked = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Minimap Button : |cFF00FF00Now |cFFFF0000Locked ", .2, .0);
	  return;
	end

	if (string.lower(msg) == "minimap unlock") then
		SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Locked = false;
		SMMiniMapButton.Locked = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Minimap Button : |cFF00FF00Now |cFFFF0000Unlocked ", .2, .0);
	  return;
	end

	if (string.lower(msg) == "hide log") then
		SMMessageFrame.Visible = false;
		SMMessageFrame:Hide();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Combat log : |cFF00FF00Now |cFFFF0000Hidden.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "hide review") then
		ShaderModMessageFrame.Visible = false;
		ShaderModMessageFrame:Hide();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Splash Combo Review : |cFF00FF00Now |cFFFF0000Hidden.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "hide killingblow") then
		SMKillingBlowFrame.Visible = false;
		SMKillingBlowFrame:Hide();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Killing Blow Frame : |cFF00FF00Now |cFFFF0000Hidden.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "hide duel") then
		SMDuelFrame.Visible = false;
		SMDuelFrame:Hide();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Duel Enhancer Frame : |cFF00FF00Now |cFFFF0000Hidden.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "hide") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM Hide --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Hide Log - Hide Combat Log Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Hide Review - Hide Splash Combo Review Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Hide KillingBlow - Hide Killing Blow Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Hide Duel - Hide Duel Enhancer Frame", .2, .0);
	  return;
	end

	if (string.lower(msg) == "show log") then
		SMMessageFrame.Visible = true;
		SMMessageFrame:Show();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Combat log : |cFF00FF00Now |cFFFF0000Visible.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "show review") then
		ShaderModMessageFrame.Visible = true;
		ShaderModMessageFrame:Show();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Splash Combo Review : |cFF00FF00Now |cFFFF0000Visible.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "show killingblow") then
		SMKillingBlowFrame.Visible = true;
		SMKillingBlowFrame:Show();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Killing Blow Frame : |cFF00FF00Now |cFFFF0000Visible.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "show duel") then
		SMDuelFrame.Visible = true;
		SMDuelFrame:Show();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Duel Enhancer Frame : |cFF00FF00Now |cFFFF0000Visible.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "show") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM Show --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Show Log - Show Combat Log Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Show Review - Show Splash Combo Review Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Show KillingBlow - Show Killing Blow Frame", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Show Duel - Show Duel Enhancer Frame", .2, .0);
	  return;
	end

	if (string.lower(msg) == "minimap show") then
		SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Visible = true;
		SMMiniMapButton:Show();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Minimap Button : |cFF00FF00Now |cFFFF0000Visible ", .2, .0);
	  return;
	end

	if (string.lower(msg) == "minimap hide") then
		SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Visible = false;
		SMMiniMapButton:Hide();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: Minimap Button : |cFF00FF00Now |cFFFF0000Hidden ", .2, .0);
	  return;
	end

	if (string.lower(msg) == "minimap") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM Minimap --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Minimap Show ", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Minimap Hide", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Minimap Lock", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Minimap Unlock", .2, .0);
	  return;
	end

	if (string.lower(msg) == "menu") then
		PlaySound("igMainMenuOpen");
		ShowUIPanel(ShaderModOptionsFrame);
	  return;
	end

	if (string.lower(msg) == "options") then
		PlaySound("igMainMenuOpen");
		ShowUIPanel(ShaderModOptionsFrame);
	  return;
	end
	
	if (string.lower(msg) == "menu2") then
		PlaySound("igMainMenuOpen");
		ShowUIPanel(ShaderModOptionsFrame2);
	  return;
	end

	if (string.lower(msg) == "options2") then
		PlaySound("igMainMenuOpen");
		ShowUIPanel(ShaderModOptionsFrame2);
	  return;
	end

	if (string.lower(msg) == "version") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFCurrent Version: " .. SHADERMOD_VERSION.." |cFF00FF00by |cFF00FFFFSky-|cFF0000FFDexter. ", .2, .0);
	  return;
	end

	if (string.lower(msg) == "duel") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM Duel --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Duel On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Duel Sound On/Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "duel on") then
		SMData[SMPlayerRealm][SMPlayerName].Duel = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFDuel Enhancer : ON.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "duel off") then
		SMData[SMPlayerRealm][SMPlayerName].Duel = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFDuel Enhancer : OFF.", .2, .0);
	  return;
	end

		if (string.lower(msg) == "bg") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM Bg --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Bg On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Bg Sound On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM Bg Text On/Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "bg on") then
		SMData[SMPlayerRealm][SMPlayerName].Bg = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer : ON.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "bg off") then
		SMData[SMPlayerRealm][SMPlayerName].Bg = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer : OFF.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow on") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow Frame = On", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow off") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow Frame = Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow sound off") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow - Sound = Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow sound on") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow - Sound = On", .2, .0);
	  return;
	end

	if (string.lower(msg) == "duel sound off") then
		SMData[SMPlayerRealm][SMPlayerName].Duel_Sound = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFDuel Enhancer - Sound = Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "duel sound on") then
		SMData[SMPlayerRealm][SMPlayerName].Duel_Sound = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFDuel Enhancer - Sound = On", .2, .0);
	  return;
	end

	if (string.lower(msg) == "bg sound off") then
		SMData[SMPlayerRealm][SMPlayerName].Bg_Sound = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer - Sound = Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "bg sound on") then
		SMData[SMPlayerRealm][SMPlayerName].Bg_Sound = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer - Sound = On", .2, .0);
	  return;
	end
	
	if (string.lower(msg) == "bg text off") then
		SMData[SMPlayerRealm][SMPlayerName].Bg_Text = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer - Text = Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "bg text on") then
		SMData[SMPlayerRealm][SMPlayerName].Bg_Text = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFBg Enhancer - Text = On", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow sound") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM KillingBlow Sound --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Sound On/Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM KillingBlow --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Reset BG On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Reset Death On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Sound On/Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow reset") then
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00-- /SM KillingBlow Reset --", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Reset BG On/Off", .2, .0);
		DEFAULT_CHAT_FRAME:AddMessage("/SM KillingBlow Reset Death On/Off", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow reset bg on") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Bg = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow : Will now reset when entering Battlegrounds.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow reset bg off") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Bg = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow : Will not reset when entering Battlegrounds.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow reset death on") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Death = true;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow : Will now reset when you die.", .2, .0);
	  return;
	end

	if (string.lower(msg) == "killingblow reset death off") then
		SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Death = false;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFKilling Blow : Will not reset if you die", .2, .0);
	  return;
	end

	if (string.lower(msg) == "resetconfig") then
		SMSetDefaultOptions();
		SMResetAll();
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFFConfiguration Reset.", .2, .0);
	  return;
	end

	SMDisplayHelp();
end


function SMOnEvent(event, arg1)
if (event == "VARIABLES_LOADED") then 
		SMInitialize(); 
	if (SMData[SMPlayerRealm][SMPlayerName].JustifyH_Left == true) then
		SMMessageFrame:SetJustifyH("Left");
	end	
	if (SMData[SMPlayerRealm][SMPlayerName].JustifyH_Center == true) then
		SMMessageFrame:SetJustifyH("Center");
	end
	if (SMData[SMPlayerRealm][SMPlayerName].JustifyH_Right == true) then
		SMMessageFrame:SetJustifyH("Right");
	end
	if (SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Visible == false) then
		SMMiniMapButton:Hide();
	end
	if (SMData[SMPlayerRealm][SMPlayerName].SMiniMapButton_Locked == true) then
		SMMiniMapButton.Locked = true;
	end	
end
	SMKillingBlow();
	SMDuel();
	SMBg();
	SMFlags();
    		if (event == "UNIT_HEALTH") then
			if (UnitClass("player") == MAGE) then
    				local targetHealth = UnitHealth("target");
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy("player", "target") then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Execute Range - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Execute Range - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
				if (event == "PLAYER_TARGET_CHANGED") then
						SM_OUT.EXEC_ANNOUNCED = false;
				end
			end
			if ((UnitClass("player") == WARRIOR) or (UnitClass("player") == PALADIN)) then
    				local targetHealth = UnitHealth("target");
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy("player", "target") then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Execute Range - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Execute Range - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
				
				if (event == "PLAYER_TARGET_CHANGED") then
						SM_OUT.EXEC_ANNOUNCED = false;
				end
			end
			if ((UnitClass("player") == ROGUE) or 
				(UnitClass("player") == PRIEST) or 
				(UnitClass("player") == WARLOCK) or
				(UnitClass("player") == HUNTER) or
				(UnitClass("player") == DRUID) or
				(UnitClass("player") == SHAMAN)) then
    				local targetHealth = UnitHealth("target");
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy("player", "target") then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Target Low HP - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
		    		if (targetHealth < 20 and targetHealth > 0) and (not SM_OUT.EXEC_ANNOUNCED) and UnitIsEnemy then
		    				if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute == true) then
							SMMessageFrame:AddMessage("Target Low HP - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
		    				SM_OUT.EXEC_ANNOUNCED = true;
		    		elseif (targetHealth <= 0) then
		    				SM_OUT.EXEC_ANNOUNCED = false;
		    		end
				
				if (event == "PLAYER_TARGET_CHANGED") then
						SM_OUT.EXEC_ANNOUNCED = false;
				end
			end
				
		end

if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg18
		if ((eventType == "SPELL_DAMAGE") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 8921) or -- Moonfire Rank 1
				(spellId == 8924) or -- Moonfire Rank 2
				(spellId == 8925) or -- Moonfire Rank 3
				(spellId == 8926) or -- Moonfire Rank 4
				(spellId == 8927) or -- Moonfire Rank 5
				(spellId == 8928) or -- Moonfire Rank 6
				(spellId == 8929) or -- Moonfire Rank 7
				(spellId == 9833) or -- Moonfire Rank 8
				(spellId == 9834) or -- Moonfire Rank 9
				(spellId == 9835) or -- Moonfire Rank 10
				(spellId == 26987) or -- Moonfire Rank 11
				(spellId == 26988) or -- Moonfire Rank 12
				(spellId == 48462) or -- Moonfire Rank 13
				(spellId == 48463) or -- Moonfire Rank 14
				(spellId == 2912) or -- Starfire Rank 1
				(spellId == 8949) or -- Starfire Rank 2
				(spellId == 8950) or -- Starfire Rank 3
				(spellId == 8951) or -- Starfire Rank 4
				(spellId == 9875) or -- Starfire Rank 5
				(spellId == 9876) or -- Starfire Rank 6
				(spellId == 25298) or -- Starfire Rank 7
				(spellId == 26986) or -- Starfire Rank 8
				(spellId == 48464) or -- Starfire Rank 9
				(spellId == 48465) or -- Starfire Rank 10
				(spellId == 5176) or -- Wrath Rank 1
				(spellId == 5177) or -- Wrath Rank 2
				(spellId == 5178) or -- Wrath Rank 3
				(spellId == 5179) or -- Wrath Rank 4
				(spellId == 5180) or -- Wrath Rank 5
				(spellId == 6780) or -- Wrath Rank 6
				(spellId == 8905) or -- Wrath Rank 7
				(spellId == 9912) or -- Wrath Rank 8
				(spellId == 26984) or -- Wrath Rank 9
				(spellId == 26985) or -- Wrath Rank 10
				(spellId == 48459) or -- Wrath Rank 11
				(spellId == 48461) or -- Wrath Rank 12
				(spellId == 779) or -- Swipe Rank 1 
				(spellId == 780) or -- Swipe Rank 2
				(spellId == 769) or -- Swipe Rank 3 
				(spellId == 9754) or -- Swipe Rank 4
				(spellId == 9908) or -- Swipe Rank 5
				(spellId == 26997) or -- Swipe Rank 6 
				(spellId == 48561) or -- Swipe Rank 7 
				(spellId == 48562) or -- Swipe Rank 8
				(spellId == 6807) or -- Maul Rank 1
				(spellId == 6808) or -- Maul Rank 2
				(spellId == 6809) or -- Maul Rank 3
				(spellId == 8972) or -- Maul Rank 4
				(spellId == 9745) or -- Maul Rank 5
				(spellId == 9880) or -- Maul Rank 6
				(spellId == 9881) or -- Maul Rank 7
				(spellId == 26996) or -- Maul Rank 8
				(spellId == 48479) or -- Maul Rank 9
				(spellId == 48480) or -- Maul Rank 10
				(spellId == 1082) or -- Claw Rank 1
				(spellId == 3029) or -- Claw Rank 2
				(spellId == 5201) or -- Claw Rank 3
				(spellId == 9849) or -- Claw Rank 4
				(spellId == 9850) or -- Claw Rank 5
				(spellId == 27000) or -- Claw Rank 6
				(spellId == 48569) or -- Claw Rank 7
				(spellId == 48570) or -- Claw Rank 8
				(spellId == 22570) or -- Maim Rank 1
				(spellId == 49802) or -- Maim Rank 2
				(spellId == 33745) or -- Lacerate Rank 1
				(spellId == 48567) or -- Lacerate Rank 2
				(spellId == 48568) or -- Lacerate Rank 3
				(spellId == 33878) or -- Mangle (Bear) Rank 1
				(spellId == 33986) or -- Mangle (Bear) Rank 2
				(spellId == 33987) or -- Mangle (Bear) Rank 3
				(spellId == 48563) or -- Mangle (Bear) Rank 4
				(spellId == 48564) or -- Mangle (Bear) Rank 5
				(spellId == 33876) or -- Mangle (Cat) Rank 1
				(spellId == 33982) or -- Mangle (Cat) Rank 2
				(spellId == 33983) or -- Mangle (Cat) Rank 3 
				(spellId == 48565) or -- Mangle (Cat) Rank 4
				(spellId == 48566) or -- Mangle (Cat) Rank 5
				(spellId == 5221) or -- Shred Rank 1 
				(spellId == 6800) or -- Shred Rank 2
				(spellId == 8992) or -- Shred Rank 3
				(spellId == 9829) or -- Shred Rank 4
				(spellId == 9830) or -- Shred Rank 5
				(spellId == 27001) or -- Shred Rank 6
				(spellId == 27002) or -- Shred Rank 7
				(spellId == 48571) or -- Shred Rank 8
				(spellId == 48572) or -- Shred Rank 9
				(spellId == 6785) or -- Ravage Rank 1 
				(spellId == 6787) or -- Ravage Rank 2
				(spellId == 9866) or -- Ravage Rank 3
				(spellId == 9867) or -- Ravage Rank 4
				(spellId == 27005) or -- Ravage Rank 5
				(spellId == 48578) or -- Ravage Rank 6
				(spellId == 48579) or -- Ravage Rank 7
				(spellId == 22568) or -- Ferocious Bite Rank 1 
				(spellId == 22827) or -- Ferocious Bite Rank 2
				(spellId == 22828) or -- Ferocious Bite Rank 3
				(spellId == 22829) or -- Ferocious Bite Rank 4
				(spellId == 31018) or -- Ferocious Bite Rank 5 
				(spellId == 24248) or -- Ferocious Bite Rank 6
				(spellId == 48576) or -- Ferocious Bite Rank 7
				(spellId == 48577) or -- Ferocious Bite Rank 8
				(spellId == 2973) or -- Raptor Strike Rank 1
				(spellId == 14260) or -- Raptor Strike Rank 2
				(spellId == 14261) or -- Raptor Strike Rank 3
				(spellId == 14262) or -- Raptor Strike Rank 4
				(spellId == 14263) or -- Raptor Strike Rank 5
				(spellId == 14264) or -- Raptor Strike Rank 6
				(spellId == 14265) or -- Raptor Strike Rank 7
				(spellId == 14266) or -- Raptor Strike Rank 8
				(spellId == 27014) or -- Raptor Strike Rank 9
				(spellId == 48995) or -- Raptor Strike Rank 10
				(spellId == 48996) or -- Raptor Strike Rank 11
				(spellId == 56641) or -- Steady Shot Rank 1
				(spellId == 34120) or -- Steady Shot Rank 2
				(spellId == 49051) or -- Steady Shot Rank 3
				(spellId == 49052) or -- Steady Shot Rank 4
				(spellId == 34490) or -- Silencing Shot Rank 1 
				(spellId == 75) or -- Auto Shot Rank 1 
				(spellId == 3044) or -- Arcane Shot Rank 1
				(spellId == 14281) or -- Arcane Shot Rank 2
				(spellId == 14282) or -- Arcane Shot Rank 3
				(spellId == 14283) or -- Arcane Shot Rank 4
				(spellId == 14284) or -- Arcane Shot Rank 5
				(spellId == 14285) or -- Arcane Shot Rank 6
				(spellId == 14286) or -- Arcane Shot Rank 7
				(spellId == 14287) or -- Arcane Shot Rank 8
				(spellId == 27019) or -- Arcane Shot Rank 9
				(spellId == 49044) or -- Arcane Shot Rank 10
				(spellId == 49045) or -- Arcane Shot Rank 11
				(spellId == 2643) or -- Multi Shot Rank 1 
				(spellId == 14288) or -- Multi Shot Rank 2
				(spellId == 14289) or -- Multi Shot Rank 3
				(spellId == 14290) or -- Multi Shot Rank 4
				(spellId == 25294) or -- Multi Shot Rank 5
				(spellId == 27021) or -- Multi Shot Rank 6
				(spellId == 49047) or -- Multi Shot Rank 7
				(spellId == 49048) or -- Multi Shot Rank 8
				(spellId == 19434) or -- Aimed Shot Rank 1
				(spellId == 20900) or -- Aimed Shot Rank 2
				(spellId == 20901) or -- Aimed Shot Rank 3
				(spellId == 20902) or -- Aimed Shot Rank 4
				(spellId == 20903) or -- Aimed Shot Rank 5
				(spellId == 20904) or -- Aimed Shot Rank 6
				(spellId == 27065) or -- Aimed Shot Rank 7
				(spellId == 49049) or -- Aimed Shot Rank 8
				(spellId == 49050) or -- Aimed Shot Rank 9
				(spellId == 5143) or -- Arcane Missiles Rank 1
				(spellId == 5144) or -- Arcane Missiles Rank 2
				(spellId == 5145) or -- Arcane Missiles Rank 3
				(spellId == 8416) or -- Arcane Missiles Rank 4
				(spellId == 8417) or -- Arcane Missiles Rank 5
				(spellId == 10211) or -- Arcane Missiles Rank 6
				(spellId == 10212) or -- Arcane Missiles Rank 7
				(spellId == 25345) or -- Arcane Missiles Rank 8
				(spellId == 27075) or -- Arcane Missiles Rank 9
				(spellId == 38699) or -- Arcane Missiles Rank 10
				(spellId == 38704) or -- Arcane Missiles Rank 11
				(spellId == 42843) or -- Arcane Missiles Rank 12
				(spellId == 42846) or -- Arcane Missiles Rank 13
				(spellId == 2136) or -- Fire Blast Rank 1 
				(spellId == 2137) or -- Fire Blast Rank 2
				(spellId == 2138) or -- Fire Blast Rank 3
				(spellId == 8412) or -- Fire Blast Rank 4
				(spellId == 8413) or -- Fire Blast Rank 5
				(spellId == 10197) or -- Fire Blast Rank 6
				(spellId == 10199) or -- Fire Blast Rank 7
				(spellId == 27078) or -- Fire Blast Rank 8
				(spellId == 27079) or -- Fire Blast Rank 9
				(spellId == 42872) or -- Fire Blast Rank 10
				(spellId == 42873) or -- Fire Blast Rank 11
				(spellId == 133) or -- Fireball Rank 1
				(spellId == 143) or -- Fireball Rank 2
				(spellId == 145) or -- Fireball Rank 3
				(spellId == 3140) or -- Fireball Rank 4
				(spellId == 8400) or -- Fireball Rank 5
				(spellId == 8401) or -- Fireball Rank 6
				(spellId == 8402) or -- Fireball Rank 7
				(spellId == 10148) or -- Fireball Rank 8
				(spellId == 10149) or -- Fireball Rank 9
				(spellId == 10150) or -- Fireball Rank 10
				(spellId == 10151) or -- Fireball Rank 11
				(spellId == 25306) or -- Fireball Rank 12
				(spellId == 27070) or -- Fireball Rank 13
				(spellId == 38692) or -- Fireball Rank 14
				(spellId == 42832) or -- Fireball Rank 15
				(spellId == 42833) or -- Fireball Rank 16
				(spellId == 11366) or -- Pyroblast Rank 1 
				(spellId == 12505) or -- Pyroblast Rank 2
				(spellId == 12522) or -- Pyroblast Rank 3
				(spellId == 12523) or -- Pyroblast Rank 4
				(spellId == 12524) or -- Pyroblast Rank 5
				(spellId == 12525) or -- Pyroblast Rank 6
				(spellId == 12526) or -- Pyroblast Rank 7
				(spellId == 18809) or -- Pyroblast Rank 8
				(spellId == 27132) or -- Pyroblast Rank 9
				(spellId == 33938) or -- Pyroblast Rank 10
				(spellId == 42890) or -- Pyroblast Rank 11
				(spellId == 42891) or -- Pyroblast Rank 12
				(spellId == 29722) or -- Incinerate Rank 1
				(spellId == 32231) or -- Incinerate Rank 2
				(spellId == 47837) or -- Incinerate Rank 3
				(spellId == 47838) or -- Incinerate Rank 4
				(spellId == 2948) or -- Scorch Rank 1
				(spellId == 8444) or -- Scorch Rank 2
				(spellId == 8445) or -- Scorch Rank 3
				(spellId == 8446) or -- Scorch Rank 4
				(spellId == 10205) or -- Scorch Rank 5
				(spellId == 10206) or -- Scorch Rank 6
				(spellId == 10207) or -- Scorch Rank 7
				(spellId == 27073) or -- Scorch Rank 8
				(spellId == 27074) or -- Scorch Rank 9
				(spellId == 42858) or -- Scorch Rank 10
				(spellId == 42859) or -- Scorch Rank 11
				(spellId == 116) or -- Frostbolt Rank 1
				(spellId == 205) or -- Frostbolt Rank 2
				(spellId == 837) or -- Frostbolt Rank 3
				(spellId == 7322) or -- Frostbolt Rank 4
				(spellId == 8406) or -- Frostbolt Rank 5
				(spellId == 8407) or -- Frostbolt Rank 6
				(spellId == 8408) or -- Frostbolt Rank 7
				(spellId == 10179) or -- Frostbolt Rank 8
				(spellId == 10180) or -- Frostbolt Rank 9
				(spellId == 10181) or -- Frostbolt Rank 10
				(spellId == 25304) or -- Frostbolt Rank 11
				(spellId == 27071) or -- Frostbolt Rank 12
				(spellId == 27072) or -- Frostbolt Rank 13
				(spellId == 38697) or -- Frostbolt Rank 14
				(spellId == 42841) or -- Frostbolt Rank 15
				(spellId == 42842) or -- Frostbolt Rank 16
				(spellId == 30455) or -- Ice Lance Rank 1
				(spellId == 42913) or -- Ice Lance Rank 2 
				(spellId == 42914) or -- Ice Lance Rank 3				
				(spellId == 585) or -- Smite Rank 1
				(spellId == 591) or -- Smite Rank 2
				(spellId == 598) or -- Smite Rank 3
				(spellId == 984) or -- Smite Rank 4
				(spellId == 1004) or -- Smite Rank 5
				(spellId == 6060) or -- Smite Rank 6
				(spellId == 10933) or -- Smite Rank 7
				(spellId == 10934) or -- Smite Rank 8
				(spellId == 25363) or -- Smite Rank 9
				(spellId == 25364) or -- Smite Rank 10
				(spellId == 48122) or -- Smite Rank 11
				(spellId == 48123) or -- Smite Rank 12
				(spellId == 8092) or -- Mind Blast Rank 1
				(spellId == 8102) or -- Mind Blast Rank 2
				(spellId == 8103) or -- Mind Blast Rank 3
				(spellId == 8104) or -- Mind Blast Rank 4
				(spellId == 8105) or -- Mind Blast Rank 5
				(spellId == 8106) or -- Mind Blast Rank 6
				(spellId == 10945) or -- Mind Blast Rank 7
				(spellId == 10946) or -- Mind Blast Rank 8
				(spellId == 10947) or -- Mind Blast Rank 9
				(spellId == 25372) or -- Mind Blast Rank 10
				(spellId == 25375) or -- Mind Blast Rank 11
				(spellId == 48126) or -- Mind Blast Rank 12	
				(spellId == 48127) or -- Mind Blast Rank 13				
				(spellId == 14914) or -- Holy Fire Rank 1
				(spellId == 15262) or -- Holy Fire Rank 2
				(spellId == 15263) or -- Holy Fire Rank 3
				(spellId == 15264) or -- Holy Fire Rank 4
				(spellId == 15265) or -- Holy Fire Rank 5
				(spellId == 15266) or -- Holy Fire Rank 6
				(spellId == 15267) or -- Holy Fire Rank 7
				(spellId == 15261) or -- Holy Fire Rank 8
				(spellId == 25384) or -- Holy Fire Rank 9
				(spellId == 48134) or -- Holy Fire Rank 10
				(spellId == 48135) or -- Holy Fire Rank 11
				(spellId == 32379) or -- Shadow Word Death Rank 1
				(spellId == 32996) or -- Shadow Word Death Rank 2
				(spellId == 48157) or -- Shadow Word Death Rank 3
				(spellId == 48158) or -- Shadow Word Death Rank 4
				--(spellId == 53) or -- Backstab Rank 1 
				--(spellId == 2589) or -- Backstab Rank 2
				--(spellId == 2590) or -- Backstab Rank 3
				--(spellId == 2591) or -- Backstab Rank 4
				--(spellId == 8721) or -- Backstab Rank 5
				--(spellId == 11279) or -- Backstab Rank 6
				--(spellId == 11280) or -- Backstab Rank 7
				--(spellId == 11281) or -- Backstab Rank 8
				--(spellId == 25300) or -- Backstab Rank 9
				--(spellId == 26863) or -- Backstab Rank 10
				--(spellId == 1752) or -- Sinister Strike Rank 1
				--(spellId == 1757) or -- Sinister Strike Rank 2
				--(spellId == 1758) or -- Sinister Strike Rank 3
				--(spellId == 1759) or -- Sinister Strike Rank 4
				--(spellId == 1760) or -- Sinister Strike Rank 5
				--(spellId == 8621) or -- Sinister Strike Rank 6
				--(spellId == 11293) or -- Sinister Strike Rank 7
				--(spellId == 11294) or -- Sinister Strike Rank 8
				--(spellId == 26861) or -- Sinister Strike Rank 9
				--(spellId == 26862) or -- Sinister Strike Rank 10
				--(spellId == 2098) or -- Eviscerate Rank 1
				--(spellId == 6760) or -- Eviscerate Rank 2
				--(spellId == 6761) or -- Eviscerate Rank 3
				--(spellId == 6762) or -- Eviscerate Rank 4
				--(spellId == 8623) or -- Eviscerate Rank 5
				--(spellId == 8624) or -- Eviscerate Rank 6
				--(spellId == 11299) or -- Eviscerate Rank 7
				--(spellId == 11300) or -- Eviscerate Rank 8
				--(spellId == 31016) or -- Eviscerate Rank 9
				--(spellId == 26865) or -- Eviscerate Rank 10				
				(spellId == 26679) or -- Deadly Throw Rank 1
				(spellId == 48673) or -- Deadly Throw Rank 2
				(spellId == 48674) or -- Deadly Throw Rank 3
				--(spellId == 32645) or -- Envenom Rank 1
				--(spellId == 32684) or -- Envenom Rank 1
				--(spellId == 1329) or -- Mutilate Rank 1
				--(spellId == 34411) or -- Mutilate Rank 2
				--(spellId == 34414) or -- Mutilate Rank 2 (Offhand)
				--(spellId == 34415) or -- Mutilate Rank 2 (Mainhand)
				--(spellId == 34412) or -- Mutilate Rank 3
				--(spellId == 34416) or -- Mutilate Rank 3 (Offhand)
				--(spellId == 34417) or -- Mutilate Rank 3 (Mainhand)
				--(spellId == 34413) or -- Mutilate Rank 4
				--(spellId == 34418) or -- Mutilate Rank 4 (Offhand)
				--(spellId == 34419) or -- Mutilate Rank 4 (Mainhand)
				--(spellId == 8676) or -- Ambush Rank 1
				--(spellId == 8724) or -- Ambush Rank 2
				--(spellId == 8725) or -- Ambush Rank 3
				--(spellId == 11267) or -- Ambush Rank 4
				--(spellId == 11268) or -- Ambush Rank 5
				--(spellId == 11269) or -- Ambush Rank 6
				--(spellId == 27441) or -- Ambush Rank 7
				--(spellId == 13877) or -- Blade Flurry Rank 1 
				--(spellId == 14251) or -- Riposte Rank 1 
				(spellName == BACKSTAB) or 
				(spellName == SINISTER_STRIKE) or 
				(spellName == EVISCERATE) or 
				(spellName == ENVENOM) or
				(spellName == SHIV) or
				(spellName == MUTILATE) or
				(spellName == AMBUSH) or 
				(spellName == BLADE_FLURRY) or 
				(spellName == RIPOSTE) or
				(spellName == BLOODTHIRST) or
				(spellId == 8042) or -- Earth Shock Rank 1
				(spellId == 8044) or -- Earth Shock Rank 2
				(spellId == 8045) or -- Earth Shock Rank 3
				(spellId == 8046) or -- Earth Shock Rank 4
				(spellId == 10412) or -- Earth Shock Rank 5
				(spellId == 10413) or -- Earth Shock Rank 6
				(spellId == 10414) or -- Earth Shock Rank 7
				(spellId == 25454) or -- Earth Shock Rank 8
				(spellId == 49230) or -- Earth Shock Rank 9
				(spellId == 49231) or -- Earth Shock Rank 10
				(spellId == 8050) or -- Flame Shock Rank 1
				(spellId == 8052) or -- Flame Shock Rank 2
				(spellId == 8053) or -- Flame Shock Rank 3
				(spellId == 10447) or -- Flame Shock Rank 4
				(spellId == 10448) or -- Flame Shock Rank 5
				(spellId == 29228) or -- Flame Shock Rank 6
				(spellId == 25457) or -- Flame Shock Rank 7
				(spellId == 49232) or -- Flame Shock Rank 8
				(spellId == 49233) or -- Flame Shock Rank 9
				(spellId == 403) or -- Lightning Bolt Rank 1
				(spellId == 529) or -- Lightning Bolt Rank 2
				(spellId == 548) or -- Lightning Bolt Rank 3
				(spellId == 915) or -- Lightning Bolt Rank 4
				(spellId == 943) or -- Lightning Bolt Rank 5
				(spellId == 6041) or -- Lightning Bolt Rank 6
				(spellId == 10391) or -- Lightning Bolt Rank 7
				(spellId == 10392) or -- Lightning Bolt Rank 8
				(spellId == 15207) or -- Lightning Bolt Rank 9
				(spellId == 15208) or -- Lightning Bolt Rank 10
				(spellId == 25448) or -- Lightning Bolt Rank 11
				(spellId == 25449) or -- Lightning Bolt Rank 12
				(spellId == 49237) or -- Lightning Bolt Rank 13
				(spellId == 49238) or -- Lightning Bolt Rank 14
				(spellId == 421) or -- Chain Lightning Rank 1
				(spellId == 930) or -- Chain Lightning Rank 2
				(spellId == 2860) or -- Chain Lightning Rank 3
				(spellId == 10605) or -- Chain Lightning Rank 4
				(spellId == 25439) or -- Chain Lightning Rank 5
				(spellId == 25442) or -- Chain Lightning Rank 6
				(spellId == 49270) or -- Chain Lightning Rank 7
				(spellId == 49271) or -- Chain Lightning Rank 8				
				(spellId == 8056) or -- Frost Shock Rank 1 
				(spellId == 8058) or -- Frost Shock Rank 2
				(spellId == 10472) or -- Frost Shock Rank 3
				(spellId == 10473) or -- Frost Shock Rank 4
				(spellId == 25464) or -- Frost Shock Rank 5
				(spellId == 49235) or -- Frost Shock Rank 6
				(spellId == 49236) or -- Frost Shock Rank 7
				(spellId == 5676) or -- Searing Pain Rank 1
				(spellId == 17919) or -- Searing Pain Rank 2
				(spellId == 17920) or -- Searing Pain Rank 3
				(spellId == 17921) or -- Searing Pain Rank 4
				(spellId == 17922) or -- Searing Pain Rank 5
				(spellId == 17923) or -- Searing Pain Rank 6
				(spellId == 27210) or -- Searing Pain Rank 7
				(spellId == 30459) or -- Searing Pain Rank 8
				(spellId == 47814) or -- Searing Pain Rank 9
				(spellId == 47815) or -- Searing Pain Rank 10
				(spellId == 348) or -- Immolate Rank 1 
				(spellId == 707) or -- Immolate Rank 2
				(spellId == 1094) or -- Immolate Rank 3
				(spellId == 2941) or -- Immolate Rank 4
				(spellId == 11665) or -- Immolate Rank 5
				(spellId == 11667) or -- Immolate Rank 6
				(spellId == 11668) or -- Immolate Rank 7
				(spellId == 25309) or -- Immolate Rank 8
				(spellId == 27215) or -- Immolate Rank 9
				(spellId == 47810) or -- Immolate Rank 10
				(spellId == 47811) or -- Immolate Rank 11
				(spellId == 6353) or -- Soul Fire Rank 1 
				(spellId == 17924) or -- Soul Fire Rank 2
				(spellId == 27211) or -- Soul Fire Rank 3 
				(spellId == 30545) or -- Soul Fire Rank 4
				(spellId == 47824) or -- Soul Fire Rank 5
				(spellId == 47825) or -- Soul Fire Rank 6
				(spellId == 17962) or -- Conflagrate Rank 1
				(spellId == 18930) or -- Conflagrate Rank 2	
				(spellId == 18931) or -- Conflagrate Rank 3
				(spellId == 18932) or -- Conflagrate Rank 4
				(spellId == 27266) or -- Conflagrate Rank 5
				(spellId == 30912) or -- Conflagrate Rank 6
				(spellId == 47828) or -- Conflagrate Rank 7
				(spellId == 47829) or -- Conflagrate Rank 8
				(spellId == 17877) or -- Shadowburn Rank 1
				(spellId == 18867) or -- Shadowburn Rank 2
				(spellId == 18868) or -- Shadowburn Rank 3
				(spellId == 18869) or -- Shadowburn Rank 4
				(spellId == 18870) or -- Shadowburn Rank 5
				(spellId == 18871) or -- Shadowburn Rank 6
				(spellId == 27263) or -- Shadowburn Rank 7 
				(spellId == 30546) or -- Shadowburn Rank 8
				(spellId == 47826) or -- Shadowburn Rank 9
				(spellId == 47827) or -- Shadowburn Rank 10
				(spellId == 686) or -- Shadow Bolt Rank 1  
				(spellId == 695) or -- Shadow Bolt Rank 2
				(spellId == 705) or -- Shadow Bolt Rank 3
				(spellId == 1088) or -- Shadow Bolt Rank 4
				(spellId == 1106) or -- Shadow Bolt Rank 5
				(spellId == 7641) or -- Shadow Bolt Rank 6
				(spellId == 11659) or -- Shadow Bolt Rank 7
				(spellId == 11660) or -- Shadow Bolt Rank 8
				(spellId == 11661) or -- Shadow Bolt Rank 9 
				(spellId == 25307) or -- Shadow Bolt Rank 10
				(spellId == 27209) or -- Shadow Bolt Rank 11
				(spellId == 47808) or -- Shadow Bolt Rank 12
				(spellId == 47809) or -- Shadow Bolt Rank 13
				--(spellId == 78) or -- Heroic Strike Rank 1
				--(spellId == 284) or -- Heroic Strike Rank 2
				--(spellId == 285) or -- Heroic Strike Rank 3
				--(spellId == 1608) or -- Heroic Strike Rank 4
				--(spellId == 11564) or -- Heroic Strike Rank 5
				--(spellId == 11565) or -- Heroic Strike Rank 6
				--(spellId == 11566) or -- Heroic Strike Rank 7
				--(spellId == 11567) or -- Heroic Strike Rank 8
				--(spellId == 25286) or -- Heroic Strike Rank 9
				--(spellId == 29707) or -- Heroic Strike Rank 10
				--(spellId == 30324) or -- Heroic Strike Rank 11
				--(spellId == 1464) or -- Slam Rank 1
				--(spellId == 8820) or -- Slam Rank 2
				--(spellId == 11604) or -- Slam Rank 3
				--(spellId == 11605) or -- Slam Rank 4
				--(spellId == 25241) or -- Slam Rank 5
				--(spellId == 25242) or -- Slam Rank 6
				--(spellId == 20230) or -- Retaliation Rank 1 
				--(spellId == 5308) or -- Execute Rank 1
				--(spellId == 20658) or -- Execute Rank 2
				--(spellId == 20660) or -- Execute Rank 3
				--(spellId == 20661) or -- Execute Rank 4
				--(spellId == 20662) or -- Execute Rank 5
				--(spellId == 25234) or -- Execute Rank 6
				--(spellId == 25236) or -- Execute Rank 7
				--(spellId == 7384) or -- Overpower Rank 1
				--(spellId == 7887) or -- Overpower Rank 2
				--(spellId == 11584) or -- Overpower Rank 3
				--(spellId == 11585) or -- Overpower Rank 4
				--(spellId == 845) or -- Cleave Rank 1
				--(spellId == 7369) or -- Cleave Rank 2
				--(spellId == 11608) or -- Cleave Rank 3
				--(spellId == 11609) or -- Cleave Rank 4
				--(spellId == 20569) or -- Cleave Rank 5
				--(spellId == 25231) or -- Cleave Rank 6			
				--(spellId == 34428) or -- Victory Rush Rank 1
				--(spellId == 20243) or -- Devastate Rank 1
				--(spellId == 30016) or -- Devastate Rank 2
				--(spellId == 30022) or -- Devastate Rank 3
				--(spellId == 1680) or -- Whirlwind Rank 1 
				--(spellId == 12294) or -- Mortal Strike Rank 1
				--(spellId == 21551) or -- Mortal Strike Rank 2
				--(spellId == 21552) or -- Mortal Strike Rank 3
				--(spellId == 21553) or -- Mortal Strike Rank 4
				--(spellId == 25248) or -- Mortal Strike Rank 5
				--(spellId == 30330) or -- Mortal Strike Rank 6
				--(spellId == 12328) or -- Sweeping Strikes Rank 1 
				(spellName == HEROIC_STRIKE) or 
				(spellName == SLAM) or 
				(spellName == RETALIATION) or 
				(spellName == EXECUTE) or 
				(spellName == OVERPOWER) or 
				(spellName == CLEAVE) or 
				(spellName == VICTORY_RUSH) or
				(spellName == RAMPAGE) or
				(spellName == DEVASTATE) or
				(spellName == WHIRLWIND) or 
				(spellName == MORTAL_STRIKE) or 
				(spellName == SWEEPING_STRIKES) or 
				(spellName == SHIELD_SLAM) or 
				(spellId == 35395) or -- Crusader Strike Rank 1
				(spellId == 31935) or -- Avenger's Shield Rank 1
				(spellId == 32699) or -- Avenger's Shield Rank 2
				(spellId == 32700) or -- Avenger's Shield Rank 3
				(spellId == 48826) or -- Avenger's Shield Rank 4
				(spellId == 48827) or -- Avenger's Shield Rank 5
				--(spellId == 23922) or -- Shield Slam Rank 1 
				--(spellId == 23923) or -- Shield Slam Rank 2
				--(spellId == 23924) or -- Shield Slam Rank 3
				--(spellId == 23925) or -- Shield Slam Rank 4
				--(spellId == 25258) or -- Shield Slam Rank 5
				--(spellId == 30356) or -- Shield Slam Rank 6
				(spellId == 879) or -- Exorcism Rank 1
				(spellId == 5614) or -- Exorcism Rank 2
				(spellId == 5615) or -- Exorcism Rank 3
				(spellId == 10312) or -- Exorcism Rank 4
				(spellId == 10313) or -- Exorcism Rank 5
				(spellId == 10314) or -- Exorcism Rank 6
				(spellId == 27138) or -- Exorcism Rank 7
				(spellId == 48800) or -- Exorcism Rank 8
				(spellId == 48801) or -- Exorcism Rank 9
				(spellId == 20375) or -- Seal of Command Rank 1
				(spellId == 20915) or -- Seal of Command Rank 2
				(spellId == 20918) or -- Seal of Command Rank 3
				(spellId == 20919) or -- Seal of Command Rank 4
				(spellId == 20920) or -- Seal of Command Rank 5
				(spellId == 27170) or -- Seal of Command Rank 6
				(spellId == 21084) or -- Seal of Righteousness Rank 1
				(spellId == 20287) or -- Seal of Righteousness Rank 2
				(spellId == 20288) or -- Seal of Righteousness Rank 3
				(spellId == 20289) or -- Seal of Righteousness Rank 4
				(spellId == 20290) or -- Seal of Righteousness Rank 5
				(spellId == 20291) or -- Seal of Righteousness Rank 6
				(spellId == 20292) or -- Seal of Righteousness Rank 7
				(spellId == 20293) or -- Seal of Righteousness Rank 8
				(spellId == 27155) or -- Seal of Righteousness Rank 9
				(spellName == ANOTHER_SPELL1) or
				(spellName == ANOTHER_SPELL2) or
				(spellName == ANOTHER_SPELL3) or
				(spellName == ANOTHER_SPELL4) or
				(spellId == 17364) or -- Stormstrike Rank 1
				(spellName == HEMORRHAGE) or
				--(spellId == 16511) or -- Hemorrhage Rank 1
				--(spellId == 17347) or -- Hemorrhage Rank 2
				--(spellId == 17348) or -- Hemorrhage Rank 3
				--(spellId == 26864) or -- Hemorrhage Rank 4
				(spellId == 20473) or -- Holy Shock Rank 1
				(spellId == 20929) or -- Holy Shock Rank 2
				(spellId == 20930) or -- Holy Shock Rank 3
				(spellId == 27174) or -- Holy Shock Rank 4
				(spellId == 48824) or -- Holy Shock Rank 6
				(spellId == 48825) or -- Holy Shock Rank 7
				--  WOTLK SPELLS
				(spellId == 50796) or -- Chaos Bolt Rank 1
				(spellId == 59170) or -- Chaos Bolt Rank 2
				(spellId == 59171) or -- Chaos Bolt Rank 3
				(spellId == 59172) or -- Chaos Bolt Rank 4
				(spellId == 44614) or -- Frostfire Bolt Rank 1
				(spellId == 47610) or -- Frostfire Bolt Rank 2
				(spellId == 45477) or -- DK Toucher de Glace Rank 1
				(spellId == 49896) or -- DK Toucher de Glace Rank 2
				(spellId == 49903) or -- DK Toucher de Glace Rank 3
				(spellId == 49904) or -- DK Toucher de Glace Rank 4
				(spellId == 49909) or -- DK Toucher de Glace Rank 5
				(spellId == 45462) or -- DK Frappe de Peste Rank 1
				(spellId == 49917) or -- DK Frappe de Peste Rank 2
				(spellId == 49918) or -- DK Frappe de Peste Rank 3
				(spellId == 49919) or -- DK Frappe de Peste Rank 4
				(spellId == 49920) or -- DK Frappe de Peste Rank 5
				(spellId == 49921) or -- DK Frappe de Peste Rank 6
				(spellId == 49998) or -- DK Frappe de Mort Rank 1
				(spellId == 49999) or -- DK Frappe de Mort Rank 2
				(spellId == 45463) or -- DK Frappe de Mort Rank 3
				(spellId == 49923) or -- DK Frappe de Mort Rank 4
				(spellId == 49924) or -- DK Frappe de Mort Rank 5
				(spellId == 55090) or -- DK Frappe du Fléau Rank 1
				(spellId == 55265) or -- DK Frappe du Fléau Rank 2
				(spellId == 55270) or -- DK Frappe du Fléau Rank 3
				(spellId == 55271) or -- DK Frappe du Fléau Rank 4
				(spellId == 45902) or -- DK Frappe de Sang Rank 1
				(spellId == 49926) or -- DK Frappe de Sang Rank 2
				(spellId == 49927) or -- DK Frappe de Sang Rank 3
				(spellId == 49928) or -- DK Frappe de Sang Rank 4
				(spellId == 49929) or -- DK Frappe de Sang Rank 5
				(spellId == 49930) or -- DK Frappe de Sang Rank 6
				(spellId == 55050) or -- DK Frappe au coeur Rank 1
				(spellId == 55258) or -- DK Frappe au coeur Rank 2
				(spellId == 55259) or -- DK Frappe au coeur Rank 3
				(spellId == 55260) or -- DK Frappe au coeur Rank 4
				(spellId == 55261) or -- DK Frappe au coeur Rank 5
				(spellId == 55262) or -- DK Frappe au coeur Rank 6
				(spellId == 49143) or -- DK Frappe de givre Rank 1
				(spellId == 51416) or -- DK Frappe de givre Rank 2
				(spellId == 51417) or -- DK Frappe de givre Rank 3
				(spellId == 51418) or -- DK Frappe de givre Rank 4
				(spellId == 51419) or -- DK Frappe de givre Rank 5
				(spellId == 55268) or -- DK Frappe de givre Rank 6
				(spellId == 49184) or -- DK Rafale Hurlante Rank 1
				(spellId == 51408) or -- DK Rafale Hurlante Rank 2
				(spellId == 51409) or -- DK Rafale Hurlante Rank 3
				(spellId == 51410) or -- DK Rafale Hurlante Rank 4
				(spellId == 51411) or -- DK Rafale Hurlante Rank 5
				(spellId == 52375) or -- DK Voile Mortel Rank 1
				(spellId == 49892) or -- DK Voile Mortel Rank 2
				(spellId == 49893) or -- DK Voile Mortel Rank 3
				(spellId == 49894) or -- DK Voile Mortel Rank 4
				(spellId == 49895) or -- DK Voile Mortel Rank 5
				(spellId == 56815) or -- DK Frappe Runique Rank 1
				(spellId == 49020) or -- DK Anéantissement Rank 1
				(spellId == 51423) or -- DK Anéantissement Rank 2
				(spellId == 51424) or -- DK Anéantissement Rank 3
				(spellId == 51425) or -- DK Anéantissement Rank 4
				(spellId == 33072)) then -- Holy Shock Rank 5
						if (GetComboPoints("Player") == 5) then
							if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
								PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
							end
							if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
								SMMessageFrame:AddMessage("5Combos Points - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
							end
						end
					CritDmg = tonumber(amount);
					LastDmg = tonumber(amount);
					CritCombo = CritCombo + 1;
					CritComboDmg = CritComboDmg + amount;
						if (CritCombo >= 1) then
							SMSoundAndDisplayDamage();
						end
					
				end
			else
				if ((spellId == 8921) or -- Moonfire Rank 1
				(spellId == 8924) or -- Moonfire Rank 2
				(spellId == 8925) or -- Moonfire Rank 3
				(spellId == 8926) or -- Moonfire Rank 4
				(spellId == 8927) or -- Moonfire Rank 5
				(spellId == 8928) or -- Moonfire Rank 6
				(spellId == 8929) or -- Moonfire Rank 7
				(spellId == 9833) or -- Moonfire Rank 8
				(spellId == 9834) or -- Moonfire Rank 9
				(spellId == 9835) or -- Moonfire Rank 10
				(spellId == 26987) or -- Moonfire Rank 11
				(spellId == 26988) or -- Moonfire Rank 12
				(spellId == 48462) or -- Moonfire Rank 13
				(spellId == 48463) or -- Moonfire Rank 14
				(spellId == 2912) or -- Starfire Rank 1
				(spellId == 8949) or -- Starfire Rank 2
				(spellId == 8950) or -- Starfire Rank 3
				(spellId == 8951) or -- Starfire Rank 4
				(spellId == 9875) or -- Starfire Rank 5
				(spellId == 9876) or -- Starfire Rank 6
				(spellId == 25298) or -- Starfire Rank 7
				(spellId == 26986) or -- Starfire Rank 8
				(spellId == 48464) or -- Starfire Rank 9
				(spellId == 48465) or -- Starfire Rank 10
				(spellId == 5176) or -- Wrath Rank 1
				(spellId == 5177) or -- Wrath Rank 2
				(spellId == 5178) or -- Wrath Rank 3
				(spellId == 5179) or -- Wrath Rank 4
				(spellId == 5180) or -- Wrath Rank 5
				(spellId == 6780) or -- Wrath Rank 6
				(spellId == 8905) or -- Wrath Rank 7
				(spellId == 9912) or -- Wrath Rank 8
				(spellId == 26984) or -- Wrath Rank 9
				(spellId == 26985) or -- Wrath Rank 10
				(spellId == 48459) or -- Wrath Rank 11
				(spellId == 48461) or -- Wrath Rank 12
				(spellId == 779) or -- Swipe Rank 1 
				(spellId == 780) or -- Swipe Rank 2
				(spellId == 769) or -- Swipe Rank 3 
				(spellId == 9754) or -- Swipe Rank 4
				(spellId == 9908) or -- Swipe Rank 5
				(spellId == 26997) or -- Swipe Rank 6 
				(spellId == 48561) or -- Swipe Rank 7 
				(spellId == 48562) or -- Swipe Rank 8
				(spellId == 6807) or -- Maul Rank 1
				(spellId == 6808) or -- Maul Rank 2
				(spellId == 6809) or -- Maul Rank 3
				(spellId == 8972) or -- Maul Rank 4
				(spellId == 9745) or -- Maul Rank 5
				(spellId == 9880) or -- Maul Rank 6
				(spellId == 9881) or -- Maul Rank 7
				(spellId == 26996) or -- Maul Rank 8
				(spellId == 48479) or -- Maul Rank 9
				(spellId == 48480) or -- Maul Rank 10
				(spellId == 1082) or -- Claw Rank 1
				(spellId == 3029) or -- Claw Rank 2
				(spellId == 5201) or -- Claw Rank 3
				(spellId == 9849) or -- Claw Rank 4
				(spellId == 9850) or -- Claw Rank 5
				(spellId == 27000) or -- Claw Rank 6
				(spellId == 48569) or -- Claw Rank 7
				(spellId == 48570) or -- Claw Rank 8
				(spellId == 22570) or -- Maim Rank 1
				(spellId == 49802) or -- Maim Rank 2
				(spellId == 33745) or -- Lacerate Rank 1
				(spellId == 48567) or -- Lacerate Rank 2
				(spellId == 48568) or -- Lacerate Rank 3
				(spellId == 33878) or -- Mangle (Bear) Rank 1
				(spellId == 33986) or -- Mangle (Bear) Rank 2
				(spellId == 33987) or -- Mangle (Bear) Rank 3
				(spellId == 48563) or -- Mangle (Bear) Rank 4
				(spellId == 48564) or -- Mangle (Bear) Rank 5
				(spellId == 33876) or -- Mangle (Cat) Rank 1
				(spellId == 33982) or -- Mangle (Cat) Rank 2
				(spellId == 33983) or -- Mangle (Cat) Rank 3 
				(spellId == 48565) or -- Mangle (Cat) Rank 4
				(spellId == 48566) or -- Mangle (Cat) Rank 5
				(spellId == 5221) or -- Shred Rank 1 
				(spellId == 6800) or -- Shred Rank 2
				(spellId == 8992) or -- Shred Rank 3
				(spellId == 9829) or -- Shred Rank 4
				(spellId == 9830) or -- Shred Rank 5
				(spellId == 27001) or -- Shred Rank 6
				(spellId == 27002) or -- Shred Rank 7
				(spellId == 48571) or -- Shred Rank 8
				(spellId == 48572) or -- Shred Rank 9
				(spellId == 6785) or -- Ravage Rank 1 
				(spellId == 6787) or -- Ravage Rank 2
				(spellId == 9866) or -- Ravage Rank 3
				(spellId == 9867) or -- Ravage Rank 4
				(spellId == 27005) or -- Ravage Rank 5
				(spellId == 48578) or -- Ravage Rank 6
				(spellId == 48579) or -- Ravage Rank 7
				(spellId == 22568) or -- Ferocious Bite Rank 1 
				(spellId == 22827) or -- Ferocious Bite Rank 2
				(spellId == 22828) or -- Ferocious Bite Rank 3
				(spellId == 22829) or -- Ferocious Bite Rank 4
				(spellId == 31018) or -- Ferocious Bite Rank 5 
				(spellId == 24248) or -- Ferocious Bite Rank 6
				(spellId == 48576) or -- Ferocious Bite Rank 7
				(spellId == 48577) or -- Ferocious Bite Rank 8
				(spellId == 2973) or -- Raptor Strike Rank 1
				(spellId == 14260) or -- Raptor Strike Rank 2
				(spellId == 14261) or -- Raptor Strike Rank 3
				(spellId == 14262) or -- Raptor Strike Rank 4
				(spellId == 14263) or -- Raptor Strike Rank 5
				(spellId == 14264) or -- Raptor Strike Rank 6
				(spellId == 14265) or -- Raptor Strike Rank 7
				(spellId == 14266) or -- Raptor Strike Rank 8
				(spellId == 27014) or -- Raptor Strike Rank 9
				(spellId == 48995) or -- Raptor Strike Rank 10
				(spellId == 48996) or -- Raptor Strike Rank 11
				(spellId == 56641) or -- Steady Shot Rank 1
				(spellId == 34120) or -- Steady Shot Rank 2
				(spellId == 49051) or -- Steady Shot Rank 3
				(spellId == 49052) or -- Steady Shot Rank 4
				(spellId == 34490) or -- Silencing Shot Rank 1 
				(spellId == 75) or -- Auto Shot Rank 1 
				(spellId == 3044) or -- Arcane Shot Rank 1
				(spellId == 14281) or -- Arcane Shot Rank 2
				(spellId == 14282) or -- Arcane Shot Rank 3
				(spellId == 14283) or -- Arcane Shot Rank 4
				(spellId == 14284) or -- Arcane Shot Rank 5
				(spellId == 14285) or -- Arcane Shot Rank 6
				(spellId == 14286) or -- Arcane Shot Rank 7
				(spellId == 14287) or -- Arcane Shot Rank 8
				(spellId == 27019) or -- Arcane Shot Rank 9
				(spellId == 49044) or -- Arcane Shot Rank 10
				(spellId == 49045) or -- Arcane Shot Rank 11
				(spellId == 2643) or -- Multi Shot Rank 1 
				(spellId == 14288) or -- Multi Shot Rank 2
				(spellId == 14289) or -- Multi Shot Rank 3
				(spellId == 14290) or -- Multi Shot Rank 4
				(spellId == 25294) or -- Multi Shot Rank 5
				(spellId == 27021) or -- Multi Shot Rank 6
				(spellId == 49047) or -- Multi Shot Rank 7
				(spellId == 49048) or -- Multi Shot Rank 8
				(spellId == 19434) or -- Aimed Shot Rank 1
				(spellId == 20900) or -- Aimed Shot Rank 2
				(spellId == 20901) or -- Aimed Shot Rank 3
				(spellId == 20902) or -- Aimed Shot Rank 4
				(spellId == 20903) or -- Aimed Shot Rank 5
				(spellId == 20904) or -- Aimed Shot Rank 6
				(spellId == 27065) or -- Aimed Shot Rank 7
				(spellId == 49049) or -- Aimed Shot Rank 8
				(spellId == 49050) or -- Aimed Shot Rank 9
				(spellId == 5143) or -- Arcane Missiles Rank 1
				(spellId == 5144) or -- Arcane Missiles Rank 2
				(spellId == 5145) or -- Arcane Missiles Rank 3
				(spellId == 8416) or -- Arcane Missiles Rank 4
				(spellId == 8417) or -- Arcane Missiles Rank 5
				(spellId == 10211) or -- Arcane Missiles Rank 6
				(spellId == 10212) or -- Arcane Missiles Rank 7
				(spellId == 25345) or -- Arcane Missiles Rank 8
				(spellId == 27075) or -- Arcane Missiles Rank 9
				(spellId == 38699) or -- Arcane Missiles Rank 10
				(spellId == 38704) or -- Arcane Missiles Rank 11
				(spellId == 42843) or -- Arcane Missiles Rank 12
				(spellId == 42846) or -- Arcane Missiles Rank 13
				(spellId == 2136) or -- Fire Blast Rank 1 
				(spellId == 2137) or -- Fire Blast Rank 2
				(spellId == 2138) or -- Fire Blast Rank 3
				(spellId == 8412) or -- Fire Blast Rank 4
				(spellId == 8413) or -- Fire Blast Rank 5
				(spellId == 10197) or -- Fire Blast Rank 6
				(spellId == 10199) or -- Fire Blast Rank 7
				(spellId == 27078) or -- Fire Blast Rank 8
				(spellId == 27079) or -- Fire Blast Rank 9
				(spellId == 42872) or -- Fire Blast Rank 10
				(spellId == 42873) or -- Fire Blast Rank 11
				(spellId == 133) or -- Fireball Rank 1
				(spellId == 143) or -- Fireball Rank 2
				(spellId == 145) or -- Fireball Rank 3
				(spellId == 3140) or -- Fireball Rank 4
				(spellId == 8400) or -- Fireball Rank 5
				(spellId == 8401) or -- Fireball Rank 6
				(spellId == 8402) or -- Fireball Rank 7
				(spellId == 10148) or -- Fireball Rank 8
				(spellId == 10149) or -- Fireball Rank 9
				(spellId == 10150) or -- Fireball Rank 10
				(spellId == 10151) or -- Fireball Rank 11
				(spellId == 25306) or -- Fireball Rank 12
				(spellId == 27070) or -- Fireball Rank 13
				(spellId == 38692) or -- Fireball Rank 14
				(spellId == 42832) or -- Fireball Rank 15
				(spellId == 42833) or -- Fireball Rank 16
				(spellId == 11366) or -- Pyroblast Rank 1 
				(spellId == 12505) or -- Pyroblast Rank 2
				(spellId == 12522) or -- Pyroblast Rank 3
				(spellId == 12523) or -- Pyroblast Rank 4
				(spellId == 12524) or -- Pyroblast Rank 5
				(spellId == 12525) or -- Pyroblast Rank 6
				(spellId == 12526) or -- Pyroblast Rank 7
				(spellId == 18809) or -- Pyroblast Rank 8
				(spellId == 27132) or -- Pyroblast Rank 9
				(spellId == 33938) or -- Pyroblast Rank 10
				(spellId == 42890) or -- Pyroblast Rank 11
				(spellId == 42891) or -- Pyroblast Rank 12
				(spellId == 29722) or -- Incinerate Rank 1
				(spellId == 32231) or -- Incinerate Rank 2
				(spellId == 47837) or -- Incinerate Rank 3
				(spellId == 47838) or -- Incinerate Rank 4
				(spellId == 2948) or -- Scorch Rank 1
				(spellId == 8444) or -- Scorch Rank 2
				(spellId == 8445) or -- Scorch Rank 3
				(spellId == 8446) or -- Scorch Rank 4
				(spellId == 10205) or -- Scorch Rank 5
				(spellId == 10206) or -- Scorch Rank 6
				(spellId == 10207) or -- Scorch Rank 7
				(spellId == 27073) or -- Scorch Rank 8
				(spellId == 27074) or -- Scorch Rank 9
				(spellId == 42858) or -- Scorch Rank 10
				(spellId == 42859) or -- Scorch Rank 11
				(spellId == 116) or -- Frostbolt Rank 1
				(spellId == 205) or -- Frostbolt Rank 2
				(spellId == 837) or -- Frostbolt Rank 3
				(spellId == 7322) or -- Frostbolt Rank 4
				(spellId == 8406) or -- Frostbolt Rank 5
				(spellId == 8407) or -- Frostbolt Rank 6
				(spellId == 8408) or -- Frostbolt Rank 7
				(spellId == 10179) or -- Frostbolt Rank 8
				(spellId == 10180) or -- Frostbolt Rank 9
				(spellId == 10181) or -- Frostbolt Rank 10
				(spellId == 25304) or -- Frostbolt Rank 11
				(spellId == 27071) or -- Frostbolt Rank 12
				(spellId == 27072) or -- Frostbolt Rank 13
				(spellId == 38697) or -- Frostbolt Rank 14
				(spellId == 42841) or -- Frostbolt Rank 15
				(spellId == 42842) or -- Frostbolt Rank 16
				(spellId == 30455) or -- Ice Lance Rank 1
				(spellId == 42913) or -- Ice Lance Rank 2 
				(spellId == 42914) or -- Ice Lance Rank 3				
				(spellId == 585) or -- Smite Rank 1
				(spellId == 591) or -- Smite Rank 2
				(spellId == 598) or -- Smite Rank 3
				(spellId == 984) or -- Smite Rank 4
				(spellId == 1004) or -- Smite Rank 5
				(spellId == 6060) or -- Smite Rank 6
				(spellId == 10933) or -- Smite Rank 7
				(spellId == 10934) or -- Smite Rank 8
				(spellId == 25363) or -- Smite Rank 9
				(spellId == 25364) or -- Smite Rank 10
				(spellId == 48122) or -- Smite Rank 11
				(spellId == 48123) or -- Smite Rank 12
				(spellId == 8092) or -- Mind Blast Rank 1
				(spellId == 8102) or -- Mind Blast Rank 2
				(spellId == 8103) or -- Mind Blast Rank 3
				(spellId == 8104) or -- Mind Blast Rank 4
				(spellId == 8105) or -- Mind Blast Rank 5
				(spellId == 8106) or -- Mind Blast Rank 6
				(spellId == 10945) or -- Mind Blast Rank 7
				(spellId == 10946) or -- Mind Blast Rank 8
				(spellId == 10947) or -- Mind Blast Rank 9
				(spellId == 25372) or -- Mind Blast Rank 10
				(spellId == 25375) or -- Mind Blast Rank 11
				(spellId == 48126) or -- Mind Blast Rank 12	
				(spellId == 48127) or -- Mind Blast Rank 13				
				(spellId == 14914) or -- Holy Fire Rank 1
				(spellId == 15262) or -- Holy Fire Rank 2
				(spellId == 15263) or -- Holy Fire Rank 3
				(spellId == 15264) or -- Holy Fire Rank 4
				(spellId == 15265) or -- Holy Fire Rank 5
				(spellId == 15266) or -- Holy Fire Rank 6
				(spellId == 15267) or -- Holy Fire Rank 7
				(spellId == 15261) or -- Holy Fire Rank 8
				(spellId == 25384) or -- Holy Fire Rank 9
				(spellId == 48134) or -- Holy Fire Rank 10
				(spellId == 48135) or -- Holy Fire Rank 11
				(spellId == 32379) or -- Shadow Word Death Rank 1
				(spellId == 32996) or -- Shadow Word Death Rank 2
				(spellId == 48157) or -- Shadow Word Death Rank 3
				(spellId == 48158) or -- Shadow Word Death Rank 4
				--(spellId == 53) or -- Backstab Rank 1 
				--(spellId == 2589) or -- Backstab Rank 2
				--(spellId == 2590) or -- Backstab Rank 3
				--(spellId == 2591) or -- Backstab Rank 4
				--(spellId == 8721) or -- Backstab Rank 5
				--(spellId == 11279) or -- Backstab Rank 6
				--(spellId == 11280) or -- Backstab Rank 7
				--(spellId == 11281) or -- Backstab Rank 8
				--(spellId == 25300) or -- Backstab Rank 9
				--(spellId == 26863) or -- Backstab Rank 10
				--(spellId == 1752) or -- Sinister Strike Rank 1
				--(spellId == 1757) or -- Sinister Strike Rank 2
				--(spellId == 1758) or -- Sinister Strike Rank 3
				--(spellId == 1759) or -- Sinister Strike Rank 4
				--(spellId == 1760) or -- Sinister Strike Rank 5
				--(spellId == 8621) or -- Sinister Strike Rank 6
				--(spellId == 11293) or -- Sinister Strike Rank 7
				--(spellId == 11294) or -- Sinister Strike Rank 8
				--(spellId == 26861) or -- Sinister Strike Rank 9
				--(spellId == 26862) or -- Sinister Strike Rank 10
				--(spellId == 2098) or -- Eviscerate Rank 1
				--(spellId == 6760) or -- Eviscerate Rank 2
				--(spellId == 6761) or -- Eviscerate Rank 3
				--(spellId == 6762) or -- Eviscerate Rank 4
				--(spellId == 8623) or -- Eviscerate Rank 5
				--(spellId == 8624) or -- Eviscerate Rank 6
				--(spellId == 11299) or -- Eviscerate Rank 7
				--(spellId == 11300) or -- Eviscerate Rank 8
				--(spellId == 31016) or -- Eviscerate Rank 9
				--(spellId == 26865) or -- Eviscerate Rank 10				
				(spellId == 26679) or -- Deadly Throw Rank 1
				(spellId == 48673) or -- Deadly Throw Rank 2
				(spellId == 48674) or -- Deadly Throw Rank 3
				--(spellId == 32645) or -- Envenom Rank 1
				--(spellId == 32684) or -- Envenom Rank 1
				--(spellId == 1329) or -- Mutilate Rank 1
				--(spellId == 34411) or -- Mutilate Rank 2
				--(spellId == 34414) or -- Mutilate Rank 2 (Offhand)
				--(spellId == 34415) or -- Mutilate Rank 2 (Mainhand)
				--(spellId == 34412) or -- Mutilate Rank 3
				--(spellId == 34416) or -- Mutilate Rank 3 (Offhand)
				--(spellId == 34417) or -- Mutilate Rank 3 (Mainhand)
				--(spellId == 34413) or -- Mutilate Rank 4
				--(spellId == 34418) or -- Mutilate Rank 4 (Offhand)
				--(spellId == 34419) or -- Mutilate Rank 4 (Mainhand)
				--(spellId == 8676) or -- Ambush Rank 1
				--(spellId == 8724) or -- Ambush Rank 2
				--(spellId == 8725) or -- Ambush Rank 3
				--(spellId == 11267) or -- Ambush Rank 4
				--(spellId == 11268) or -- Ambush Rank 5
				--(spellId == 11269) or -- Ambush Rank 6
				--(spellId == 27441) or -- Ambush Rank 7
				--(spellId == 13877) or -- Blade Flurry Rank 1 
				--(spellId == 14251) or -- Riposte Rank 1 
				(spellName == BACKSTAB) or 
				(spellName == SINISTER_STRIKE) or 
				(spellName == EVISCERATE) or 
				(spellName == ENVENOM) or
				(spellName == SHIV) or
				(spellName == MUTILATE) or
				(spellName == AMBUSH) or 
				(spellName == BLADE_FLURRY) or 
				(spellName == RIPOSTE) or
				(spellName == BLOODTHIRST) or
				(spellId == 8042) or -- Earth Shock Rank 1
				(spellId == 8044) or -- Earth Shock Rank 2
				(spellId == 8045) or -- Earth Shock Rank 3
				(spellId == 8046) or -- Earth Shock Rank 4
				(spellId == 10412) or -- Earth Shock Rank 5
				(spellId == 10413) or -- Earth Shock Rank 6
				(spellId == 10414) or -- Earth Shock Rank 7
				(spellId == 25454) or -- Earth Shock Rank 8
				(spellId == 49230) or -- Earth Shock Rank 9
				(spellId == 49231) or -- Earth Shock Rank 10
				(spellId == 8050) or -- Flame Shock Rank 1
				(spellId == 8052) or -- Flame Shock Rank 2
				(spellId == 8053) or -- Flame Shock Rank 3
				(spellId == 10447) or -- Flame Shock Rank 4
				(spellId == 10448) or -- Flame Shock Rank 5
				(spellId == 29228) or -- Flame Shock Rank 6
				(spellId == 25457) or -- Flame Shock Rank 7
				(spellId == 49232) or -- Flame Shock Rank 8
				(spellId == 49233) or -- Flame Shock Rank 9
				(spellId == 403) or -- Lightning Bolt Rank 1
				(spellId == 529) or -- Lightning Bolt Rank 2
				(spellId == 548) or -- Lightning Bolt Rank 3
				(spellId == 915) or -- Lightning Bolt Rank 4
				(spellId == 943) or -- Lightning Bolt Rank 5
				(spellId == 6041) or -- Lightning Bolt Rank 6
				(spellId == 10391) or -- Lightning Bolt Rank 7
				(spellId == 10392) or -- Lightning Bolt Rank 8
				(spellId == 15207) or -- Lightning Bolt Rank 9
				(spellId == 15208) or -- Lightning Bolt Rank 10
				(spellId == 25448) or -- Lightning Bolt Rank 11
				(spellId == 25449) or -- Lightning Bolt Rank 12
				(spellId == 49237) or -- Lightning Bolt Rank 13
				(spellId == 49238) or -- Lightning Bolt Rank 14
				(spellId == 421) or -- Chain Lightning Rank 1
				(spellId == 930) or -- Chain Lightning Rank 2
				(spellId == 2860) or -- Chain Lightning Rank 3
				(spellId == 10605) or -- Chain Lightning Rank 4
				(spellId == 25439) or -- Chain Lightning Rank 5
				(spellId == 25442) or -- Chain Lightning Rank 6
				(spellId == 49270) or -- Chain Lightning Rank 7
				(spellId == 49271) or -- Chain Lightning Rank 8				
				(spellId == 8056) or -- Frost Shock Rank 1 
				(spellId == 8058) or -- Frost Shock Rank 2
				(spellId == 10472) or -- Frost Shock Rank 3
				(spellId == 10473) or -- Frost Shock Rank 4
				(spellId == 25464) or -- Frost Shock Rank 5
				(spellId == 49235) or -- Frost Shock Rank 6
				(spellId == 49236) or -- Frost Shock Rank 7
				(spellId == 5676) or -- Searing Pain Rank 1
				(spellId == 17919) or -- Searing Pain Rank 2
				(spellId == 17920) or -- Searing Pain Rank 3
				(spellId == 17921) or -- Searing Pain Rank 4
				(spellId == 17922) or -- Searing Pain Rank 5
				(spellId == 17923) or -- Searing Pain Rank 6
				(spellId == 27210) or -- Searing Pain Rank 7
				(spellId == 30459) or -- Searing Pain Rank 8
				(spellId == 47814) or -- Searing Pain Rank 9
				(spellId == 47815) or -- Searing Pain Rank 10
				(spellId == 348) or -- Immolate Rank 1 
				(spellId == 707) or -- Immolate Rank 2
				(spellId == 1094) or -- Immolate Rank 3
				(spellId == 2941) or -- Immolate Rank 4
				(spellId == 11665) or -- Immolate Rank 5
				(spellId == 11667) or -- Immolate Rank 6
				(spellId == 11668) or -- Immolate Rank 7
				(spellId == 25309) or -- Immolate Rank 8
				(spellId == 27215) or -- Immolate Rank 9
				(spellId == 47810) or -- Immolate Rank 10
				(spellId == 47811) or -- Immolate Rank 11
				(spellId == 6353) or -- Soul Fire Rank 1 
				(spellId == 17924) or -- Soul Fire Rank 2
				(spellId == 27211) or -- Soul Fire Rank 3 
				(spellId == 30545) or -- Soul Fire Rank 4
				(spellId == 47824) or -- Soul Fire Rank 5
				(spellId == 47825) or -- Soul Fire Rank 6
				(spellId == 17962) or -- Conflagrate Rank 1
				(spellId == 18930) or -- Conflagrate Rank 2	
				(spellId == 18931) or -- Conflagrate Rank 3
				(spellId == 18932) or -- Conflagrate Rank 4
				(spellId == 27266) or -- Conflagrate Rank 5
				(spellId == 30912) or -- Conflagrate Rank 6
				(spellId == 47828) or -- Conflagrate Rank 7
				(spellId == 47829) or -- Conflagrate Rank 8
				(spellId == 17877) or -- Shadowburn Rank 1
				(spellId == 18867) or -- Shadowburn Rank 2
				(spellId == 18868) or -- Shadowburn Rank 3
				(spellId == 18869) or -- Shadowburn Rank 4
				(spellId == 18870) or -- Shadowburn Rank 5
				(spellId == 18871) or -- Shadowburn Rank 6
				(spellId == 27263) or -- Shadowburn Rank 7 
				(spellId == 30546) or -- Shadowburn Rank 8
				(spellId == 47826) or -- Shadowburn Rank 9
				(spellId == 47827) or -- Shadowburn Rank 10
				(spellId == 686) or -- Shadow Bolt Rank 1  
				(spellId == 695) or -- Shadow Bolt Rank 2
				(spellId == 705) or -- Shadow Bolt Rank 3
				(spellId == 1088) or -- Shadow Bolt Rank 4
				(spellId == 1106) or -- Shadow Bolt Rank 5
				(spellId == 7641) or -- Shadow Bolt Rank 6
				(spellId == 11659) or -- Shadow Bolt Rank 7
				(spellId == 11660) or -- Shadow Bolt Rank 8
				(spellId == 11661) or -- Shadow Bolt Rank 9 
				(spellId == 25307) or -- Shadow Bolt Rank 10
				(spellId == 27209) or -- Shadow Bolt Rank 11
				(spellId == 47808) or -- Shadow Bolt Rank 12
				(spellId == 47809) or -- Shadow Bolt Rank 13
				--(spellId == 78) or -- Heroic Strike Rank 1
				--(spellId == 284) or -- Heroic Strike Rank 2
				--(spellId == 285) or -- Heroic Strike Rank 3
				--(spellId == 1608) or -- Heroic Strike Rank 4
				--(spellId == 11564) or -- Heroic Strike Rank 5
				--(spellId == 11565) or -- Heroic Strike Rank 6
				--(spellId == 11566) or -- Heroic Strike Rank 7
				--(spellId == 11567) or -- Heroic Strike Rank 8
				--(spellId == 25286) or -- Heroic Strike Rank 9
				--(spellId == 29707) or -- Heroic Strike Rank 10
				--(spellId == 30324) or -- Heroic Strike Rank 11
				--(spellId == 1464) or -- Slam Rank 1
				--(spellId == 8820) or -- Slam Rank 2
				--(spellId == 11604) or -- Slam Rank 3
				--(spellId == 11605) or -- Slam Rank 4
				--(spellId == 25241) or -- Slam Rank 5
				--(spellId == 25242) or -- Slam Rank 6
				--(spellId == 20230) or -- Retaliation Rank 1 
				--(spellId == 5308) or -- Execute Rank 1
				--(spellId == 20658) or -- Execute Rank 2
				--(spellId == 20660) or -- Execute Rank 3
				--(spellId == 20661) or -- Execute Rank 4
				--(spellId == 20662) or -- Execute Rank 5
				--(spellId == 25234) or -- Execute Rank 6
				--(spellId == 25236) or -- Execute Rank 7
				--(spellId == 7384) or -- Overpower Rank 1
				--(spellId == 7887) or -- Overpower Rank 2
				--(spellId == 11584) or -- Overpower Rank 3
				--(spellId == 11585) or -- Overpower Rank 4
				--(spellId == 845) or -- Cleave Rank 1
				--(spellId == 7369) or -- Cleave Rank 2
				--(spellId == 11608) or -- Cleave Rank 3
				--(spellId == 11609) or -- Cleave Rank 4
				--(spellId == 20569) or -- Cleave Rank 5
				--(spellId == 25231) or -- Cleave Rank 6			
				--(spellId == 34428) or -- Victory Rush Rank 1
				--(spellId == 20243) or -- Devastate Rank 1
				--(spellId == 30016) or -- Devastate Rank 2
				--(spellId == 30022) or -- Devastate Rank 3
				--(spellId == 1680) or -- Whirlwind Rank 1 
				--(spellId == 12294) or -- Mortal Strike Rank 1
				--(spellId == 21551) or -- Mortal Strike Rank 2
				--(spellId == 21552) or -- Mortal Strike Rank 3
				--(spellId == 21553) or -- Mortal Strike Rank 4
				--(spellId == 25248) or -- Mortal Strike Rank 5
				--(spellId == 30330) or -- Mortal Strike Rank 6
				--(spellId == 12328) or -- Sweeping Strikes Rank 1 
				(spellName == HEROIC_STRIKE) or 
				(spellName == SLAM) or 
				(spellName == RETALIATION) or 
				(spellName == EXECUTE) or 
				(spellName == OVERPOWER) or 
				(spellName == CLEAVE) or 
				(spellName == VICTORY_RUSH) or
				(spellName == RAMPAGE) or
				(spellName == DEVASTATE) or
				(spellName == WHIRLWIND) or 
				(spellName == MORTAL_STRIKE) or 
				(spellName == SWEEPING_STRIKES) or 
				(spellName == SHIELD_SLAM) or 
				(spellId == 35395) or -- Crusader Strike Rank 1
				(spellId == 31935) or -- Avenger's Shield Rank 1
				(spellId == 32699) or -- Avenger's Shield Rank 2
				(spellId == 32700) or -- Avenger's Shield Rank 3
				(spellId == 48826) or -- Avenger's Shield Rank 4
				(spellId == 48827) or -- Avenger's Shield Rank 5
				--(spellId == 23922) or -- Shield Slam Rank 1 
				--(spellId == 23923) or -- Shield Slam Rank 2
				--(spellId == 23924) or -- Shield Slam Rank 3
				--(spellId == 23925) or -- Shield Slam Rank 4
				--(spellId == 25258) or -- Shield Slam Rank 5
				--(spellId == 30356) or -- Shield Slam Rank 6
				(spellId == 879) or -- Exorcism Rank 1
				(spellId == 5614) or -- Exorcism Rank 2
				(spellId == 5615) or -- Exorcism Rank 3
				(spellId == 10312) or -- Exorcism Rank 4
				(spellId == 10313) or -- Exorcism Rank 5
				(spellId == 10314) or -- Exorcism Rank 6
				(spellId == 27138) or -- Exorcism Rank 7
				(spellId == 48800) or -- Exorcism Rank 8
				(spellId == 48801) or -- Exorcism Rank 9
				(spellId == 20375) or -- Seal of Command Rank 1
				(spellId == 20915) or -- Seal of Command Rank 2
				(spellId == 20918) or -- Seal of Command Rank 3
				(spellId == 20919) or -- Seal of Command Rank 4
				(spellId == 20920) or -- Seal of Command Rank 5
				(spellId == 27170) or -- Seal of Command Rank 6
				(spellId == 21084) or -- Seal of Righteousness Rank 1
				(spellId == 20287) or -- Seal of Righteousness Rank 2
				(spellId == 20288) or -- Seal of Righteousness Rank 3
				(spellId == 20289) or -- Seal of Righteousness Rank 4
				(spellId == 20290) or -- Seal of Righteousness Rank 5
				(spellId == 20291) or -- Seal of Righteousness Rank 6
				(spellId == 20292) or -- Seal of Righteousness Rank 7
				(spellId == 20293) or -- Seal of Righteousness Rank 8
				(spellId == 27155) or -- Seal of Righteousness Rank 9
				(spellName == ANOTHER_SPELL1) or
				(spellName == ANOTHER_SPELL2) or
				(spellName == ANOTHER_SPELL3) or
				(spellName == ANOTHER_SPELL4) or
				(spellId == 17364) or -- Stormstrike Rank 1
				(spellName == HEMORRHAGE) or
				--(spellId == 16511) or -- Hemorrhage Rank 1
				--(spellId == 17347) or -- Hemorrhage Rank 2
				--(spellId == 17348) or -- Hemorrhage Rank 3
				--(spellId == 26864) or -- Hemorrhage Rank 4
				(spellId == 20473) or -- Holy Shock Rank 1
				(spellId == 20929) or -- Holy Shock Rank 2
				(spellId == 20930) or -- Holy Shock Rank 3
				(spellId == 27174) or -- Holy Shock Rank 4
				(spellId == 48824) or -- Holy Shock Rank 6
				(spellId == 48825) or -- Holy Shock Rank 7
				--  WOTLK SPELLS
				(spellId == 50796) or -- Chaos Bolt Rank 1
				(spellId == 59170) or -- Chaos Bolt Rank 2
				(spellId == 59171) or -- Chaos Bolt Rank 3
				(spellId == 59172) or -- Chaos Bolt Rank 4
				(spellId == 44614) or -- Frostfire Bolt Rank 1
				(spellId == 47610) or -- Frostfire Bolt Rank 2
				(spellId == 45477) or -- DK Toucher de Glace Rank 1
				(spellId == 49896) or -- DK Toucher de Glace Rank 2
				(spellId == 49903) or -- DK Toucher de Glace Rank 3
				(spellId == 49904) or -- DK Toucher de Glace Rank 4
				(spellId == 49909) or -- DK Toucher de Glace Rank 5
				(spellId == 45462) or -- DK Frappe de Peste Rank 1
				(spellId == 49917) or -- DK Frappe de Peste Rank 2
				(spellId == 49918) or -- DK Frappe de Peste Rank 3
				(spellId == 49919) or -- DK Frappe de Peste Rank 4
				(spellId == 49920) or -- DK Frappe de Peste Rank 5
				(spellId == 49921) or -- DK Frappe de Peste Rank 6
				(spellId == 49998) or -- DK Frappe de Mort Rank 1
				(spellId == 49999) or -- DK Frappe de Mort Rank 2
				(spellId == 45463) or -- DK Frappe de Mort Rank 3
				(spellId == 49923) or -- DK Frappe de Mort Rank 4
				(spellId == 49924) or -- DK Frappe de Mort Rank 5
				(spellId == 55090) or -- DK Frappe du Fléau Rank 1
				(spellId == 55265) or -- DK Frappe du Fléau Rank 2
				(spellId == 55270) or -- DK Frappe du Fléau Rank 3
				(spellId == 55271) or -- DK Frappe du Fléau Rank 4
				(spellId == 45902) or -- DK Frappe de Sang Rank 1
				(spellId == 49926) or -- DK Frappe de Sang Rank 2
				(spellId == 49927) or -- DK Frappe de Sang Rank 3
				(spellId == 49928) or -- DK Frappe de Sang Rank 4
				(spellId == 49929) or -- DK Frappe de Sang Rank 5
				(spellId == 49930) or -- DK Frappe de Sang Rank 6
				(spellId == 55050) or -- DK Frappe au coeur Rank 1
				(spellId == 55258) or -- DK Frappe au coeur Rank 2
				(spellId == 55259) or -- DK Frappe au coeur Rank 3
				(spellId == 55260) or -- DK Frappe au coeur Rank 4
				(spellId == 55261) or -- DK Frappe au coeur Rank 5
				(spellId == 55262) or -- DK Frappe au coeur Rank 6
				(spellId == 49143) or -- DK Frappe de givre Rank 1
				(spellId == 51416) or -- DK Frappe de givre Rank 2
				(spellId == 51417) or -- DK Frappe de givre Rank 3
				(spellId == 51418) or -- DK Frappe de givre Rank 4
				(spellId == 51419) or -- DK Frappe de givre Rank 5
				(spellId == 55268) or -- DK Frappe de givre Rank 6
				(spellId == 49184) or -- DK Rafale Hurlante Rank 1
				(spellId == 51408) or -- DK Rafale Hurlante Rank 2
				(spellId == 51409) or -- DK Rafale Hurlante Rank 3
				(spellId == 51410) or -- DK Rafale Hurlante Rank 4
				(spellId == 51411) or -- DK Rafale Hurlante Rank 5
				(spellId == 52375) or -- DK Voile Mortel Rank 1
				(spellId == 49892) or -- DK Voile Mortel Rank 2
				(spellId == 49893) or -- DK Voile Mortel Rank 3
				(spellId == 49894) or -- DK Voile Mortel Rank 4
				(spellId == 49895) or -- DK Voile Mortel Rank 5
				(spellId == 56815) or -- DK Frappe Runique Rank 1
				(spellId == 49020) or -- DK Anéantissement Rank 1
				(spellId == 51423) or -- DK Anéantissement Rank 2
				(spellId == 51424) or -- DK Anéantissement Rank 3
				(spellId == 51425) or -- DK Anéantissement Rank 4
				(spellId == 33072)) then -- Holy Shock Rank 5
							if (GetComboPoints("Player") == 5) then
								if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
									PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
								end
								if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
									SMMessageFrame:AddMessage("5Combos Points - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
								end
							end
						if (CritCombo ~= 0) then
							SMCompare_Combos();
						end
						if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
							SMMessageFrame:AddMessage(" [" .. amount .. "] Damage" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
					end
			end
		end
	end
end

if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg18
		if ((eventType == "SPELL_DAMAGE") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 8921) or -- Moonfire Rank 1
				(spellId == 8924) or -- Moonfire Rank 2
				(spellId == 8925) or -- Moonfire Rank 3
				(spellId == 8926) or -- Moonfire Rank 4
				(spellId == 8927) or -- Moonfire Rank 5
				(spellId == 8928) or -- Moonfire Rank 6
				(spellId == 8929) or -- Moonfire Rank 7
				(spellId == 9833) or -- Moonfire Rank 8
				(spellId == 9834) or -- Moonfire Rank 9
				(spellId == 9835) or -- Moonfire Rank 10
				(spellId == 26987) or -- Moonfire Rank 11
				(spellId == 26988) or -- Moonfire Rank 12
				(spellId == 48462) or -- Moonfire Rank 13
				(spellId == 48463) or -- Moonfire Rank 14
				(spellId == 2912) or -- Starfire Rank 1
				(spellId == 8949) or -- Starfire Rank 2
				(spellId == 8950) or -- Starfire Rank 3
				(spellId == 8951) or -- Starfire Rank 4
				(spellId == 9875) or -- Starfire Rank 5
				(spellId == 9876) or -- Starfire Rank 6
				(spellId == 25298) or -- Starfire Rank 7
				(spellId == 26986) or -- Starfire Rank 8
				(spellId == 48464) or -- Starfire Rank 9
				(spellId == 48465) or -- Starfire Rank 10
				(spellId == 5176) or -- Wrath Rank 1
				(spellId == 5177) or -- Wrath Rank 2
				(spellId == 5178) or -- Wrath Rank 3
				(spellId == 5179) or -- Wrath Rank 4
				(spellId == 5180) or -- Wrath Rank 5
				(spellId == 6780) or -- Wrath Rank 6
				(spellId == 8905) or -- Wrath Rank 7
				(spellId == 9912) or -- Wrath Rank 8
				(spellId == 26984) or -- Wrath Rank 9
				(spellId == 26985) or -- Wrath Rank 10
				(spellId == 48459) or -- Wrath Rank 11
				(spellId == 48461) or -- Wrath Rank 12
				(spellId == 779) or -- Swipe Rank 1 
				(spellId == 780) or -- Swipe Rank 2
				(spellId == 769) or -- Swipe Rank 3 
				(spellId == 9754) or -- Swipe Rank 4
				(spellId == 9908) or -- Swipe Rank 5
				(spellId == 26997) or -- Swipe Rank 6 
				(spellId == 48561) or -- Swipe Rank 7 
				(spellId == 48562) or -- Swipe Rank 8
				(spellId == 6807) or -- Maul Rank 1
				(spellId == 6808) or -- Maul Rank 2
				(spellId == 6809) or -- Maul Rank 3
				(spellId == 8972) or -- Maul Rank 4
				(spellId == 9745) or -- Maul Rank 5
				(spellId == 9880) or -- Maul Rank 6
				(spellId == 9881) or -- Maul Rank 7
				(spellId == 26996) or -- Maul Rank 8
				(spellId == 48479) or -- Maul Rank 9
				(spellId == 48480) or -- Maul Rank 10
				(spellId == 1082) or -- Claw Rank 1
				(spellId == 3029) or -- Claw Rank 2
				(spellId == 5201) or -- Claw Rank 3
				(spellId == 9849) or -- Claw Rank 4
				(spellId == 9850) or -- Claw Rank 5
				(spellId == 27000) or -- Claw Rank 6
				(spellId == 48569) or -- Claw Rank 7
				(spellId == 48570) or -- Claw Rank 8
				(spellId == 22570) or -- Maim Rank 1
				(spellId == 49802) or -- Maim Rank 2
				(spellId == 33745) or -- Lacerate Rank 1
				(spellId == 48567) or -- Lacerate Rank 2
				(spellId == 48568) or -- Lacerate Rank 3
				(spellId == 33878) or -- Mangle (Bear) Rank 1
				(spellId == 33986) or -- Mangle (Bear) Rank 2
				(spellId == 33987) or -- Mangle (Bear) Rank 3
				(spellId == 48563) or -- Mangle (Bear) Rank 4
				(spellId == 48564) or -- Mangle (Bear) Rank 5
				(spellId == 33876) or -- Mangle (Cat) Rank 1
				(spellId == 33982) or -- Mangle (Cat) Rank 2
				(spellId == 33983) or -- Mangle (Cat) Rank 3 
				(spellId == 48565) or -- Mangle (Cat) Rank 4
				(spellId == 48566) or -- Mangle (Cat) Rank 5
				(spellId == 5221) or -- Shred Rank 1 
				(spellId == 6800) or -- Shred Rank 2
				(spellId == 8992) or -- Shred Rank 3
				(spellId == 9829) or -- Shred Rank 4
				(spellId == 9830) or -- Shred Rank 5
				(spellId == 27001) or -- Shred Rank 6
				(spellId == 27002) or -- Shred Rank 7
				(spellId == 48571) or -- Shred Rank 8
				(spellId == 48572) or -- Shred Rank 9
				(spellId == 6785) or -- Ravage Rank 1 
				(spellId == 6787) or -- Ravage Rank 2
				(spellId == 9866) or -- Ravage Rank 3
				(spellId == 9867) or -- Ravage Rank 4
				(spellId == 27005) or -- Ravage Rank 5
				(spellId == 48578) or -- Ravage Rank 6
				(spellId == 48579) or -- Ravage Rank 7
				(spellId == 22568) or -- Ferocious Bite Rank 1 
				(spellId == 22827) or -- Ferocious Bite Rank 2
				(spellId == 22828) or -- Ferocious Bite Rank 3
				(spellId == 22829) or -- Ferocious Bite Rank 4
				(spellId == 31018) or -- Ferocious Bite Rank 5 
				(spellId == 24248) or -- Ferocious Bite Rank 6
				(spellId == 48576) or -- Ferocious Bite Rank 7
				(spellId == 48577) or -- Ferocious Bite Rank 8
				(spellId == 2973) or -- Raptor Strike Rank 1
				(spellId == 14260) or -- Raptor Strike Rank 2
				(spellId == 14261) or -- Raptor Strike Rank 3
				(spellId == 14262) or -- Raptor Strike Rank 4
				(spellId == 14263) or -- Raptor Strike Rank 5
				(spellId == 14264) or -- Raptor Strike Rank 6
				(spellId == 14265) or -- Raptor Strike Rank 7
				(spellId == 14266) or -- Raptor Strike Rank 8
				(spellId == 27014) or -- Raptor Strike Rank 9
				(spellId == 48995) or -- Raptor Strike Rank 10
				(spellId == 48996) or -- Raptor Strike Rank 11
				(spellId == 56641) or -- Steady Shot Rank 1
				(spellId == 34120) or -- Steady Shot Rank 2
				(spellId == 49051) or -- Steady Shot Rank 3
				(spellId == 49052) or -- Steady Shot Rank 4
				(spellId == 34490) or -- Silencing Shot Rank 1 
				(spellId == 75) or -- Auto Shot Rank 1 
				(spellId == 3044) or -- Arcane Shot Rank 1
				(spellId == 14281) or -- Arcane Shot Rank 2
				(spellId == 14282) or -- Arcane Shot Rank 3
				(spellId == 14283) or -- Arcane Shot Rank 4
				(spellId == 14284) or -- Arcane Shot Rank 5
				(spellId == 14285) or -- Arcane Shot Rank 6
				(spellId == 14286) or -- Arcane Shot Rank 7
				(spellId == 14287) or -- Arcane Shot Rank 8
				(spellId == 27019) or -- Arcane Shot Rank 9
				(spellId == 49044) or -- Arcane Shot Rank 10
				(spellId == 49045) or -- Arcane Shot Rank 11
				(spellId == 2643) or -- Multi Shot Rank 1 
				(spellId == 14288) or -- Multi Shot Rank 2
				(spellId == 14289) or -- Multi Shot Rank 3
				(spellId == 14290) or -- Multi Shot Rank 4
				(spellId == 25294) or -- Multi Shot Rank 5
				(spellId == 27021) or -- Multi Shot Rank 6
				(spellId == 49047) or -- Multi Shot Rank 7
				(spellId == 49048) or -- Multi Shot Rank 8
				(spellId == 19434) or -- Aimed Shot Rank 1
				(spellId == 20900) or -- Aimed Shot Rank 2
				(spellId == 20901) or -- Aimed Shot Rank 3
				(spellId == 20902) or -- Aimed Shot Rank 4
				(spellId == 20903) or -- Aimed Shot Rank 5
				(spellId == 20904) or -- Aimed Shot Rank 6
				(spellId == 27065) or -- Aimed Shot Rank 7
				(spellId == 49049) or -- Aimed Shot Rank 8
				(spellId == 49050) or -- Aimed Shot Rank 9
				(spellId == 5143) or -- Arcane Missiles Rank 1
				(spellId == 5144) or -- Arcane Missiles Rank 2
				(spellId == 5145) or -- Arcane Missiles Rank 3
				(spellId == 8416) or -- Arcane Missiles Rank 4
				(spellId == 8417) or -- Arcane Missiles Rank 5
				(spellId == 10211) or -- Arcane Missiles Rank 6
				(spellId == 10212) or -- Arcane Missiles Rank 7
				(spellId == 25345) or -- Arcane Missiles Rank 8
				(spellId == 27075) or -- Arcane Missiles Rank 9
				(spellId == 38699) or -- Arcane Missiles Rank 10
				(spellId == 38704) or -- Arcane Missiles Rank 11
				(spellId == 42843) or -- Arcane Missiles Rank 12
				(spellId == 42846) or -- Arcane Missiles Rank 13
				(spellId == 2136) or -- Fire Blast Rank 1 
				(spellId == 2137) or -- Fire Blast Rank 2
				(spellId == 2138) or -- Fire Blast Rank 3
				(spellId == 8412) or -- Fire Blast Rank 4
				(spellId == 8413) or -- Fire Blast Rank 5
				(spellId == 10197) or -- Fire Blast Rank 6
				(spellId == 10199) or -- Fire Blast Rank 7
				(spellId == 27078) or -- Fire Blast Rank 8
				(spellId == 27079) or -- Fire Blast Rank 9
				(spellId == 42872) or -- Fire Blast Rank 10
				(spellId == 42873) or -- Fire Blast Rank 11
				(spellId == 133) or -- Fireball Rank 1
				(spellId == 143) or -- Fireball Rank 2
				(spellId == 145) or -- Fireball Rank 3
				(spellId == 3140) or -- Fireball Rank 4
				(spellId == 8400) or -- Fireball Rank 5
				(spellId == 8401) or -- Fireball Rank 6
				(spellId == 8402) or -- Fireball Rank 7
				(spellId == 10148) or -- Fireball Rank 8
				(spellId == 10149) or -- Fireball Rank 9
				(spellId == 10150) or -- Fireball Rank 10
				(spellId == 10151) or -- Fireball Rank 11
				(spellId == 25306) or -- Fireball Rank 12
				(spellId == 27070) or -- Fireball Rank 13
				(spellId == 38692) or -- Fireball Rank 14
				(spellId == 42832) or -- Fireball Rank 15
				(spellId == 42833) or -- Fireball Rank 16
				(spellId == 11366) or -- Pyroblast Rank 1 
				(spellId == 12505) or -- Pyroblast Rank 2
				(spellId == 12522) or -- Pyroblast Rank 3
				(spellId == 12523) or -- Pyroblast Rank 4
				(spellId == 12524) or -- Pyroblast Rank 5
				(spellId == 12525) or -- Pyroblast Rank 6
				(spellId == 12526) or -- Pyroblast Rank 7
				(spellId == 18809) or -- Pyroblast Rank 8
				(spellId == 27132) or -- Pyroblast Rank 9
				(spellId == 33938) or -- Pyroblast Rank 10
				(spellId == 42890) or -- Pyroblast Rank 11
				(spellId == 42891) or -- Pyroblast Rank 12
				(spellId == 29722) or -- Incinerate Rank 1
				(spellId == 32231) or -- Incinerate Rank 2
				(spellId == 47837) or -- Incinerate Rank 3
				(spellId == 47838) or -- Incinerate Rank 4
				(spellId == 2948) or -- Scorch Rank 1
				(spellId == 8444) or -- Scorch Rank 2
				(spellId == 8445) or -- Scorch Rank 3
				(spellId == 8446) or -- Scorch Rank 4
				(spellId == 10205) or -- Scorch Rank 5
				(spellId == 10206) or -- Scorch Rank 6
				(spellId == 10207) or -- Scorch Rank 7
				(spellId == 27073) or -- Scorch Rank 8
				(spellId == 27074) or -- Scorch Rank 9
				(spellId == 42858) or -- Scorch Rank 10
				(spellId == 42859) or -- Scorch Rank 11
				(spellId == 116) or -- Frostbolt Rank 1
				(spellId == 205) or -- Frostbolt Rank 2
				(spellId == 837) or -- Frostbolt Rank 3
				(spellId == 7322) or -- Frostbolt Rank 4
				(spellId == 8406) or -- Frostbolt Rank 5
				(spellId == 8407) or -- Frostbolt Rank 6
				(spellId == 8408) or -- Frostbolt Rank 7
				(spellId == 10179) or -- Frostbolt Rank 8
				(spellId == 10180) or -- Frostbolt Rank 9
				(spellId == 10181) or -- Frostbolt Rank 10
				(spellId == 25304) or -- Frostbolt Rank 11
				(spellId == 27071) or -- Frostbolt Rank 12
				(spellId == 27072) or -- Frostbolt Rank 13
				(spellId == 38697) or -- Frostbolt Rank 14
				(spellId == 42841) or -- Frostbolt Rank 15
				(spellId == 42842) or -- Frostbolt Rank 16
				(spellId == 30455) or -- Ice Lance Rank 1
				(spellId == 42913) or -- Ice Lance Rank 2 
				(spellId == 42914) or -- Ice Lance Rank 3				
				(spellId == 585) or -- Smite Rank 1
				(spellId == 591) or -- Smite Rank 2
				(spellId == 598) or -- Smite Rank 3
				(spellId == 984) or -- Smite Rank 4
				(spellId == 1004) or -- Smite Rank 5
				(spellId == 6060) or -- Smite Rank 6
				(spellId == 10933) or -- Smite Rank 7
				(spellId == 10934) or -- Smite Rank 8
				(spellId == 25363) or -- Smite Rank 9
				(spellId == 25364) or -- Smite Rank 10
				(spellId == 48122) or -- Smite Rank 11
				(spellId == 48123) or -- Smite Rank 12
				(spellId == 8092) or -- Mind Blast Rank 1
				(spellId == 8102) or -- Mind Blast Rank 2
				(spellId == 8103) or -- Mind Blast Rank 3
				(spellId == 8104) or -- Mind Blast Rank 4
				(spellId == 8105) or -- Mind Blast Rank 5
				(spellId == 8106) or -- Mind Blast Rank 6
				(spellId == 10945) or -- Mind Blast Rank 7
				(spellId == 10946) or -- Mind Blast Rank 8
				(spellId == 10947) or -- Mind Blast Rank 9
				(spellId == 25372) or -- Mind Blast Rank 10
				(spellId == 25375) or -- Mind Blast Rank 11
				(spellId == 48126) or -- Mind Blast Rank 12	
				(spellId == 48127) or -- Mind Blast Rank 13				
				(spellId == 14914) or -- Holy Fire Rank 1
				(spellId == 15262) or -- Holy Fire Rank 2
				(spellId == 15263) or -- Holy Fire Rank 3
				(spellId == 15264) or -- Holy Fire Rank 4
				(spellId == 15265) or -- Holy Fire Rank 5
				(spellId == 15266) or -- Holy Fire Rank 6
				(spellId == 15267) or -- Holy Fire Rank 7
				(spellId == 15261) or -- Holy Fire Rank 8
				(spellId == 25384) or -- Holy Fire Rank 9
				(spellId == 48134) or -- Holy Fire Rank 10
				(spellId == 48135) or -- Holy Fire Rank 11
				(spellId == 32379) or -- Shadow Word Death Rank 1
				(spellId == 32996) or -- Shadow Word Death Rank 2
				(spellId == 48157) or -- Shadow Word Death Rank 3
				(spellId == 48158) or -- Shadow Word Death Rank 4
				--(spellId == 53) or -- Backstab Rank 1 
				--(spellId == 2589) or -- Backstab Rank 2
				--(spellId == 2590) or -- Backstab Rank 3
				--(spellId == 2591) or -- Backstab Rank 4
				--(spellId == 8721) or -- Backstab Rank 5
				--(spellId == 11279) or -- Backstab Rank 6
				--(spellId == 11280) or -- Backstab Rank 7
				--(spellId == 11281) or -- Backstab Rank 8
				--(spellId == 25300) or -- Backstab Rank 9
				--(spellId == 26863) or -- Backstab Rank 10
				--(spellId == 1752) or -- Sinister Strike Rank 1
				--(spellId == 1757) or -- Sinister Strike Rank 2
				--(spellId == 1758) or -- Sinister Strike Rank 3
				--(spellId == 1759) or -- Sinister Strike Rank 4
				--(spellId == 1760) or -- Sinister Strike Rank 5
				--(spellId == 8621) or -- Sinister Strike Rank 6
				--(spellId == 11293) or -- Sinister Strike Rank 7
				--(spellId == 11294) or -- Sinister Strike Rank 8
				--(spellId == 26861) or -- Sinister Strike Rank 9
				--(spellId == 26862) or -- Sinister Strike Rank 10
				--(spellId == 2098) or -- Eviscerate Rank 1
				--(spellId == 6760) or -- Eviscerate Rank 2
				--(spellId == 6761) or -- Eviscerate Rank 3
				--(spellId == 6762) or -- Eviscerate Rank 4
				--(spellId == 8623) or -- Eviscerate Rank 5
				--(spellId == 8624) or -- Eviscerate Rank 6
				--(spellId == 11299) or -- Eviscerate Rank 7
				--(spellId == 11300) or -- Eviscerate Rank 8
				--(spellId == 31016) or -- Eviscerate Rank 9
				--(spellId == 26865) or -- Eviscerate Rank 10				
				(spellId == 26679) or -- Deadly Throw Rank 1
				(spellId == 48673) or -- Deadly Throw Rank 2
				(spellId == 48674) or -- Deadly Throw Rank 3
				--(spellId == 32645) or -- Envenom Rank 1
				--(spellId == 32684) or -- Envenom Rank 1
				--(spellId == 1329) or -- Mutilate Rank 1
				--(spellId == 34411) or -- Mutilate Rank 2
				--(spellId == 34414) or -- Mutilate Rank 2 (Offhand)
				--(spellId == 34415) or -- Mutilate Rank 2 (Mainhand)
				--(spellId == 34412) or -- Mutilate Rank 3
				--(spellId == 34416) or -- Mutilate Rank 3 (Offhand)
				--(spellId == 34417) or -- Mutilate Rank 3 (Mainhand)
				--(spellId == 34413) or -- Mutilate Rank 4
				--(spellId == 34418) or -- Mutilate Rank 4 (Offhand)
				--(spellId == 34419) or -- Mutilate Rank 4 (Mainhand)
				--(spellId == 8676) or -- Ambush Rank 1
				--(spellId == 8724) or -- Ambush Rank 2
				--(spellId == 8725) or -- Ambush Rank 3
				--(spellId == 11267) or -- Ambush Rank 4
				--(spellId == 11268) or -- Ambush Rank 5
				--(spellId == 11269) or -- Ambush Rank 6
				--(spellId == 27441) or -- Ambush Rank 7
				--(spellId == 13877) or -- Blade Flurry Rank 1 
				--(spellId == 14251) or -- Riposte Rank 1 
				(spellName == BACKSTAB) or 
				(spellName == SINISTER_STRIKE) or 
				(spellName == EVISCERATE) or 
				(spellName == ENVENOM) or
				(spellName == SHIV) or
				(spellName == MUTILATE) or
				(spellName == AMBUSH) or 
				(spellName == BLADE_FLURRY) or 
				(spellName == RIPOSTE) or
				(spellName == BLOODTHIRST) or
				(spellId == 8042) or -- Earth Shock Rank 1
				(spellId == 8044) or -- Earth Shock Rank 2
				(spellId == 8045) or -- Earth Shock Rank 3
				(spellId == 8046) or -- Earth Shock Rank 4
				(spellId == 10412) or -- Earth Shock Rank 5
				(spellId == 10413) or -- Earth Shock Rank 6
				(spellId == 10414) or -- Earth Shock Rank 7
				(spellId == 25454) or -- Earth Shock Rank 8
				(spellId == 49230) or -- Earth Shock Rank 9
				(spellId == 49231) or -- Earth Shock Rank 10
				(spellId == 8050) or -- Flame Shock Rank 1
				(spellId == 8052) or -- Flame Shock Rank 2
				(spellId == 8053) or -- Flame Shock Rank 3
				(spellId == 10447) or -- Flame Shock Rank 4
				(spellId == 10448) or -- Flame Shock Rank 5
				(spellId == 29228) or -- Flame Shock Rank 6
				(spellId == 25457) or -- Flame Shock Rank 7
				(spellId == 49232) or -- Flame Shock Rank 8
				(spellId == 49233) or -- Flame Shock Rank 9
				(spellId == 403) or -- Lightning Bolt Rank 1
				(spellId == 529) or -- Lightning Bolt Rank 2
				(spellId == 548) or -- Lightning Bolt Rank 3
				(spellId == 915) or -- Lightning Bolt Rank 4
				(spellId == 943) or -- Lightning Bolt Rank 5
				(spellId == 6041) or -- Lightning Bolt Rank 6
				(spellId == 10391) or -- Lightning Bolt Rank 7
				(spellId == 10392) or -- Lightning Bolt Rank 8
				(spellId == 15207) or -- Lightning Bolt Rank 9
				(spellId == 15208) or -- Lightning Bolt Rank 10
				(spellId == 25448) or -- Lightning Bolt Rank 11
				(spellId == 25449) or -- Lightning Bolt Rank 12
				(spellId == 49237) or -- Lightning Bolt Rank 13
				(spellId == 49238) or -- Lightning Bolt Rank 14
				(spellId == 421) or -- Chain Lightning Rank 1
				(spellId == 930) or -- Chain Lightning Rank 2
				(spellId == 2860) or -- Chain Lightning Rank 3
				(spellId == 10605) or -- Chain Lightning Rank 4
				(spellId == 25439) or -- Chain Lightning Rank 5
				(spellId == 25442) or -- Chain Lightning Rank 6
				(spellId == 49270) or -- Chain Lightning Rank 7
				(spellId == 49271) or -- Chain Lightning Rank 8				
				(spellId == 8056) or -- Frost Shock Rank 1 
				(spellId == 8058) or -- Frost Shock Rank 2
				(spellId == 10472) or -- Frost Shock Rank 3
				(spellId == 10473) or -- Frost Shock Rank 4
				(spellId == 25464) or -- Frost Shock Rank 5
				(spellId == 49235) or -- Frost Shock Rank 6
				(spellId == 49236) or -- Frost Shock Rank 7
				(spellId == 5676) or -- Searing Pain Rank 1
				(spellId == 17919) or -- Searing Pain Rank 2
				(spellId == 17920) or -- Searing Pain Rank 3
				(spellId == 17921) or -- Searing Pain Rank 4
				(spellId == 17922) or -- Searing Pain Rank 5
				(spellId == 17923) or -- Searing Pain Rank 6
				(spellId == 27210) or -- Searing Pain Rank 7
				(spellId == 30459) or -- Searing Pain Rank 8
				(spellId == 47814) or -- Searing Pain Rank 9
				(spellId == 47815) or -- Searing Pain Rank 10
				(spellId == 348) or -- Immolate Rank 1 
				(spellId == 707) or -- Immolate Rank 2
				(spellId == 1094) or -- Immolate Rank 3
				(spellId == 2941) or -- Immolate Rank 4
				(spellId == 11665) or -- Immolate Rank 5
				(spellId == 11667) or -- Immolate Rank 6
				(spellId == 11668) or -- Immolate Rank 7
				(spellId == 25309) or -- Immolate Rank 8
				(spellId == 27215) or -- Immolate Rank 9
				(spellId == 47810) or -- Immolate Rank 10
				(spellId == 47811) or -- Immolate Rank 11
				(spellId == 6353) or -- Soul Fire Rank 1 
				(spellId == 17924) or -- Soul Fire Rank 2
				(spellId == 27211) or -- Soul Fire Rank 3 
				(spellId == 30545) or -- Soul Fire Rank 4
				(spellId == 47824) or -- Soul Fire Rank 5
				(spellId == 47825) or -- Soul Fire Rank 6
				(spellId == 17962) or -- Conflagrate Rank 1
				(spellId == 18930) or -- Conflagrate Rank 2	
				(spellId == 18931) or -- Conflagrate Rank 3
				(spellId == 18932) or -- Conflagrate Rank 4
				(spellId == 27266) or -- Conflagrate Rank 5
				(spellId == 30912) or -- Conflagrate Rank 6
				(spellId == 47828) or -- Conflagrate Rank 7
				(spellId == 47829) or -- Conflagrate Rank 8
				(spellId == 17877) or -- Shadowburn Rank 1
				(spellId == 18867) or -- Shadowburn Rank 2
				(spellId == 18868) or -- Shadowburn Rank 3
				(spellId == 18869) or -- Shadowburn Rank 4
				(spellId == 18870) or -- Shadowburn Rank 5
				(spellId == 18871) or -- Shadowburn Rank 6
				(spellId == 27263) or -- Shadowburn Rank 7 
				(spellId == 30546) or -- Shadowburn Rank 8
				(spellId == 47826) or -- Shadowburn Rank 9
				(spellId == 47827) or -- Shadowburn Rank 10
				(spellId == 686) or -- Shadow Bolt Rank 1  
				(spellId == 695) or -- Shadow Bolt Rank 2
				(spellId == 705) or -- Shadow Bolt Rank 3
				(spellId == 1088) or -- Shadow Bolt Rank 4
				(spellId == 1106) or -- Shadow Bolt Rank 5
				(spellId == 7641) or -- Shadow Bolt Rank 6
				(spellId == 11659) or -- Shadow Bolt Rank 7
				(spellId == 11660) or -- Shadow Bolt Rank 8
				(spellId == 11661) or -- Shadow Bolt Rank 9 
				(spellId == 25307) or -- Shadow Bolt Rank 10
				(spellId == 27209) or -- Shadow Bolt Rank 11
				(spellId == 47808) or -- Shadow Bolt Rank 12
				(spellId == 47809) or -- Shadow Bolt Rank 13
				--(spellId == 78) or -- Heroic Strike Rank 1
				--(spellId == 284) or -- Heroic Strike Rank 2
				--(spellId == 285) or -- Heroic Strike Rank 3
				--(spellId == 1608) or -- Heroic Strike Rank 4
				--(spellId == 11564) or -- Heroic Strike Rank 5
				--(spellId == 11565) or -- Heroic Strike Rank 6
				--(spellId == 11566) or -- Heroic Strike Rank 7
				--(spellId == 11567) or -- Heroic Strike Rank 8
				--(spellId == 25286) or -- Heroic Strike Rank 9
				--(spellId == 29707) or -- Heroic Strike Rank 10
				--(spellId == 30324) or -- Heroic Strike Rank 11
				--(spellId == 1464) or -- Slam Rank 1
				--(spellId == 8820) or -- Slam Rank 2
				--(spellId == 11604) or -- Slam Rank 3
				--(spellId == 11605) or -- Slam Rank 4
				--(spellId == 25241) or -- Slam Rank 5
				--(spellId == 25242) or -- Slam Rank 6
				--(spellId == 20230) or -- Retaliation Rank 1 
				--(spellId == 5308) or -- Execute Rank 1
				--(spellId == 20658) or -- Execute Rank 2
				--(spellId == 20660) or -- Execute Rank 3
				--(spellId == 20661) or -- Execute Rank 4
				--(spellId == 20662) or -- Execute Rank 5
				--(spellId == 25234) or -- Execute Rank 6
				--(spellId == 25236) or -- Execute Rank 7
				--(spellId == 7384) or -- Overpower Rank 1
				--(spellId == 7887) or -- Overpower Rank 2
				--(spellId == 11584) or -- Overpower Rank 3
				--(spellId == 11585) or -- Overpower Rank 4
				--(spellId == 845) or -- Cleave Rank 1
				--(spellId == 7369) or -- Cleave Rank 2
				--(spellId == 11608) or -- Cleave Rank 3
				--(spellId == 11609) or -- Cleave Rank 4
				--(spellId == 20569) or -- Cleave Rank 5
				--(spellId == 25231) or -- Cleave Rank 6			
				--(spellId == 34428) or -- Victory Rush Rank 1
				--(spellId == 20243) or -- Devastate Rank 1
				--(spellId == 30016) or -- Devastate Rank 2
				--(spellId == 30022) or -- Devastate Rank 3
				--(spellId == 1680) or -- Whirlwind Rank 1 
				--(spellId == 12294) or -- Mortal Strike Rank 1
				--(spellId == 21551) or -- Mortal Strike Rank 2
				--(spellId == 21552) or -- Mortal Strike Rank 3
				--(spellId == 21553) or -- Mortal Strike Rank 4
				--(spellId == 25248) or -- Mortal Strike Rank 5
				--(spellId == 30330) or -- Mortal Strike Rank 6
				--(spellId == 12328) or -- Sweeping Strikes Rank 1 
				(spellName == HEROIC_STRIKE) or 
				(spellName == SLAM) or 
				(spellName == RETALIATION) or 
				(spellName == EXECUTE) or 
				(spellName == OVERPOWER) or 
				(spellName == CLEAVE) or 
				(spellName == VICTORY_RUSH) or
				(spellName == RAMPAGE) or
				(spellName == DEVASTATE) or
				(spellName == WHIRLWIND) or 
				(spellName == MORTAL_STRIKE) or 
				(spellName == SWEEPING_STRIKES) or 
				(spellName == SHIELD_SLAM) or 
				(spellId == 35395) or -- Crusader Strike Rank 1
				(spellId == 31935) or -- Avenger's Shield Rank 1
				(spellId == 32699) or -- Avenger's Shield Rank 2
				(spellId == 32700) or -- Avenger's Shield Rank 3
				(spellId == 48826) or -- Avenger's Shield Rank 4
				(spellId == 48827) or -- Avenger's Shield Rank 5
				--(spellId == 23922) or -- Shield Slam Rank 1 
				--(spellId == 23923) or -- Shield Slam Rank 2
				--(spellId == 23924) or -- Shield Slam Rank 3
				--(spellId == 23925) or -- Shield Slam Rank 4
				--(spellId == 25258) or -- Shield Slam Rank 5
				--(spellId == 30356) or -- Shield Slam Rank 6
				(spellId == 879) or -- Exorcism Rank 1
				(spellId == 5614) or -- Exorcism Rank 2
				(spellId == 5615) or -- Exorcism Rank 3
				(spellId == 10312) or -- Exorcism Rank 4
				(spellId == 10313) or -- Exorcism Rank 5
				(spellId == 10314) or -- Exorcism Rank 6
				(spellId == 27138) or -- Exorcism Rank 7
				(spellId == 48800) or -- Exorcism Rank 8
				(spellId == 48801) or -- Exorcism Rank 9
				(spellId == 20375) or -- Seal of Command Rank 1
				(spellId == 20915) or -- Seal of Command Rank 2
				(spellId == 20918) or -- Seal of Command Rank 3
				(spellId == 20919) or -- Seal of Command Rank 4
				(spellId == 20920) or -- Seal of Command Rank 5
				(spellId == 27170) or -- Seal of Command Rank 6
				(spellId == 21084) or -- Seal of Righteousness Rank 1
				(spellId == 20287) or -- Seal of Righteousness Rank 2
				(spellId == 20288) or -- Seal of Righteousness Rank 3
				(spellId == 20289) or -- Seal of Righteousness Rank 4
				(spellId == 20290) or -- Seal of Righteousness Rank 5
				(spellId == 20291) or -- Seal of Righteousness Rank 6
				(spellId == 20292) or -- Seal of Righteousness Rank 7
				(spellId == 20293) or -- Seal of Righteousness Rank 8
				(spellId == 27155) or -- Seal of Righteousness Rank 9
				(spellName == ANOTHER_SPELL1) or
				(spellName == ANOTHER_SPELL2) or
				(spellName == ANOTHER_SPELL3) or
				(spellName == ANOTHER_SPELL4) or
				(spellId == 17364) or -- Stormstrike Rank 1
				(spellName == HEMORRHAGE) or
				--(spellId == 16511) or -- Hemorrhage Rank 1
				--(spellId == 17347) or -- Hemorrhage Rank 2
				--(spellId == 17348) or -- Hemorrhage Rank 3
				--(spellId == 26864) or -- Hemorrhage Rank 4
				(spellId == 20473) or -- Holy Shock Rank 1
				(spellId == 20929) or -- Holy Shock Rank 2
				(spellId == 20930) or -- Holy Shock Rank 3
				(spellId == 27174) or -- Holy Shock Rank 4
				(spellId == 48824) or -- Holy Shock Rank 6
				(spellId == 48825) or -- Holy Shock Rank 7
				--  WOTLK SPELLS
				(spellId == 50796) or -- Chaos Bolt Rank 1
				(spellId == 59170) or -- Chaos Bolt Rank 2
				(spellId == 59171) or -- Chaos Bolt Rank 3
				(spellId == 59172) or -- Chaos Bolt Rank 4
				(spellId == 44614) or -- Frostfire Bolt Rank 1
				(spellId == 47610) or -- Frostfire Bolt Rank 2
				(spellId == 45477) or -- DK Toucher de Glace Rank 1
				(spellId == 49896) or -- DK Toucher de Glace Rank 2
				(spellId == 49903) or -- DK Toucher de Glace Rank 3
				(spellId == 49904) or -- DK Toucher de Glace Rank 4
				(spellId == 49909) or -- DK Toucher de Glace Rank 5
				(spellId == 45462) or -- DK Frappe de Peste Rank 1
				(spellId == 49917) or -- DK Frappe de Peste Rank 2
				(spellId == 49918) or -- DK Frappe de Peste Rank 3
				(spellId == 49919) or -- DK Frappe de Peste Rank 4
				(spellId == 49920) or -- DK Frappe de Peste Rank 5
				(spellId == 49921) or -- DK Frappe de Peste Rank 6
				(spellId == 49998) or -- DK Frappe de Mort Rank 1
				(spellId == 49999) or -- DK Frappe de Mort Rank 2
				(spellId == 45463) or -- DK Frappe de Mort Rank 3
				(spellId == 49923) or -- DK Frappe de Mort Rank 4
				(spellId == 49924) or -- DK Frappe de Mort Rank 5
				(spellId == 55090) or -- DK Frappe du Fléau Rank 1
				(spellId == 55265) or -- DK Frappe du Fléau Rank 2
				(spellId == 55270) or -- DK Frappe du Fléau Rank 3
				(spellId == 55271) or -- DK Frappe du Fléau Rank 4
				(spellId == 45902) or -- DK Frappe de Sang Rank 1
				(spellId == 49926) or -- DK Frappe de Sang Rank 2
				(spellId == 49927) or -- DK Frappe de Sang Rank 3
				(spellId == 49928) or -- DK Frappe de Sang Rank 4
				(spellId == 49929) or -- DK Frappe de Sang Rank 5
				(spellId == 49930) or -- DK Frappe de Sang Rank 6
				(spellId == 55050) or -- DK Frappe au coeur Rank 1
				(spellId == 55258) or -- DK Frappe au coeur Rank 2
				(spellId == 55259) or -- DK Frappe au coeur Rank 3
				(spellId == 55260) or -- DK Frappe au coeur Rank 4
				(spellId == 55261) or -- DK Frappe au coeur Rank 5
				(spellId == 55262) or -- DK Frappe au coeur Rank 6
				(spellId == 49143) or -- DK Frappe de givre Rank 1
				(spellId == 51416) or -- DK Frappe de givre Rank 2
				(spellId == 51417) or -- DK Frappe de givre Rank 3
				(spellId == 51418) or -- DK Frappe de givre Rank 4
				(spellId == 51419) or -- DK Frappe de givre Rank 5
				(spellId == 55268) or -- DK Frappe de givre Rank 6
				(spellId == 49184) or -- DK Rafale Hurlante Rank 1
				(spellId == 51408) or -- DK Rafale Hurlante Rank 2
				(spellId == 51409) or -- DK Rafale Hurlante Rank 3
				(spellId == 51410) or -- DK Rafale Hurlante Rank 4
				(spellId == 51411) or -- DK Rafale Hurlante Rank 5
				(spellId == 52375) or -- DK Voile Mortel Rank 1
				(spellId == 49892) or -- DK Voile Mortel Rank 2
				(spellId == 49893) or -- DK Voile Mortel Rank 3
				(spellId == 49894) or -- DK Voile Mortel Rank 4
				(spellId == 49895) or -- DK Voile Mortel Rank 5
				(spellId == 56815) or -- DK Frappe Runique Rank 1
				(spellId == 49020) or -- DK Anéantissement Rank 1
				(spellId == 51423) or -- DK Anéantissement Rank 2
				(spellId == 51424) or -- DK Anéantissement Rank 3
				(spellId == 51425) or -- DK Anéantissement Rank 4
				(spellId == 33072)) then -- Holy Shock Rank 5
					if (GetComboPoints("Player") == 5) then
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
							SMMessageFrame:AddMessage("5Combos Points - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
					end
				CritDmg = tonumber(amount);
				LastDmg = tonumber(amount);
				CritCombo = CritCombo + 1;
				CritComboDmg = CritComboDmg + amount;
					if (CritCombo >= 1) then
					SMSoundAndDisplayDamage();
					end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].White_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg18
		if ((eventType == "RANGE_DAMAGE") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 5019) or -- Shoot
					(spellId == 75)) then -- Auto Shot Rank 1
					CritDmg = tonumber(amount);
					LastDmg = tonumber(amount);
					CritCombo = CritCombo + 1;
					CritComboDmg = CritComboDmg + amount;
					if (CritCombo >= 1) then
						SMSoundAndDisplayDamage();
					end
				end
			else
				if ((spellId == 5019) or -- Shoot
					(spellId == 75)) then -- Auto Shot Rank 1
					if (CritCombo ~= 0) then
						SMCompare_Combos();
					end
					if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
						SMMessageFrame:AddMessage(" [" .. amount .. "] Damage" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
					end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].White_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
		local eventType = arg2
		local sourceFlags = arg5
		local sourceName = arg4
		local amount = arg9
		local critical = arg15
		if ((eventType == "SWING_DAMAGE") and (sourceName == UnitName("player"))) and not (arg3 == UnitGUID("pet")) then
			if (critical ~= nil) then
				if (GetComboPoints("Player") == 5) then
					if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
						PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
					end
					if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
					end
				end
				CritDmg = tonumber(amount);
				LastDmg = tonumber(amount);
				CritCombo = CritCombo + 1;
				CritComboDmg = CritComboDmg + amount;
				if (CritCombo >= 1) then
					SMSoundAndDisplayDamage();
				end
			else
				if (SMData[SMPlayerRealm][SMPlayerName].No_White_Normal == false) then
					if (GetComboPoints("Player") == 5) then
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
							PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
						end
						if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
							SMMessageFrame:AddMessage("5Combos Points - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
					end
					if (CritCombo ~= 0) then
						SMCompare_Combos();
					end
					if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
						SMMessageFrame:AddMessage(" [" .. amount .. "] Damage" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
					end
				end
			end
		end
	end
end


if ((SMData[SMPlayerRealm][SMPlayerName].White_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg18
		if ((eventType == "RANGE_DAMAGE") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 5019) or -- Shoot
					(spellId == 75)) then -- Auto Shot Rank 1
					CritDmg = tonumber(amount);
					LastDmg = tonumber(amount);
					CritCombo = CritCombo + 1;
					CritComboDmg = CritComboDmg + amount;
					if (CritCombo >= 1) then
						SMSoundAndDisplayDamage();
					end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].White_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceGUID = arg3
	local sourceName = arg4
	local amount = arg9
	local critical = arg15
		if ((eventType == "SWING_DAMAGE") and (sourceName == UnitName("player"))) and not (arg3 == UnitGUID("pet")) then
			if (critical ~= nil) then
				if (GetComboPoints("Player") == 5) then
					if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue == true) then
						PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\finishhim.wav");
					end
					if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue == true) then
						SMMessageFrame:AddMessage("5Combos Points - Finish Him!", DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
					end
				end
				CritDmg = tonumber(amount);
				LastDmg = tonumber(amount);
				CritCombo = CritCombo + 1;
				CritComboDmg = CritComboDmg + amount;
				if (CritCombo >= 1) then
					SMSoundAndDisplayDamage();
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Heal == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == false)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg14
		if ((eventType == "SPELL_HEAL") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						CritDmgHeal = tonumber(amount);
						LastDmg = tonumber(amount);
						CritComboHeal = CritComboHeal + 1;
						CritComboHealDmg = CritComboHealDmg + amount;
						if (CritComboHeal >= 1) then
							SMSoundAndDisplayHealing();
						end
				end
			else
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						if (CritComboHeal ~= 0) then
							SMCompare_Combos();
						end
						if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
							SMMessageFrame:AddMessage(" [" .. amount .. "] Healing" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
				end
			end
		end
	end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == false)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg14
		if ((eventType == "SPELL_HEAL") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						CritDmgHeal = tonumber(amount);
						LastDmg = tonumber(amount);
						CritComboHeal = CritComboHeal + 1;
						CritComboHealDmg = CritComboHealDmg + amount;
						if (CritComboHeal >= 1) then
						SMSoundAndDisplayHealing();
						end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Heal == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == true)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg14
		if ((eventType == "SPELL_HEAL") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						CritDmg = tonumber(amount);
						LastDmg = tonumber(amount);
						CritCombo = CritCombo + 1;
						CritComboDmg = CritComboDmg + amount;
						if (CritCombo >= 1) then
						SMSoundAndDisplay();
						end
				end
			else
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						if (CritCombo ~= 0) then
							SMCompare_Combos();
						end
						if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
							SMMessageFrame:AddMessage(" [" .. amount .. "] Healing" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
						end
				end
			end
		end
	end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == true)) then
	if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
	local eventType = arg2
	local sourceName = arg4
	local spellId = arg9
	local spellName = arg10
	local amount = arg12
	local critical = arg14
		if ((eventType == "SPELL_HEAL") and (sourceName == UnitName("player"))) then
			if (critical ~= nil) then
				if ((spellId == 2061) or -- Flash  Heal Rank 1
					(spellId == 9472) or -- Flash  Heal Rank 2
					(spellId == 9473) or -- Flash  Heal Rank 3
					(spellId == 9474) or -- Flash  Heal Rank 4
					(spellId == 10915) or -- Flash  Heal Rank 5
					(spellId == 10916) or -- Flash  Heal Rank 6
					(spellId == 10917) or -- Flash  Heal Rank 7
					(spellId == 25233) or -- Flash  Heal Rank 8
					(spellId == 25235) or -- Flash  Heal Rank 9
					(spellId == 48070) or -- Flash  Heal Rank 10
					(spellId == 48071) or -- Flash  Heal Rank 11
					(spellId == 2050) or -- Lesser  Heal Rank 1
					(spellId == 2052) or -- Lesser  Heal Rank 2
					(spellId == 2053) or -- Lesser  Heal Rank 3
					(spellId == 13908) or -- Desperate Prayer Rank 1
					(spellId == 19236) or -- Desperate Prayer Rank 2
					(spellId == 19238) or -- Desperate Prayer Rank 3
					(spellId == 19240) or -- Desperate Prayer Rank 4
					(spellId == 19241) or -- Desperate Prayer Rank 5
					(spellId == 19242) or -- Desperate Prayer Rank 6
					(spellId == 19243) or -- Desperate Prayer Rank 7
					(spellId == 25437) or -- Desperate Prayer Rank 8
					(spellId == 48173) or -- Desperate Prayer Rank 9
					(spellId == 2054) or -- Heal Rank 1
					(spellId == 2055) or -- Heal Rank 2
					(spellId == 6063) or -- Heal Rank 3
					(spellId == 6064) or -- Heal Rank 4
					(spellId == 2060) or -- Greater Heal Rank 1
					(spellId == 10963) or -- Greater Heal Rank 2
					(spellId == 10964) or -- Greater Heal Rank 3
					(spellId == 10965) or -- Greater Heal Rank 4
					(spellId == 25314) or -- Greater Heal Rank 5
					(spellId == 25210) or -- Greater Heal Rank 6
					(spellId == 25213) or -- Greater Heal Rank 7
					(spellId == 48062) or -- Greater Heal Rank 8
					(spellId == 48063) or -- Greater Heal Rank 9
					(spellId == 635) or -- Holy Light Rank 1
					(spellId == 639) or -- Holy Light Rank 2
					(spellId == 647) or -- Holy Light Rank 3
					(spellId == 1026) or -- Holy Light Rank 4
					(spellId == 1042) or -- Holy Light Rank 5
					(spellId == 3472) or -- Holy Light Rank 6
					(spellId == 10328) or -- Holy Light Rank 7
					(spellId == 10329) or -- Holy Light Rank 8
					(spellId == 25292) or -- Holy Light Rank 9
					(spellId == 27135) or -- Holy Light Rank 10
					(spellId == 27136) or -- Holy Light Rank 11
					(spellId == 48781) or -- Holy Light Rank 12
					(spellId == 48782) or -- Holy Light Rank 13
					(spellId == 633) or -- Lay on Hands Rank 1
					(spellId == 2800) or -- Lay on Hands Rank 2
					(spellId == 10310) or -- Lay on Hands Rank 3
					(spellId == 27154) or -- Lay on Hands Rank 4
					(spellId == 48788) or -- Lay on Hands Rank 5
					(spellId == 19750) or -- Flash of Light Rank 1
					(spellId == 19939) or -- Flash of Light Rank 2
					(spellId == 19940) or -- Flash of Light Rank 3
					(spellId == 19941) or -- Flash of Light Rank 4
					(spellId == 19942) or -- Flash of Light Rank 5
					(spellId == 19943) or -- Flash of Light Rank 6
					(spellId == 27137) or -- Flash of Light Rank 7
					(spellId == 48784) or -- Flash of Light Rank 8
					(spellId == 48785) or -- Flash of Light Rank 9
					(spellId == 331) or -- Healing Wave Rank 1
					(spellId == 332) or -- Healing Wave Rank 2
					(spellId == 547) or -- Healing Wave Rank 3
					(spellId == 913) or -- Healing Wave Rank 4
					(spellId == 939) or -- Healing Wave Rank 5
					(spellId == 959) or -- Healing Wave Rank 6
					(spellId == 8005) or -- Healing Wave Rank 7
					(spellId == 10395) or -- Healing Wave Rank 8
					(spellId == 10396) or -- Healing Wave Rank 9
					(spellId == 25357) or -- Healing Wave Rank 10
					(spellId == 25391) or -- Healing Wave Rank 11
					(spellId == 25396) or -- Healing Wave Rank 12
					(spellId == 49272) or -- Healing Wave Rank 13
					(spellId == 49273) or -- Healing Wave Rank 14
					(spellId == 8004) or -- Lesser Healing Wave Rank 1
					(spellId == 8008) or -- Lesser Healing Wave Rank 2
					(spellId == 8010) or -- Lesser Healing Wave Rank 3
					(spellId == 10466) or -- Lesser Healing Wave Rank 4
					(spellId == 10467) or -- Lesser Healing Wave Rank 5
					(spellId == 10468) or -- Lesser Healing Wave Rank 6
					(spellId == 25420) or -- Lesser Healing Wave Rank 7
					(spellId == 49275) or -- Lesser Healing Wave Rank 8
					(spellId == 49276) or -- Lesser Healing Wave Rank 9
					(spellId == 1064) or -- Chain Heal Rank 1
					(spellId == 10622) or -- Chain Heal Rank 2
					(spellId == 10623) or -- Chain Heal Rank 3
					(spellId == 25422) or -- Chain Heal Rank 4
					(spellId == 25423) or -- Chain Heal Rank 5
					(spellId == 55458) or -- Chain Heal Rank 6
					(spellId == 55459) or -- Chain Heal Rank 7
					(spellId == 5185) or -- Healing Touch Rank 1
					(spellId == 5186) or -- Healing Touch Rank 2
					(spellId == 5187) or -- Healing Touch Rank 3
					(spellId == 5188) or -- Healing Touch Rank 4
					(spellId == 5189) or -- Healing Touch Rank 5
					(spellId == 6778) or -- Healing Touch Rank 6
					(spellId == 8903) or -- Healing Touch Rank 7
					(spellId == 9758) or -- Healing Touch Rank 8
					(spellId == 9888) or -- Healing Touch Rank 9
					(spellId == 9889) or -- Healing Touch Rank 10
					(spellId == 25297) or -- Healing Touch Rank 11
					(spellId == 26978) or -- Healing Touch Rank 12
					(spellId == 26979) or -- Healing Touch Rank 13
					(spellId == 48377) or -- Healing Touch Rank 14
					(spellId == 48378) or -- Healing Touch Rank 15
					(spellId == 8936) or -- Regrowth Rank 1
					(spellId == 8938) or -- Regrowth Rank 2
					(spellId == 8939) or -- Regrowth Rank 3
					(spellId == 8940) or -- Regrowth Rank 4
					(spellId == 8941) or -- Regrowth Rank 5
					(spellId == 9750) or -- Regrowth Rank 6
					(spellId == 9856) or -- Regrowth Rank 7
					(spellId == 9857) or -- Regrowth Rank 8
					(spellId == 9858) or -- Regrowth Rank 9
					(spellId == 26980) or -- Regrowth Rank 10
					(spellId == 48442) or -- Regrowth Rank 11
					(spellId == 48443) or -- Regrowth Rank 12
					(spellName == MOREHEALINGSPELL) or 
					(spellName == MOREHEALINGSPELL2) or 
					(spellName == MOREHEALINGSPELL3) or 
					(spellId == 18562)) then -- Swiftmend Rank 1
						CritDmg = tonumber(amount);
						LastDmg = tonumber(amount);
						CritCombo = CritCombo + 1;
						CritComboDmg = CritComboDmg + amount;
						if (CritCombo >= 1) then
						SMSoundAndDisplay();
						end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Heal == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == false)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false) then
		if (event == "CHAT_MSG_SPELL_SELF_BUFF") then
			CurrentSpell = 0;
			for spellname, damage in string.gmatch(arg1, HEAL_HIT_SELF)do
			CurrentSpell = tostring(spellname);
				if ((CurrentSpell == FLASHHEAL) or 
				(CurrentSpell == LESSERHEAL) or
				(CurrentSpell == DESPERATEPRAYER) or
				(CurrentSpell == HEAL) or
				(CurrentSpell == GREATERHEAL) or
				(CurrentSpell == HOLYLIGHT) or
				(CurrentSpell == LAYONHANDS) or
				(CurrentSpell == FLASHOFLIGHT) or
				(CurrentSpell == HEALINGWAVE) or
				(CurrentSpell == LESSERHEALINGWAVE) or
				(CurrentSpell == CHAINHEAL) or
				(CurrentSpell == HEALINGTOUCH) or
				(CurrentSpell == REGROWTH) or
				(CurrentSpell == MOREHEALINGSPELL) or 
				(CurrentSpell == MOREHEALINGSPELL2) or 
				(CurrentSpell == MOREHEALINGSPELL3) or 
				(CurrentSpell == SWIFTMEND)) then
					if (CritComboHeal ~= 0) then
					SMCompare_Combos();
					end
					if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
					SMMessageFrame:AddMessage(" [" .. damage .. "] Healing" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
					end
				end
			end
			for spellname, damage in string.gmatch(arg1, HEAL_CRIT_SELF)do
			CurrentSpell = tostring(spellname);
				if ((CurrentSpell == FLASHHEAL) or 
				(CurrentSpell == LESSERHEAL) or
				(CurrentSpell == DESPERATEPRAYER) or
				(CurrentSpell == HEAL) or
				(CurrentSpell == GREATERHEAL) or
				(CurrentSpell == HOLYLIGHT) or
				(CurrentSpell == LAYONHANDS) or
				(CurrentSpell == FLASHOFLIGHT) or
				(CurrentSpell == HEALINGWAVE) or
				(CurrentSpell == LESSERHEALINGWAVE) or
				(CurrentSpell == CHAINHEAL) or
				(CurrentSpell == HEALINGTOUCH) or
				(CurrentSpell == REGROWTH) or
				(CurrentSpell == MOREHEALINGSPELL) or 
				(CurrentSpell == MOREHEALINGSPELL2) or 
				(CurrentSpell == MOREHEALINGSPELL3) or 
				(CurrentSpell == SWIFTMEND)) then
					CritDmgHeal = tonumber(damage);
					LastDmg = tonumber(damage);
					CritComboHeal = CritComboHeal + 1;
					CritComboHealDmg = CritComboHealDmg + damage;
					if (CritComboHeal >= 1) then
					SMSoundAndDisplayHealing();
					end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == false)) then
	if (event == "CHAT_MSG_SPELL_SELF_BUFF") then
		CurrentSpell = 0;
		for spellname, damage in string.gmatch(arg1, HEAL_CRIT_SELF)do
		CurrentSpell = tostring(spellname);
			if ((CurrentSpell == FLASHHEAL) or 
			(CurrentSpell == LESSERHEAL) or
			(CurrentSpell == DESPERATEPRAYER) or
			(CurrentSpell == HEAL) or
			(CurrentSpell == GREATERHEAL) or
			(CurrentSpell == HOLYLIGHT) or
			(CurrentSpell == LAYONHANDS) or
			(CurrentSpell == FLASHOFLIGHT) or
			(CurrentSpell == HEALINGWAVE) or
			(CurrentSpell == LESSERHEALINGWAVE) or
			(CurrentSpell == CHAINHEAL) or
			(CurrentSpell == HEALINGTOUCH) or 
			(CurrentSpell == REGROWTH) or
			(CurrentSpell == MOREHEALINGSPELL) or 
			(CurrentSpell == MOREHEALINGSPELL2) or 
			(CurrentSpell == MOREHEALINGSPELL3) or 
			(CurrentSpell == SWIFTMEND)) then
				CritDmgHeal = tonumber(damage);
				LastDmg = tonumber(damage);
				CritComboHeal = CritComboHeal + 1;
				CritComboHealDmg = CritComboHealDmg + damage;
				if (CritComboHeal >= 1) then
				SMSoundAndDisplayHealing();
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Heal == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == true)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == false) then
		if (event == "CHAT_MSG_SPELL_SELF_BUFF") then
			CurrentSpell = 0;
			for spellname, damage in string.gmatch(arg1, HEAL_HIT_SELF)do
			CurrentSpell = tostring(spellname);
				if ((CurrentSpell == FLASHHEAL) or 
				(CurrentSpell == LESSERHEAL) or
				(CurrentSpell == DESPERATEPRAYER) or
				(CurrentSpell == HEAL) or
				(CurrentSpell == GREATERHEAL) or
				(CurrentSpell == HOLYLIGHT) or
				(CurrentSpell == LAYONHANDS) or
				(CurrentSpell == FLASHOFLIGHT) or
				(CurrentSpell == HEALINGWAVE) or
				(CurrentSpell == LESSERHEALINGWAVE) or
				(CurrentSpell == CHAINHEAL) or
				(CurrentSpell == HEALINGTOUCH) or 
				(CurrentSpell == REGROWTH) or
				(CurrentSpell == MOREHEALINGSPELL) or 
				(CurrentSpell == MOREHEALINGSPELL2) or 
				(CurrentSpell == MOREHEALINGSPELL3) or 
				(CurrentSpell == SWIFTMEND)) then
					if (CritCombo ~= 0) then
					SMCompare_Combos();
					end
					if ((SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
					SMMessageFrame:AddMessage(" [" .. damage .. "] Healing" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
					end
				end
			end
			for spellname, damage in string.gmatch(arg1, HEAL_CRIT_SELF)do
			CurrentSpell = tostring(spellname);
				if ((CurrentSpell == FLASHHEAL) or 
				(CurrentSpell == LESSERHEAL) or
				(CurrentSpell == DESPERATEPRAYER) or
				(CurrentSpell == HEAL) or
				(CurrentSpell == GREATERHEAL) or
				(CurrentSpell == HOLYLIGHT) or
				(CurrentSpell == LAYONHANDS) or
				(CurrentSpell == FLASHOFLIGHT) or
				(CurrentSpell == HEALINGWAVE) or
				(CurrentSpell == LESSERHEALINGWAVE) or
				(CurrentSpell == CHAINHEAL) or
				(CurrentSpell == HEALINGTOUCH) or 
				(CurrentSpell == REGROWTH) or
				(CurrentSpell == MOREHEALINGSPELL) or 
				(CurrentSpell == MOREHEALINGSPELL2) or 
				(CurrentSpell == MOREHEALINGSPELL3) or 
				(CurrentSpell == SWIFTMEND)) then
					CritDmg = tonumber(damage);
					LastDmg = tonumber(damage);
					CritCombo = CritCombo + 1;
					CritComboDmg = CritComboDmg + damage;
					if (CritCombo >= 1) then
					SMSoundAndDisplayDamage();
					end
				end
			end
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits == true) and (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == true)) then
	if (event == "CHAT_MSG_SPELL_SELF_BUFF") then
		CurrentSpell = 0;
		for spellname, damage in string.gmatch(arg1, HEAL_CRIT_SELF)do
		CurrentSpell = tostring(spellname);
			if ((CurrentSpell == FLASHHEAL) or 
			(CurrentSpell == LESSERHEAL) or
			(CurrentSpell == DESPERATEPRAYER) or
			(CurrentSpell == HEAL) or
			(CurrentSpell == GREATERHEAL) or
			(CurrentSpell == HOLYLIGHT) or
			(CurrentSpell == LAYONHANDS) or
			(CurrentSpell == FLASHOFLIGHT) or
			(CurrentSpell == HEALINGWAVE) or
			(CurrentSpell == LESSERHEALINGWAVE) or
			(CurrentSpell == CHAINHEAL) or
			(CurrentSpell == HEALINGTOUCH) or 
			(CurrentSpell == REGROWTH) or
			(CurrentSpell == MOREHEALINGSPELL) or 
			(CurrentSpell == MOREHEALINGSPELL2) or 
			(CurrentSpell == MOREHEALINGSPELL3) or 
			(CurrentSpell == SWIFTMEND)) then
				CritDmg = tonumber(damage);
				LastDmg = tonumber(damage);
				CritCombo = CritCombo + 1;
				CritComboDmg = CritComboDmg + damage;
				if (CritCombo >= 1) then
				SMSoundAndDisplayDamage();
				end	
			end
		end
	end
end

	if (event == "PLAYER_REGEN_ENABLED") then
		if ((SMData[SMPlayerRealm][SMPlayerName].Reset_Combo == true) and (CritCombo ~= 0)) then
			SMCompare_Combos();
		end
		if ((SMData[SMPlayerRealm][SMPlayerName].Reset_Combo == true) and (CritComboHeal ~= 0)) then
			SMCompare_Combos();
		end
	end
end

function SMMiniMap()
	if arg1=="LeftButton" then
		CritCombo = 0;
		CritComboDmg = 0;
		CritComboHeal = 0;
		CritComboHealDmg = 0;
		KillingBlow = 0;
		DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod |cFFFFFFFF: All Combos : |cFF00FF00Now |cFFFF0000Reset.", .2, .0);
			elseif arg1=="RightButton" then
			ShowUIPanel(ShaderModOptionsFrame);
	end
end

function SMSoundAndDisplayDamage()
	if (CritCombo > 0 and CritCombo < 2) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Yeah == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\yeah.wav");
		end
		CritMsg = "Yeah!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Yeah == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 1 and CritCombo < 3) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Oh_Yeah == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ohyeah.wav");
		end
		CritMsg = "Oh Yeah!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Oh_Yeah == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 2 and CritCombo < 4) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Unstoppable == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\unstoppable.wav");
		end
		CritMsg = "Unstoppable!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Unstoppable == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 3 and CritCombo < 5) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Killing_Spree == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\killer.wav");
		end
		CritMsg = "Killing Spree!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Killing_Spree == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 4 and CritCombo < 6) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Dominating == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\dominating.wav");
		end
		CritMsg = "Dominating!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Dominating == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 5 and CritCombo < 7) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ultra_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ultrakill.wav");
		end
		CritMsg = "Ultra Kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ultra_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 6 and CritCombo < 8) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Wicked_Sick == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\wickedsick.wav");
		end
		CritMsg = "Wicked Sick!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Wicked_Sick == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 7 and CritCombo < 10) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_God_Like == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\godlike.wav");
		end
		CritMsg = "God Like!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_God_Like == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 9 and CritCombo < 15) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Holy_Shit == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\holyshit.wav");
		end
		CritMsg = "Holy Shit!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Holy_Shit == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 14 and CritCombo < 20) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Monster_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\monsterkill.wav");
		end
		CritMsg = "Mm-mmm-Monster Kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Monster_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 19 and CritCombo < 22) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ludicrous_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ludicrouskill.wav");
		end
		CritMsg = "Lu-lu-lu-lu-ludicrous kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ludicrous_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritCombo > 21) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ownage == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ownage.wav");
		end
		CritMsg = "Ownage!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ownage == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo .. " [" .. CritComboDmg .. "] Total Damage (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end	
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsg .. " x" .. CritCombo, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
end

function SMSoundAndDisplayHealing()
	if (CritComboHeal > 0 and CritComboHeal < 2) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Yeah == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\yeah.wav");
		end
		CritMsgHeal = "Yeah!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Yeah == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 1 and CritComboHeal < 3) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Oh_Yeah == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ohyeah.wav");
		end
		CritMsgHeal = "Oh Yeah!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Oh_Yeah == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 2 and CritComboHeal < 4) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Unstoppable == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\unstoppable.wav");
		end
		CritMsgHeal = "Unstoppable!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Unstoppable == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 3 and CritComboHeal < 5) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Killing_Spree == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\killer.wav");
		end
		CritMsgHeal = "Killing Spree!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Killing_Spree == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 4 and CritComboHeal < 6) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Dominating == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\dominating.wav");
		end
		CritMsgHeal = "Dominating!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Dominating == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 5 and CritComboHeal < 7) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ultra_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ultrakill.wav");
		end
		CritMsgHeal = "Ultra Kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ultra_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 6 and CritComboHeal < 8) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Wicked_Sick == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\wickedsick.wav");
		end
		CritMsgHeal = "Wicked Sick!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Wicked_Sick == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 7 and CritComboHeal < 10) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_God_Like == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\godlike.wav");
		end
		CritMsgHeal = "God Like!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_God_Like == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 9 and CritComboHeal < 15) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Holy_Shit == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\holyshit.wav");
		end
		CritMsgHeal = "Holy Shit!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Holy_Shit == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 14 and CritComboHeal < 20) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Monster_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\monsterkill.wav");
		end
		CritMsgHeal = "Mm-mmm-Monster Kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Monster_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 19 and CritComboHeal < 22) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ludicrous_Kill == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ludicrouskill.wav");
		end
		CritMsgHeal = "Lu-lu-lu-lu-ludicrous kill!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ludicrous_Kill == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (CritComboHeal > 21) then
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ownage == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ownage.wav");
		end
		CritMsgHeal = "Ownage!";
		if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ownage == true) then
			if ((SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display == true)) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal .. " [" .. CritComboHealDmg .. "] Total Healing (+" .. LastDmg .. ")" , DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display == true) then
				SMMessageFrame:AddMessage(CritMsgHeal .. " x" .. CritComboHeal, DISPLAY_RED, DISPLAY_GREEN, DISPLAY_BLUE, 1, 3);
			end
		end
	end
end


function SMCompare_Combos()
	extra_crits_toggle = 0;
	if (CritCombo >= SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo and CritComboDmg >= SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg) then
		SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo = CritCombo;
		SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg = CritComboDmg;
		SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo = CritCombo;
		SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg = CritComboDmg;
	else
		if (CritCombo >= SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo) then
			if (CritCombo == SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo) then
				if (CritComboDmg > SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg) then
					SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo = CritCombo;
					SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg = CritComboDmg;
				end
			end
			if (CritCombo > SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo) then
				SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo = CritCombo;
				SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg = CritComboDmg;
			end
		end
		
		if (CritComboDmg >= SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg) then
			if (CritComboDmg == SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg) then
				if (CritCombo > SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo) then
					SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo = CritCombo;
					SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg = CritComboDmg;
				end
			end
			if (CritComboDmg > SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg) then
				SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo = CritCombo;
				SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg = CritComboDmg;
			end
		end
	end

	if (CritComboHeal >= SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal and CritComboHealDmg >= SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg) then
		SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal = CritComboHeal;
		SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg = CritComboHealDmg;
		SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal = CritComboHeal;
		SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg = CritComboHealDmg;
	else
		if (CritComboHeal >= SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal) then
			if (CritComboHeal == SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal) then
				if (CritComboHealDmg > SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg) then
					SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal = CritComboHeal;
					SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg = CritComboHealDmg;
				end
			end
			if (CritComboHeal > SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal) then
				SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal = CritComboHeal;
				SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg = CritComboHealDmg;
			end
		end
		
		if (CritComboHealDmg >= SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg) then
			if (CritComboHealDmg == SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg) then
				if (CritComboHeal > SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal) then
					SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal = CritComboHeal;
					SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg = CritComboHealDmg;
				end
			end
			if (CritComboHealDmg > SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg) then
				SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal = CritComboHeal;
				SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg = CritComboHealDmg;
			end
		end
	end
	
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "0") then
	Splash = 0
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "1") then
	Splash = 1
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "2") then
	Splash = 2
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "3") then
	Splash = 3
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "4") then
	Splash = 4
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "5") then
	Splash = 5
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "6") then
	Splash = 6
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "7") then
	Splash = 7
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "8") then
	Splash = 8
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "9") then
	Splash = 9
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "10") then
	Splash = 10
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "11") then
	Splash = 11
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "12") then
	Splash = 12
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "13") then
	Splash = 13
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "14") then
	Splash = 14
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "15") then
	Splash = 15
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "16") then
	Splash = 16
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "17") then
	Splash = 17
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "18") then
	Splash = 18
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "19") then
	Splash = 19
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "20") then
	Splash = 20
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "21") then
	Splash = 21
end
if (SMData[SMPlayerRealm][SMPlayerName]["Splash"] == "22") then
	Splash = 22
end

if not(Splash > 1) then
	if ((CritCombo > 0 and CritCombo < 2) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Yeah == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\yeah.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Yeah!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 2) then
	if ((CritCombo > 1 and CritCombo < 3) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Oh_Yeah == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ohyeah.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Oh Yeah!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 3) then
	if ((CritCombo > 2 and CritCombo < 4) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Unstoppable == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\unstoppable.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Unstoppable!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 4) then
	if ((CritCombo > 3 and CritCombo < 5) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Killing_Spree == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\killer.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Killing Spree!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 5) then
	if ((CritCombo > 4 and CritCombo < 6) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Dominating == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\dominating.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Dominating!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 6) then
	if ((CritCombo > 5 and CritCombo < 7) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ultra_Kill == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ultrakill.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Ultra Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 7) then
	if ((CritCombo > 6 and CritCombo < 8) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Wicked_Sick == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\wickedsick.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Wicked Sick!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 8) then
	if ((CritCombo > 7 and CritCombo < 10) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_God_Like == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\godlike.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("God Like!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 10) then
	if ((CritCombo > 9 and CritCombo < 15) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Holy_Shit == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\holyshit.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Holy Shit!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 15) then
	if ((CritCombo > 14 and CritCombo < 20) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Monster_Kill == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\monsterkill.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Mm-Mmm-Monster Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 20) then
	if ((CritCombo > 19 and CritCombo < 22) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ludicrous_Kill == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\LudicrousKill.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Lu-Lu-Lu-Ludicrous Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
if not(Splash > 21) then
	if ((CritCombo > 21) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display == true)) then
		if ((SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ownage == true) and (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound == true)) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\Ownage.wav");
		end
		ShaderModMessageFrame:AddMessage("Damage: " .. CritComboDmg, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Combo: " .. CritCombo, 1, 1, 1, 1, 3);
		ShaderModMessageFrame:AddMessage("Ownnnaaaaaggge!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end
	
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "0") then
	Annonce = 0
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "1") then
	Annonce = 1
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "2") then
	Annonce = 2
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "3") then
	Annonce = 3
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "4") then
	Annonce = 4
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "5") then
	Annonce = 5
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "6") then
	Annonce = 6
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "7") then
	Annonce = 7
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "8") then
	Annonce = 8
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "9") then
	Annonce = 9
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "10") then
	Annonce = 10
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "11") then
	Annonce = 11
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "12") then
	Annonce = 12
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "13") then
	Annonce = 13
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "14") then
	Annonce = 14
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "15") then
	Annonce = 15
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "16") then
	Annonce = 16
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "17") then
	Annonce = 17
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "18") then
	Annonce = 18
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "19") then
	Annonce = 19
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "20") then
	Annonce = 20
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "21") then
	Annonce = 21
end
if (SMData[SMPlayerRealm][SMPlayerName]["AnnounceBox"] == "22") then
	Annonce = 22
end

	
if ((SMData[SMPlayerRealm][SMPlayerName].Announce_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Heal == false)) then
	Channel = GetChannelName(SMData[SMPlayerRealm][SMPlayerName]["Channel"]);
	if ((CritCombo > 21)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 19 and CritCombo < 22)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 14 and CritCombo < 19)) then
		if not(Annonce > 15) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 9 and CritCombo < 15)) then
		if not(Annonce > 10) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 7 and CritCombo < 10)) then
		if not(Annonce > 8) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("God Like!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("God Like!!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("God Like!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritCombo > 6 and CritCombo < 8)) then
		if not(Annonce > 7) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritCombo > 5 and CritCombo < 7)) then 
		if not(Annonce > 6) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end 
	end
	if ((CritCombo > 4 and CritCombo < 6)) then 
		if not(Annonce > 5) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 3 and CritCombo < 5)) then 
		if not(Annonce > 4)then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 2 and CritCombo < 4)) then
		if not(Annonce > 3) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 1 and CritCombo < 3)) then
		if not(Annonce > 2) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end	
	end
	if ((CritCombo > 0 and CritCombo < 2)) then 
		if not(Annonce > 1) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
end

if ((SMData[SMPlayerRealm][SMPlayerName].Announce_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Heal == true)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == true) then
	Channel = GetChannelName(SMData[SMPlayerRealm][SMPlayerName]["Channel"]);
	if ((CritCombo > 21)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ownage!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 19 and CritCombo < 22)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 14 and CritCombo < 19)) then
		if not(Annonce > 15) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 9 and CritCombo < 15)) then
		if not(Annonce > 10) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Holy Shit!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 7 and CritCombo < 10)) then
		if not(Annonce > 8) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("God Like!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("God Like!!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("God Like!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritCombo > 6 and CritCombo < 8)) then
		if not(Annonce > 7) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Wicked Sick!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritCombo > 5 and CritCombo < 7)) then 
		if not(Annonce > 6) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ultra Kill!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end 
	end
	if ((CritCombo > 4 and CritCombo < 6)) then 
		if not(Annonce > 5) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Dominating!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 3 and CritCombo < 5)) then 
		if not(Annonce > 4)then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Killing Spree!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 2 and CritCombo < 4)) then
		if not(Annonce > 3) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Unstoppable!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritCombo > 1 and CritCombo < 3)) then
		if not(Annonce > 2) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Oh Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end	
	end
	if ((CritCombo > 0 and CritCombo < 2)) then 
		if not(Annonce > 1) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "RAID", nil, Channel);
			end
			SendChatMessage("Yeah!  *" .. CritCombo .. "* crits for *" .. CritComboDmg .. "* total damage! ", "CHANNEL", nil, Channel);
		end
	end
	end
 end

if ((SMData[SMPlayerRealm][SMPlayerName].Announce_Display == true) and (SMData[SMPlayerRealm][SMPlayerName].Heal == true)) then
	if (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos == false) then
	Channel = GetChannelName(SMData[SMPlayerRealm][SMPlayerName]["Channel"]);
	if ((CritComboHeal > 21)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ownage!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ownage!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ownage!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 19 and CritComboHeal < 22)) then
		if not(Annonce > 21) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Lu-lu-lu-lu-ludicrous Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 14 and CritComboHeal < 19)) then
		if not(Annonce > 15) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Mm-mmm-Monster Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 9 and CritComboHeal < 15)) then
		if not(Annonce > 10) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Holy Shit!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Holy Shit!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Holy Shit!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 7 and CritComboHeal < 10)) then
		if not(Annonce > 8) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("God Like!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("God Like!!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("God Like!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritComboHeal > 6 and CritComboHeal < 8)) then
		if not(Annonce > 7) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Wicked Sick!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Wicked Sick!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Wicked Sick!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel); 
		end
	end
	if ((CritComboHeal > 5 and CritComboHeal < 7)) then 
		if not(Annonce > 6) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Ultra Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Ultra Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Ultra Kill!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end 
	end
	if ((CritComboHeal > 4 and CritComboHeal < 6)) then 
		if not(Annonce > 5) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Dominating!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Dominating!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Dominating!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 3 and CritComboHeal < 5)) then 
		if not(Annonce > 4)then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Killing Spree!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Killing Spree!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Killing Spree!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 2 and CritComboHeal < 4)) then
		if not(Annonce > 3) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Unstoppable!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Unstoppable!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Unstoppable!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	if ((CritComboHeal > 1 and CritComboHeal < 3)) then
		if not(Annonce > 2) then 
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Oh Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Oh Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Oh Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end	
	end
	if ((CritComboHeal > 0 and CritComboHeal < 2)) then 
		if not(Annonce > 1) then
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "PARTY") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Party") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "party")) then
			SendChatMessage("Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "PARTY", nil, Channel);
			end
			if ((SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "RAID") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "Raid") or (SMData[SMPlayerRealm][SMPlayerName]["Channel"] == "raid")) then
			SendChatMessage("Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "RAID", nil, Channel);
			end
			SendChatMessage("Yeah!  *" .. CritComboHeal .. "* crits for *" .. CritComboHealDmg .. "* Total Healing! ", "CHANNEL", nil, Channel);
		end
	end
	end
 end

	CritCombo = 0;
	CritComboDmg = 0;
	CritComboHeal = 0;
	CritComboHealDmg = 0;
end

function SMInitializeSMData()
	if (SMData == nil) then
		SMData = {};
	end

	if (SMData[SMPlayerRealm] == nil) then
		SMData[SMPlayerRealm] = {};
	end

	if (SMPlayerName ~= nil and SMPlayerName ~= UNKNOWNOBJECT and SMPlayerName ~= UKNOWNBEING) then
		if (SMData[SMPlayerRealm][SMPlayerName] == nil) then
			SMData[SMPlayerRealm][SMPlayerName] = {};
			SMSetCurrentPlayerToZeros();
			SMSetDefaultOptions();
		end
	end
end

function SMSetCurrentPlayerToZeros()
	SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritCombo = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboDmg = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritCombo = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboDmg = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHeal = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordHitsCritComboHealDmg = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHeal = 0;
	SMData[SMPlayerRealm][SMPlayerName].RecordDmgCritComboHealDmg = 0;
end

function SMResetAll()
	SMData = {};
	SMInitializeSMData();
	SMSetDefaultOptions();
	SMOptionsFrame_OnShow();

	DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod " .. SHADERMOD_VERSION .. " All records and options reset.", .2, .0);
end

function SMDisplayHelp()
	DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00ShaderMod " .. SHADERMOD_VERSION .. " |cFF00FF00by |cFF00FFFFSky-|cFF0000FFDexter.", .2, .0);
	DEFAULT_CHAT_FRAME:AddMessage("[Commands] (/ShaderMod, /ShaderM, /sm)",.65,.65,.6);
	DEFAULT_CHAT_FRAME:AddMessage("   Menu - Shows the options menu.");
	DEFAULT_CHAT_FRAME:AddMessage("   Records - Shows your records.");
	DEFAULT_CHAT_FRAME:AddMessage("   Lock/Unlock - Lock or unlock messages frames.");
	DEFAULT_CHAT_FRAME:AddMessage("   Hide/Show - Hide or show messages frames.");
	DEFAULT_CHAT_FRAME:AddMessage("   MiniMap - Show MiniMap Options.");
	DEFAULT_CHAT_FRAME:AddMessage("   KillingBlow - Show KillingBlow Options.");
	DEFAULT_CHAT_FRAME:AddMessage("   ResetConfig - Reset ShaderMod Configuration (May help solve variables problems).");
end

function SMOptionsFrame_OnShow()	
	if (SMData[SMPlayerRealm][SMPlayerName].Running_Crit_Display) then
		SMCheckBoxRunning_Crit_Display:SetChecked(1);
	else
		SMCheckBoxRunning_Crit_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].White_Crits) then
		SMCheckBoxEnable_White_Crits:SetChecked(1);
	else
		SMCheckBoxEnable_White_Crits:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Display) then
		SMCheckBoxEnable_Old_Combo_Display:SetChecked(1);
	else
		SMCheckBoxEnable_Old_Combo_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Old_Combo_Sound) then
		SMCheckBoxEnable_Old_Combo_Sound:SetChecked(1);
	else
		SMCheckBoxEnable_Old_Combo_Sound:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].No_White_Normal) then
		SMCheckBoxEnable_No_White_Normal:SetChecked(1);
	else
		SMCheckBoxEnable_No_White_Normal:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Only_Count_Crits) then
		SMCheckBoxRunning_Only_Count_Crits:SetChecked(1);
	else
		SMCheckBoxRunning_Only_Count_Crits:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Running_Combat_Log_Display) then
		SMCheckBoxRunning_Combat_Log_Display:SetChecked(1);
	else
		SMCheckBoxRunning_Combat_Log_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Running_Old_School_Display) then
		SMCheckBoxRunning_Old_School_Display:SetChecked(1);
	else
		SMCheckBoxRunning_Old_School_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Running_Hit_Display) then
		SMCheckBoxRunning_Hit_Display:SetChecked(1);
	else
		SMCheckBoxRunning_Hit_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Reset_Combo) then
		SMCheckBoxRunning_Reset_Combo:SetChecked(1);
	else
		SMCheckBoxRunning_Reset_Combo:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Announce_Display) then
		SMCheckBoxAnnounce_Display:SetChecked(1);
	else
		SMCheckBoxAnnounce_Display:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Rogue) then
		SMCheckBoxEnable_Sound_Finish_Him_Rogue:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Finish_Him_Rogue:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Finish_Him_Execute) then
		SMCheckBoxEnable_Sound_Finish_Him_Execute:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Finish_Him_Execute:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Execute) then
		SMCheckBoxEnable_Log_Finish_Him_Execute:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Finish_Him_Execute:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Finish_Him_Rogue) then
		SMCheckBoxEnable_Log_Finish_Him_Rogue:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Finish_Him_Rogue:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Yeah) then
		SMCheckBoxEnable_Sound_Yeah:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Yeah:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Yeah) then
		SMCheckBoxEnable_Log_Yeah:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Yeah:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Merge_Heal_And_Damage_Combos) then
		SMCheckBoxEnable_Merge_Heal_And_Damage_Combos:SetChecked(1);
	else
		SMCheckBoxEnable_Merge_Heal_And_Damage_Combos:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Heal) then
		SMCheckBoxEnable_Heal:SetChecked(1);
	else
		SMCheckBoxEnable_Heal:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Oh_Yeah) then
		SMCheckBoxEnable_Sound_Oh_Yeah:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Oh_Yeah:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Unstoppable) then
		SMCheckBoxEnable_Sound_Unstoppable:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Unstoppable:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Killing_Spree) then
		SMCheckBoxEnable_Sound_Killing_Spree:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Killing_Spree:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Dominating) then
		SMCheckBoxEnable_Sound_Dominating:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Dominating:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ultra_Kill) then
		SMCheckBoxEnable_Sound_Ultra_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Ultra_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Wicked_Sick) then
		SMCheckBoxEnable_Sound_Wicked_Sick:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Wicked_Sick:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_God_Like) then
		SMCheckBoxEnable_Sound_God_Like:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_God_Like:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Holy_Shit) then
		SMCheckBoxEnable_Sound_Holy_Shit:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Holy_Shit:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Monster_Kill) then
		SMCheckBoxEnable_Sound_Monster_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Monster_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ludicrous_Kill) then
		SMCheckBoxEnable_Sound_Ludicrous_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Ludicrous_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Sound_Ownage) then
		SMCheckBoxEnable_Sound_Ownage:SetChecked(1);
	else
		SMCheckBoxEnable_Sound_Ownage:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Oh_Yeah) then
		SMCheckBoxEnable_Log_Oh_Yeah:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Oh_Yeah:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Unstoppable) then
		SMCheckBoxEnable_Log_Unstoppable:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Unstoppable:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Killing_Spree) then
		SMCheckBoxEnable_Log_Killing_Spree:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Killing_Spree:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Dominating) then
		SMCheckBoxEnable_Log_Dominating:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Dominating:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ultra_Kill) then
		SMCheckBoxEnable_Log_Ultra_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Ultra_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Wicked_Sick) then
		SMCheckBoxEnable_Log_Wicked_Sick:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Wicked_Sick:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_God_Like) then
		SMCheckBoxEnable_Log_God_Like:SetChecked(1);
	else
		SMCheckBoxEnable_Log_God_Like:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Holy_Shit) then
		SMCheckBoxEnable_Log_Holy_Shit:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Holy_Shit:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Monster_Kill) then
		SMCheckBoxEnable_Log_Monster_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Monster_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ludicrous_Kill) then
		SMCheckBoxEnable_Log_Ludicrous_Kill:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Ludicrous_Kill:SetChecked(0);
	end

	if (SMData[SMPlayerRealm][SMPlayerName].Enable_Log_Ownage) then
		SMCheckBoxEnable_Log_Ownage:SetChecked(1);
	else
		SMCheckBoxEnable_Log_Ownage:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Duel) then
		SMCheckBoxDuel_Enhancer:SetChecked(1);
	else
		SMCheckBoxDuel_Enhancer:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound) then
		SMCheckBoxDuel_Enhancer_Sound:SetChecked(1);
	else
		SMCheckBoxDuel_Enhancer_Sound:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Bg) then
		SMCheckBoxBg_Enhancer:SetChecked(1);
	else
		SMCheckBoxBg_Enhancer:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound) then
		SMCheckBoxBg_Enhancer_Sound:SetChecked(1);
	else
		SMCheckBoxBg_Enhancer_Sound:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text) then
		SMCheckBoxBg_Enhancer_Text:SetChecked(1);
	else
		SMCheckBoxBg_Enhancer_Text:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow) then
		SMCheckBoxKilling_Blow_Enhancer:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound) then
		SMCheckBoxKilling_Blow_Enhancer_Sound:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer_Sound:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Bg) then
		SMCheckBoxKilling_Blow_Enhancer_Reset_Bg:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer_Reset_Bg:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Death) then
		SMCheckBoxKilling_Blow_Enhancer_Reset_Death:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer_Reset_Death:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Players_Only) then
		SMCheckBoxKilling_Blow_Enhancer_Players_Only:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer_Players_Only:SetChecked(0);
	end
	
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Repeat) then
		SMCheckBoxKilling_Blow_Enhancer_Repeat:SetChecked(1);
	else
		SMCheckBoxKilling_Blow_Enhancer_Repeat:SetChecked(0);
	end
end

function SMCheckBoxClick(var_to_toggle)
	if ( this:GetChecked() ) then
		var_to_toggle = true;
	else
		var_to_toggle = false;
	end
end

function SMOnTooltip()
		GameTooltip:AddLine("ShaderMod")
		GameTooltip:AddLine("Left click: Reset combos\nRight click: Open options menu",.8,.8,.8,1)
		GameTooltip:Show()
end

function SMKillingBlow()
	if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow == true) then
		if ((event == "PLAYER_ENTERING_WORLD") and (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Bg == true)) then
		KillingBlow = 0;
		end
		if ((event == "PLAYER_DEAD") and (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Reset_Death == true)) then
			KillingBlow = 0;
		end
		if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
			if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Players_Only == false) then
				local eventType = arg2
				local sourceType = arg3
				local sourceName = arg4
				if ((eventType == "PARTY_KILL") and (sourceName == UnitName("player"))) then
					KillingBlow = KillingBlow + 1;
					if (KillingBlow >= 1) then
						SMKillingBlowAnnounce();
					end
				end
			end
		end
		if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
			if (SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Players_Only == true) then
				local eventType = arg2
				local sourceType = arg3
				local sourceName = arg4
				local destFlags = arg8
				if ((eventType == "PARTY_KILL") and (sourceName == UnitName("player"))) then
					if (bit.band(destFlags, COMBATLOG_OBJECT_TYPE_PLAYER) == COMBATLOG_OBJECT_TYPE_PLAYER) then
						KillingBlow = KillingBlow + 1;
						if (KillingBlow >= 1) then
							SMKillingBlowAnnounce();
						end
					end
				end
			end
		end
	end
end

function SMKillingBlowAnnounce()
	if (KillingBlow > 0 and KillingBlow < 2) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\firstblood.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("First Blood!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 1 and KillingBlow < 3) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\doublekill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Double Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 2 and KillingBlow < 4) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\tripplekill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Tripple Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 3 and KillingBlow < 5) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\multikill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Multi Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 4 and KillingBlow < 6) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ultrakill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ultra Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 5 and KillingBlow < 7) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\megakill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Mega Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 6 and KillingBlow < 8) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\monsterkill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Monster Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 7 and KillingBlow < 9) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\ludicrouskill.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ludicrous Kill!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 8 and KillingBlow < 11) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\wickedsick.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Wicked Sick!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 10 and KillingBlow < 13) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\holyshit.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Holy Shit!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 12 and KillingBlow < 15) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\godlike.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("God Like!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 14 and KillingBlow < 17) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\Ownage.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ownage!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 16 and KillingBlow < 18) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\Ownage.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ownage!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 17 and KillingBlow < 19) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\Ownage.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ownage!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 18 and KillingBlow < 20) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\Ownage.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("Ownage!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 19 and KillingBlow < 22) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\invincible.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("I am INVINCIBLE!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 21 and KillingBlow < 23) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\invincible.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("I am INVINCIBLE!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 22 and KillingBlow < 24) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\invincible.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("I am INVINCIBLE!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 23 and KillingBlow < 24) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Repeat == false) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\invincible.wav");
			end
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("I am INVINCIBLE!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
	if (KillingBlow > 24) then
		if(SMData[SMPlayerRealm][SMPlayerName].Display_Killing_Blow_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\god.wav");
		end
		SMKillingBlowFrame:AddMessage("Frags: " .. KillingBlow, 1, 1, 1, 1, 3);
		SMKillingBlowFrame:AddMessage("YES!I am a GOD!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	end
end

function SMDuel()
	if (SMData[SMPlayerRealm][SMPlayerName].Duel == true) then
		if (event == "DUEL_REQUESTED") then
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
		end
		if (event == "CHAT_MSG_SYSTEM") then
			for spellname in string.gmatch(arg1, DUELTHREE)do
			SMDuelFrame:AddMessage("3",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\three.wav");
				end
			end
			for spellname in string.gmatch(arg1, DUELTWO)do
			SMDuelFrame:AddMessage("2",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\two.wav");
				end
			end
			for spellname in string.gmatch(arg1, DUELONE)do
			SMDuelFrame:AddMessage("1",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			ShaderModTimer = GetTime();
			ShaderModInFight = 1;
				if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\one.wav");
				end
			end
			for spellname in string.gmatch(arg1, DUELPREPARE)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
				end
			end
			for winner, loser in string.gmatch(arg1, DUELEND)do
				if (player == winner) then
					SMDuelFrame:AddMessage("You Win!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
					SMFightAnnounced = 0;
					if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
						PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\youwin.wav");
					end
				end
				if (player == loser) then
					SMDuelFrame:AddMessage("You Lose!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
					SMFightAnnounced = 0;
					if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
						PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\IOUS.wav");
					end
				end
			end
		end
	end
end

function SMFight()
	if (SMFightAnnounced == 0) then
	SMDuelFrame:AddMessage("FIGHT!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	SMFightAnnounced = 1;
		if (SMData[SMPlayerRealm][SMPlayerName].Duel_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\fight.wav");
		end
	end
end

function SMBg()
	if (SMData[SMPlayerRealm][SMPlayerName].Bg == true) then
		if (event == "CHAT_MSG_BG_SYSTEM_NEUTRAL") then
			for spellname in string.gmatch(arg1, ARENA30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, ARENASTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			for spellname in string.gmatch(arg1, STR30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, STRSTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			for spellname in string.gmatch(arg1, WARSONG30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, WARSONGSTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			for spellname in string.gmatch(arg1, ARATHI30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, ARATHISTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			for spellname in string.gmatch(arg1, ALTERAC30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, ALTERACSTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			for spellname in string.gmatch(arg1, EYE30)do
			SMDuelFrame:AddMessage("Prepare to Fight!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\prepare.wav");
			end
			ShaderModTimerBg = GetTime();
			ShaderModInFightBg = 1;
			end
			for spellname in string.gmatch(arg1, EYESTART)do
			ShaderModInFightBg = 0;
			SMOneBgAnnounced = 0;
			SMTwoBgAnnounced = 0;
			SMThreeBgAnnounced = 0;
			SMFightBgAnnounced = 0;
			end
			if (event == "PLAYER_ENTERING_WORLD") then
				ShaderModInFightBg = 0;
				SMOneBgAnnounced = 0;
				SMTwoBgAnnounced = 0;
				SMThreeBgAnnounced = 0;
				SMFightBgAnnounced = 0;
			end
		end
	end
end

function SMThreeBg()
	if (SMThreeBgAnnounced == 0) then
	SMDuelFrame:AddMessage("3",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	SMThreeBgAnnounced = 1;
		if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\three.wav");
		end
	end
end

function SMTwoBg()
	if (SMTwoBgAnnounced == 0) then
	SMDuelFrame:AddMessage("2",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	SMTwoBgAnnounced = 1;
		if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\two.wav");
		end
	end
end

function SMOneBg()
	if (SMOneBgAnnounced == 0) then
	SMDuelFrame:AddMessage("1",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	SMOneBgAnnounced = 1;
		if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\one.wav");
		end
	end
end

function SMFightBg()
	if (SMFightBgAnnounced == 0) then
	SMDuelFrame:AddMessage("FIGHT!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
	SMFightBgAnnounced = 1;
		if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\fight.wav");
		end
	end
end

function SMFlags()
	if (event == "CHAT_MSG_BG_SYSTEM_ALLIANCE") then
		-- Warsong
		for spellname in string.gmatch(arg1, HORDEPICK)do
			if (UnitFactionGroup("player") == "Horde") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\TheEnemyHasYourFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("The Alliance has your Flag!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
				end
			elseif (UnitFactionGroup("player") == "Alliance") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\YourTeamHasTheEnemyFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Your Team has the Enemy Flag!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
				end
			end
		end
		-- Eye of the Storm
		for spellname in string.gmatch(arg1, HORDEPICKEYE)do
			if (UnitFactionGroup("player") == "Horde") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\TheEnemyHasTheFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("The Alliance has the Flag!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
				end
			elseif (UnitFactionGroup("player") == "Alliance") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\YourTeamHasTheFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Your Team has the Flag!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
				end
			end
		end
		-- Warsong
		for spellname in string.gmatch(arg1, ALLIANCECAPTURE)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
			PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\BlueScores.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Alliance Scores!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
			end
		end
		-- Eye of the Storm
		for spellname in string.gmatch(arg1, ALLIANCECAPTUREEYE)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\BlueScores.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Alliance Scores!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
			end
		end
		for spellname in string.gmatch(arg1, ALLIANCERETURN)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\BlueFlagReturned.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Alliance Flag Returned!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (event == "CHAT_MSG_BG_SYSTEM_HORDE") then
		-- Warsong
		for spellname in string.gmatch(arg1, ALLIANCEPICK)do
			if (UnitFactionGroup("player") == "Horde") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\YourTeamHasTheEnemyFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Your Team has the enemy Flag!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				end
			elseif (UnitFactionGroup("player") == "Alliance") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\TheEnemyHasYourFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("The Horde has your Flag!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				end
			end
		end
		-- Eye of the Storm
		for spellname in string.gmatch(arg1, ALLIANCEPICKEYE)do
			if (UnitFactionGroup("player") == "Horde") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\YourTeamHasTheFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Your Team has the Flag!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				end
			elseif (UnitFactionGroup("player") == "Alliance") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\TheEnemyHasTheFlag.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("The Horde has the flag!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				end
			end
		end
		-- Warsong
		for spellname in string.gmatch(arg1, HORDECAPTURE)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\RedScores.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Horde Scores!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			end
		end
		-- Eye of the Storm
		for spellname in string.gmatch(arg1, HORDECAPTUREEYE)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\RedScores.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Horde Scores!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			end
		end
		for spellname in string.gmatch(arg1, HORDERETURN)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\RedFlagReturned.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Horde Flag Returned!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			end
		end
	end
	if (event == "CHAT_MSG_BG_SYSTEM_NEUTRAL") then
		for spellname in string.gmatch(arg1, HORDERETURN2)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\RedFlagReturned.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Horde Flag Returned!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
			end
		end
		for spellname in string.gmatch(arg1, ALLIANCERETURN2)do
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
				PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\BlueFlagReturned.wav");
			end
			if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
				SMDuelFrame:AddMessage("Alliance Flag Returned!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
			end
		end
		for spellname in string.gmatch(arg1, HORDEWINS)do
			if (UnitFactionGroup("player") == "Horde") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\youwin.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Horde Wins!",FDISPLAY_RED, FDISPLAY_GREEN, FDISPLAY_BLUE, 1, 3);
				end
			end
		end
		for spellname in string.gmatch(arg1, ALLIANCEWINS)do
			if (UnitFactionGroup("player") == "Alliance") then
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Sound == true) then
					PlaySoundFile("Interface\\AddOns\\ShaderMod\\Sounds\\youwin.wav");
				end
				if (SMData[SMPlayerRealm][SMPlayerName].Bg_Text == true) then
					SMDuelFrame:AddMessage("Alliance Wins!",ADISPLAY_RED, ADISPLAY_GREEN, ADISPLAY_BLUE, 1, 3);
				end
			end
		end
	end
end
