From c28aff1aa626c03cce9c58c09220b02caa06fbce Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Mon, 11 Jun 2012 05:17:52 -0300 Subject: [PATCH] console ignore npc messages option --- modules/game_console/console.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/game_console/console.lua b/modules/game_console/console.lua index 5821f89c..65a4e794 100644 --- a/modules/game_console/console.lua +++ b/modules/game_console/console.lua @@ -55,6 +55,7 @@ local channelsWindow local ownPrivateName local messageHistory = {} local currentMessageIndex = 0 +local ignoreNpcMessages = false -- private functions local function navigateMessageHistory(step) @@ -83,6 +84,7 @@ end -- hooked events local function onCreatureSpeak(name, level, speaktype, message, channelId, creaturePos) + if ignoreNpcMessages and speaktype == SpeakPrivateNpcToPlayer then return end local defaultMessage = speaktype < 3 and true or false speaktype = SpeakTypes[speaktype] if speaktype.hideInConsole then return end @@ -523,3 +525,7 @@ function Console.getOwnPrivateTab() if not ownPrivateName then return end return Console.getTab(ownPrivateName) end + +function Console.ignoreNpcMessages(ignore) + ignoreNpcMessages = state +end