Quantcast

I just realized I've fucked it up

Darthpred [04-29-15 - 10:06]
I just realized I've fucked it up
Filename
ElvUI_SLE/core/core.lua
ElvUI_SLE/modules/chat.lua
diff --git a/ElvUI_SLE/core/core.lua b/ElvUI_SLE/core/core.lua
index a5b118f..cf3e264 100644
--- a/ElvUI_SLE/core/core.lua
+++ b/ElvUI_SLE/core/core.lua
@@ -229,7 +229,13 @@ In case of the third format you should put at least 2 values.|r
 	end)
 end

+function SLE:FixDatabase() --For when we dramatically change some options
+	if E.db.sle.chat.combathide == true then E.db.sle.chat.combathide == "BOTH" end
+	if E.db.sle.chat.combathide == false then E.db.sle.chat.combathide == "NONE" end
+end
+
 function SLE:Initialize()
+	SLE:FixeDatabase()
 	--ElvUI's version check
 	if elvV < elvR then
 		E:StaticPopup_Show("VERSION_MISMATCH")
diff --git a/ElvUI_SLE/modules/chat.lua b/ElvUI_SLE/modules/chat.lua
index 981417c..c43b72f 100644
--- a/ElvUI_SLE/modules/chat.lua
+++ b/ElvUI_SLE/modules/chat.lua
@@ -452,7 +452,7 @@ function CH:SpamFilter()
 end

 function CH:Combat(event)
-	if E.db.sle.chat.combathide == "NONE" then return end
+	if E.db.sle.chat.combathide == "NONE" or not E.db.sle.chat.combathide then return end
 	if event == "PLAYER_REGEN_DISABLED" then
 		if E.db.sle.chat.combathide == "BOTH" or E.db.sle.chat.combathide == "RIGHT" then
 			RightChatPanel:Hide()