Quantcast

Deleted sounds for keywords

Darthpred [07-25-12 - 07:47]
Deleted sounds for keywords

Elv made it a baseline
Filename
ElvUI_SLE/ElvUI_SLE.lua
ElvUI_SLE/config/sle_global.lua
ElvUI_SLE/modules/chat/chat.lua
ElvUI_SLE/modules/chat/options.lua
diff --git a/ElvUI_SLE/ElvUI_SLE.lua b/ElvUI_SLE/ElvUI_SLE.lua
index a2545d4..03b4397 100644
--- a/ElvUI_SLE/ElvUI_SLE.lua
+++ b/ElvUI_SLE/ElvUI_SLE.lua
@@ -10,7 +10,6 @@ function SLE:Initialize()
 	if E.db.general.loginmessage then
 		print(L['SLE_LOGIN_MSG'])
 	end
-	E:GetModule('Chat'):SetTimer() --If called before Edit loaded from chat.lua will cause errors
 	E.db.datatexts.panels.Top_Center = 'Version'
 end

diff --git a/ElvUI_SLE/config/sle_global.lua b/ElvUI_SLE/config/sle_global.lua
index d8768f3..2204814 100644
--- a/ElvUI_SLE/config/sle_global.lua
+++ b/ElvUI_SLE/config/sle_global.lua
@@ -1,10 +1,5 @@
 local E, L, V, P, G =  unpack(ElvUI); --Inport: Engine, Locales, ProfileDB, GlobalDB

-
-V['channelcheck'] = {
-	['time'] = 3,
-}
-
 V['sle'] = {
 	--Auras Frame
 	['auras'] = {
diff --git a/ElvUI_SLE/modules/chat/chat.lua b/ElvUI_SLE/modules/chat/chat.lua
index 1c675d5..d9e645a 100644
--- a/ElvUI_SLE/modules/chat/chat.lua
+++ b/ElvUI_SLE/modules/chat/chat.lua
@@ -39,56 +39,6 @@ function CH:ChatEdit_AddHistory(editBox, line)
 	end
 end

---------------------------------
---Sounds for Elv's name coloring
---------------------------------
-local SoundPalyed = 0
-function CH:SetTimer()
-	if E.private.channelcheck.time == nil then
-		E.private.channelcheck.time = 3
-	end
-end
-
-
-function CH:CheckKeyword(message)
-	local replaceWords = {};
-
-	for i=1, #{string.split(' ', message)} do
-		local word = select(i, string.split(' ', message));
-		if not word:find('|') then
-			for keyword, _ in pairs(CH.Keywords) do
-				if word:lower() == keyword:lower() then
-					replaceWords[word] = E.media.hexvaluecolor..word..'|r'
-					if E.db.sle.chat.sound then
-					if SoundPalyed == 0 then --Check for sound played
-						PlaySoundFile(LSM:Fetch("sound", E.db.sle.chat.warningsound));
-						SoundPalyed = 1 --Setting sound as played
-						frame.SoundTimer = CH:ScheduleTimer('EnableSound', E.private.channelcheck.time) --Starting Timer
-					end
-				end
-				end
-			end
-		end
-	end
-
-	for word, replaceWord in pairs(replaceWords) do
-		if message == word then
-			message = message:gsub(word, replaceWord)
-		elseif message:find(' '..word) then
-			message = message:gsub(' '..word, ' '..replaceWord)
-		elseif message:find(word..' ') then
-			message = message:gsub(word..' ', replaceWord..' ')
-		end
-	end
-
-	return message
-end
-
---Action at the end of timer
-function CH:EnableSound(frame)
-	SoundPalyed = 0
-end
-
 --Replacement of chat tab position and size function
 function CH:PositionChat(override)
 	if (InCombatLockdown() and not override and self.initialMove) or (IsMouseButtonDown("LeftButton") and not override) then return end
diff --git a/ElvUI_SLE/modules/chat/options.lua b/ElvUI_SLE/modules/chat/options.lua
index 47264d0..5d39a53 100644
--- a/ElvUI_SLE/modules/chat/options.lua
+++ b/ElvUI_SLE/modules/chat/options.lua
@@ -42,46 +42,5 @@ E.Options.args.sle.args.chat = {
 				},
 			},
 		},
-		warning = {
-			order = 3,
-			type = "group",
-			name = L["Name Highlight"],
-			guiInline = true,
-			args = {
-				info = {
-					order = 1,
-					type = "description",
-					name = L["TOON_DESC"],
-				},
-				soundenable = {
-					order = 3,
-					type = "toggle",
-					name = L["Enable Sound"],
-					desc = L["Play sound when keyword is mentioned in chat."],
-					get = function(info) return E.db.sle.chat.sound end,
-					set = function(info, value) E.db.sle.chat.sound = value; end
-				},
-				sound = {
-					type = "select", dialogControl = 'LSM30_Sound',
-					order = 4,
-					name = L["Sound"],
-					desc = L["Sound that will be played."],
-					disabled = function() return not E.db.sle.chat.sound end,
-					values = AceGUIWidgetLSMlists.sound,
-					get = function(info) return E.db.sle.chat.warningsound end,
-					set = function(info, value) E.db.sle.chat.warningsound = value; end
-				},
-				timer = {
-					order = 5,
-					type = "range",
-					name = L["Timer"],
-					desc = L["Sound will be played only once in this number of seconds."],
-					min = 1, max = 20, step = 1,
-					disabled = function() return not E.db.sle.chat.sound end,
-					get = function(info) return E.private.channelcheck.time end,
-					set = function(info, value) E.private.channelcheck.time = value; end,
-				},
-			},
-		},
 	},
 }