console ignore npc messages option

master
Henrique Santiago 12 years ago
parent e7334566a2
commit c28aff1aa6

@ -55,6 +55,7 @@ local channelsWindow
local ownPrivateName local ownPrivateName
local messageHistory = {} local messageHistory = {}
local currentMessageIndex = 0 local currentMessageIndex = 0
local ignoreNpcMessages = false
-- private functions -- private functions
local function navigateMessageHistory(step) local function navigateMessageHistory(step)
@ -83,6 +84,7 @@ end
-- hooked events -- hooked events
local function onCreatureSpeak(name, level, speaktype, message, channelId, creaturePos) 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 local defaultMessage = speaktype < 3 and true or false
speaktype = SpeakTypes[speaktype] speaktype = SpeakTypes[speaktype]
if speaktype.hideInConsole then return end if speaktype.hideInConsole then return end
@ -523,3 +525,7 @@ function Console.getOwnPrivateTab()
if not ownPrivateName then return end if not ownPrivateName then return end
return Console.getTab(ownPrivateName) return Console.getTab(ownPrivateName)
end end
function Console.ignoreNpcMessages(ignore)
ignoreNpcMessages = state
end

Loading…
Cancel
Save