Fix naming in minimaptagger
This commit is contained in:
@@ -347,24 +347,28 @@ function shared.MinimapTagger.Init()
|
|||||||
local chatFrame = CreateFrame("Frame")
|
local chatFrame = CreateFrame("Frame")
|
||||||
chatFrame:RegisterEvent("CHAT_MSG_CHANNEL")
|
chatFrame:RegisterEvent("CHAT_MSG_CHANNEL")
|
||||||
chatFrame:SetScript("OnEvent", function(self, event, msg, sender, ...)
|
chatFrame:SetScript("OnEvent", function(self, event, msg, sender, ...)
|
||||||
-- if Heimdall_Data.config.echoer.debug then
|
--if Heimdall_Data.config.echoer.debug then
|
||||||
-- print(string.format("[%s] Channel message received from: %s", ModuleName, sender))
|
-- print(string.format("[%s] Channel message received from: %s", ModuleName, sender))
|
||||||
-- end
|
--end
|
||||||
|
|
||||||
if not Heimdall_Data.config.minimapTagger.enabled then
|
if not Heimdall_Data.config.minimapTagger.enabled then
|
||||||
-- if Heimdall_Data.config.echoer.debug then
|
--if Heimdall_Data.config.echoer.debug then
|
||||||
-- print(string.format("[%s] Module disabled, ignoring message", ModuleName))
|
-- print(string.format("[%s] Module disabled, ignoring message", ModuleName))
|
||||||
-- end
|
--end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local channelId = select(6, ...)
|
local channelId = select(6, ...)
|
||||||
local _, channelname = GetChannelName(channelId)
|
local _, channelname = GetChannelName(channelId)
|
||||||
-- if Heimdall_Data.config.echoer.debug then
|
local ok = false
|
||||||
-- print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname))
|
for _, channel in pairs(Heimdall_Data.config.minimapTagger.channels) do
|
||||||
-- end
|
if channelname == channel then
|
||||||
|
ok = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if channelname ~= Heimdall_Data.config.minimapTagger.masterChannel then
|
if not ok then
|
||||||
if Heimdall_Data.config.minimapTagger.debug then
|
if Heimdall_Data.config.minimapTagger.debug then
|
||||||
print(string.format("[%s] Ignoring message from non-master channel: %s, need %s", ModuleName, channelname,
|
print(string.format("[%s] Ignoring message from non-master channel: %s, need %s", ModuleName, channelname,
|
||||||
Heimdall_Data.config.minimapTagger.masterChannel))
|
Heimdall_Data.config.minimapTagger.masterChannel))
|
||||||
@@ -384,7 +388,7 @@ function shared.MinimapTagger.Init()
|
|||||||
if currentMapId ~= messageMapId then
|
if currentMapId ~= messageMapId then
|
||||||
if Heimdall_Data.config.minimapTagger.debug then
|
if Heimdall_Data.config.minimapTagger.debug then
|
||||||
print(string.format("[%s] Current map ID (%d) does not match message map ID (%d), ignoring message",
|
print(string.format("[%s] Current map ID (%d) does not match message map ID (%d), ignoring message",
|
||||||
ModuleName, currentMapId, messageMapId))
|
ModuleName, currentMapId, messageMapId))
|
||||||
end
|
end
|
||||||
doTag = false
|
doTag = false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user