Quantcast

More errors to filter out from the chat

Adrian L Lange [10-17-12 - 22:17]
More errors to filter out from the chat
Filename
Monomyth.lua
diff --git a/Monomyth.lua b/Monomyth.lua
index 5641d2c..cfce334 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -268,10 +268,14 @@ Monomyth:Register('BAG_UPDATE', function(bag)
 	end
 end)

+local errors = {
+	[ERR_QUEST_ALREADY_DONE] = true,
+	[ERR_QUEST_FAILED_LOW_LEVEL] = true,
+	[ERR_QUEST_NEED_PREREQS] = true,
+}
+
 ChatFrame_AddMessageEventFilter('CHAT_MSG_SYSTEM', function(self, event, message)
-	if(message == ERR_QUEST_ALREADY_DONE or message == ERR_QUEST_FAILED_LOW_LEVEL) then
-		return true
-	end
+	return errors[message]
 end)

 QuestInfoDescriptionText.SetAlphaGradient = function() end