Fix NPC chat when ignoring private messages.
This commit is contained in:
parent
408b3c5125
commit
f024e30753
|
@ -992,7 +992,9 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ignoreNpcMessages and mode == MessageModes.NpcFrom then return end
|
local isNpcMode = (mode == MessageModes.NpcFromStartBlock or mode == MessageModes.NpcFrom)
|
||||||
|
|
||||||
|
if ignoreNpcMessages and isNpcMode then return end
|
||||||
|
|
||||||
speaktype = SpeakTypes[mode]
|
speaktype = SpeakTypes[mode]
|
||||||
|
|
||||||
|
@ -1008,7 +1010,7 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
|
||||||
|
|
||||||
if mode == MessageModes.Yell and isIgnoringYelling() then
|
if mode == MessageModes.Yell and isIgnoringYelling() then
|
||||||
return
|
return
|
||||||
elseif speaktype.private and isIgnoringPrivate() and mode ~= MessageModes.NpcFrom then
|
elseif speaktype.private and isIgnoringPrivate() and not isNpcMode then
|
||||||
return
|
return
|
||||||
elseif isIgnored(name) then
|
elseif isIgnored(name) then
|
||||||
return
|
return
|
||||||
|
@ -1026,7 +1028,7 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
|
||||||
local staticText = StaticText.create()
|
local staticText = StaticText.create()
|
||||||
-- Remove curly braces from screen message
|
-- Remove curly braces from screen message
|
||||||
local staticMessage = message
|
local staticMessage = message
|
||||||
if mode == MessageModes.NpcFrom or mode == MessageModes.NpcFromStartBlock then
|
if isNpcMode then
|
||||||
local highlightData = getHighlightedText(staticMessage)
|
local highlightData = getHighlightedText(staticMessage)
|
||||||
if #highlightData > 0 then
|
if #highlightData > 0 then
|
||||||
for i = 1, #highlightData / 3 do
|
for i = 1, #highlightData / 3 do
|
||||||
|
|
Loading…
Reference in New Issue