Code format

This commit is contained in:
2025-01-09 10:55:32 +01:00
parent 2e44a1ef31
commit be81a31302
15 changed files with 274 additions and 231 deletions

View File

@@ -44,7 +44,8 @@ function shared.AgentTracker.Init()
newAgents = newAgents + 1 newAgents = newAgents + 1
end end
if Heimdall_Data.config.agentTracker.debug then if Heimdall_Data.config.agentTracker.debug then
print(string.format("[%s] %s agent: %s", ModuleName, isNewAgent and "Added new" or "Updated existing", name)) print(string.format("[%s] %s agent: %s", ModuleName, isNewAgent and "Added new" or "Updated existing",
name))
end end
end end
end end
@@ -57,22 +58,22 @@ function shared.AgentTracker.Init()
local agentTrackerChannelSniffer = CreateFrame("Frame") local agentTrackerChannelSniffer = CreateFrame("Frame")
agentTrackerChannelSniffer:RegisterEvent("CHAT_MSG_CHANNEL") agentTrackerChannelSniffer:RegisterEvent("CHAT_MSG_CHANNEL")
agentTrackerChannelSniffer:SetScript("OnEvent", function(self, event, msg, sender, ...) agentTrackerChannelSniffer:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.agentTracker.debug then -- if Heimdall_Data.config.agentTracker.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.agentTracker.enabled then if not Heimdall_Data.config.agentTracker.enabled then
-- if Heimdall_Data.config.agentTracker.debug then -- if Heimdall_Data.config.agentTracker.debug then
-- print(string.format("[%s] Module disabled, ignoring channel message", ModuleName)) -- print(string.format("[%s] Module disabled, ignoring channel 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 channelname ~= Heimdall_Data.config.agentTracker.masterChannel then if channelname ~= Heimdall_Data.config.agentTracker.masterChannel then
-- if Heimdall_Data.config.agentTracker.debug then -- if Heimdall_Data.config.agentTracker.debug then
-- print(string.format("[%s] Ignoring message from non-master channel: %s", ModuleName, channelname)) -- print(string.format("[%s] Ignoring message from non-master channel: %s", ModuleName, channelname))
-- end -- end
return return
end end
if Heimdall_Data.config.agentTracker.debug then if Heimdall_Data.config.agentTracker.debug then
@@ -86,7 +87,8 @@ function shared.AgentTracker.Init()
Heimdall_Data.config.agents[sender] = date("%Y-%m-%dT%H:%M:%S") Heimdall_Data.config.agents[sender] = date("%Y-%m-%dT%H:%M:%S")
if Heimdall_Data.config.agentTracker.debug then if Heimdall_Data.config.agentTracker.debug then
print(string.format("[%s] %s agent from message: %s", ModuleName, isNewAgent and "Added new" or "Updated existing", sender)) print(string.format("[%s] %s agent from message: %s", ModuleName,
isNewAgent and "Added new" or "Updated existing", sender))
end end
end) end)

View File

@@ -53,7 +53,8 @@ function shared.CombatAlerter.Init()
if shared.stinkyTracker.stinkies and shared.stinkyTracker.stinkies[source] then if shared.stinkyTracker.stinkies and shared.stinkyTracker.stinkies[source] then
if Heimdall_Data.config.combatAlerter.debug then if Heimdall_Data.config.combatAlerter.debug then
print(string.format("[%s] Source is tracked stinky: %s (Already alerted: %s)", ModuleName, source, tostring(alerted[source] or false))) print(string.format("[%s] Source is tracked stinky: %s (Already alerted: %s)", ModuleName, source,
tostring(alerted[source] or false)))
end end
if alerted[source] then return end if alerted[source] then return end
@@ -62,7 +63,8 @@ function shared.CombatAlerter.Init()
local zone, subZone = GetZoneText(), GetSubZoneText() local zone, subZone = GetZoneText(), GetSubZoneText()
if Heimdall_Data.config.combatAlerter.debug then if Heimdall_Data.config.combatAlerter.debug then
print(string.format("[%s] Player location: %s/%s at %.2f,%.2f", ModuleName, zone, subZone, x * 100, y * 100)) print(string.format("[%s] Player location: %s/%s at %.2f,%.2f", ModuleName, zone, subZone, x * 100,
y * 100))
end end
---@type Message ---@type Message

View File

@@ -131,7 +131,10 @@ function shared.Commander.Init()
return text return text
end end
local function CountClassPartitionedStinkies() local function CountClassPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: CountClassPartitionedStinkies", ModuleName)) end if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: CountClassPartitionedStinkies",
ModuleName))
end
local res = CountClassPartitioned(HeimdallStinkies) local res = CountClassPartitioned(HeimdallStinkies)
if #res == 0 then if #res == 0 then
return { "No stinkies found" } return { "No stinkies found" }
@@ -139,7 +142,10 @@ function shared.Commander.Init()
return res return res
end end
local function WhoPartitionedStinkies() local function WhoPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: WhoPartitionedStinkies", ModuleName)) end if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: WhoPartitionedStinkies",
ModuleName))
end
local res = WhoPartitioned(HeimdallStinkies) local res = WhoPartitioned(HeimdallStinkies)
if #res == 0 then if #res == 0 then
return { "No stinkies found" } return { "No stinkies found" }
@@ -147,7 +153,10 @@ function shared.Commander.Init()
return res return res
end end
local function CountPartitionedStinkies() local function CountPartitionedStinkies()
if Heimdall_Data.config.commander.debug then print(string.format("[%s] Executing: CountPartitionedStinkies", ModuleName)) end if Heimdall_Data.config.commander.debug then
print(string.format("[%s] Executing: CountPartitionedStinkies",
ModuleName))
end
local res = CountPartitioned(HeimdallStinkies) local res = CountPartitioned(HeimdallStinkies)
if #res == 0 then if #res == 0 then
return { "No stinkies found" } return { "No stinkies found" }
@@ -212,21 +221,21 @@ function shared.Commander.Init()
local commanderChannelFrame = CreateFrame("Frame") local commanderChannelFrame = CreateFrame("Frame")
commanderChannelFrame:RegisterEvent("CHAT_MSG_CHANNEL") commanderChannelFrame:RegisterEvent("CHAT_MSG_CHANNEL")
commanderChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...) commanderChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.commander.debug then -- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Event received", ModuleName)) -- print(string.format("[%s] Event received", ModuleName))
-- shared.dumpTable(Heimdall_Data.config.commander) -- shared.dumpTable(Heimdall_Data.config.commander)
-- end -- end
if not Heimdall_Data.config.commander.enabled then if not Heimdall_Data.config.commander.enabled then
-- if Heimdall_Data.config.commander.debug then -- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Module disabled, ignoring event", ModuleName)) -- print(string.format("[%s] Module disabled, ignoring event", 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.commander.debug then -- if Heimdall_Data.config.commander.debug then
-- print(string.format("[%s] Channel received: %s", ModuleName, channelname)) -- print(string.format("[%s] Channel received: %s", ModuleName, channelname))
-- end -- end
if channelname ~= Heimdall_Data.config.commander.masterChannel then return end if channelname ~= Heimdall_Data.config.commander.masterChannel then return end
sender = string.match(sender, "^[^-]+") sender = string.match(sender, "^[^-]+")
if Heimdall_Data.config.commander.debug then if Heimdall_Data.config.commander.debug then

View File

@@ -38,14 +38,16 @@ function shared.DeathReporter.Init()
if recentDuels[destination] and GetTime() - recentDuels[destination] < Heimdall_Data.config.deathReporter.duelThrottle then if recentDuels[destination] and GetTime() - recentDuels[destination] < Heimdall_Data.config.deathReporter.duelThrottle then
if Heimdall_Data.config.deathReporter.debug then if Heimdall_Data.config.deathReporter.debug then
print(string.format("[%s] Ignoring death report - Recent duel detected for target: %s", ModuleName, destination)) print(string.format("[%s] Ignoring death report - Recent duel detected for target: %s", ModuleName,
destination))
end end
return return
end end
if recentDuels[source] and GetTime() - recentDuels[source] < Heimdall_Data.config.deathReporter.duelThrottle then if recentDuels[source] and GetTime() - recentDuels[source] < Heimdall_Data.config.deathReporter.duelThrottle then
if Heimdall_Data.config.deathReporter.debug then if Heimdall_Data.config.deathReporter.debug then
print(string.format("[%s] Ignoring death report - Recent duel detected for source: %s", ModuleName, source)) print(string.format("[%s] Ignoring death report - Recent duel detected for source: %s", ModuleName,
source))
end end
return return
end end
@@ -58,14 +60,16 @@ function shared.DeathReporter.Init()
C_Timer.NewTimer(3, function() C_Timer.NewTimer(3, function()
if recentDuels[destination] and GetTime() - recentDuels[destination] < Heimdall_Data.config.deathReporter.duelThrottle then if recentDuels[destination] and GetTime() - recentDuels[destination] < Heimdall_Data.config.deathReporter.duelThrottle then
if Heimdall_Data.config.deathReporter.debug then if Heimdall_Data.config.deathReporter.debug then
print(string.format("[%s] Cancelling delayed death report - Recent duel detected for: %s", ModuleName, destination)) print(string.format("[%s] Cancelling delayed death report - Recent duel detected for: %s", ModuleName,
destination))
end end
return return
end end
if recentDuels[source] and GetTime() - recentDuels[source] < Heimdall_Data.config.deathReporter.duelThrottle then if recentDuels[source] and GetTime() - recentDuels[source] < Heimdall_Data.config.deathReporter.duelThrottle then
if Heimdall_Data.config.deathReporter.debug then if Heimdall_Data.config.deathReporter.debug then
print(string.format("[%s] Cancelling delayed death report - Recent duel detected for: %s", ModuleName, source)) print(string.format("[%s] Cancelling delayed death report - Recent duel detected for: %s", ModuleName,
source))
end end
return return
end end

View File

@@ -30,7 +30,7 @@ function shared.Dueler.Init()
end end
AcceptDuel() AcceptDuel()
else else
if Heimdall_Data.config.dueler.autoDecline then if Heimdall_Data.config.dueler.declineOther then
if Heimdall_Data.config.dueler.debug then if Heimdall_Data.config.dueler.debug then
print(string.format("[%s] Auto-declining duel from untrusted sender: %s", ModuleName, sender)) print(string.format("[%s] Auto-declining duel from untrusted sender: %s", ModuleName, sender))
end end
@@ -44,7 +44,8 @@ function shared.Dueler.Init()
end) end)
if Heimdall_Data.config.dueler.debug then if Heimdall_Data.config.dueler.debug then
print(string.format("[%s] Module initialized with auto-decline: %s", ModuleName, tostring(Heimdall_Data.config.dueler.autoDecline))) print(string.format("[%s] Module initialized with auto-decline: %s", ModuleName,
tostring(Heimdall_Data.config.dueler.declineOther)))
end end
print("[Heimdall] Dueler loaded") print("[Heimdall] Dueler loaded")
end end

View File

@@ -9,27 +9,27 @@ function shared.Echoer.Init()
local frame = CreateFrame("Frame") local frame = CreateFrame("Frame")
frame:RegisterEvent("CHAT_MSG_CHANNEL") frame:RegisterEvent("CHAT_MSG_CHANNEL")
frame:SetScript("OnEvent", function(self, event, msg, sender, ...) frame: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.echoer.enabled then if not Heimdall_Data.config.echoer.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 -- if Heimdall_Data.config.echoer.debug then
-- print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname)) -- print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname))
-- end -- end
if channelname ~= Heimdall_Data.config.echoer.masterChannel then if channelname ~= Heimdall_Data.config.echoer.masterChannel then
if Heimdall_Data.config.echoer.debug then -- if Heimdall_Data.config.echoer.debug then
print(string.format("[%s] Ignoring message from non-master channel", ModuleName)) -- print(string.format("[%s] Ignoring message from non-master channel", ModuleName))
end -- end
return return
end end
if Heimdall_Data.config.echoer.debug then if Heimdall_Data.config.echoer.debug then

View File

@@ -9,27 +9,27 @@ function shared.Emoter.Init()
local frame = CreateFrame("Frame") local frame = CreateFrame("Frame")
frame:RegisterEvent("CHAT_MSG_CHANNEL") frame:RegisterEvent("CHAT_MSG_CHANNEL")
frame:SetScript("OnEvent", function(self, event, msg, sender, ...) frame:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.emoter.debug then -- if Heimdall_Data.config.emoter.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.emoter.enabled then if not Heimdall_Data.config.emoter.enabled then
-- if Heimdall_Data.config.emoter.debug then -- if Heimdall_Data.config.emoter.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.emoter.debug then -- if Heimdall_Data.config.emoter.debug then
-- print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname)) -- print(string.format("[%s] Processing message from channel: %s", ModuleName, channelname))
-- end -- end
if channelname ~= Heimdall_Data.config.emoter.masterChannel then if channelname ~= Heimdall_Data.config.emoter.masterChannel then
-- if Heimdall_Data.config.emoter.debug then -- if Heimdall_Data.config.emoter.debug then
-- print(string.format("[%s] Ignoring message from non-master channel", ModuleName)) -- print(string.format("[%s] Ignoring message from non-master channel", ModuleName))
-- end -- end
return return
end end
if Heimdall_Data.config.emoter.debug then if Heimdall_Data.config.emoter.debug then

View File

@@ -192,6 +192,31 @@ function shared.Inviter.Init()
end end
end) end)
if Heimdall_Data.config.inviter.debug then
print(string.format("[%s] Module initialized - All assist: %s, Agents assist: %s",
ModuleName,
tostring(Heimdall_Data.config.inviter.allAssist),
tostring(Heimdall_Data.config.inviter.agentsAssist)))
end
print("[Heimdall] Inviter loaded")
einviterChannelFrame:RegisterEvent("CHAT_MSG_CHANNEL")
inviterChannelFrame:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.inviter.debug then
-- print(string.format("[%s] Chat message received: %s", ModuleName, msg))
-- shared.dumpTable(Heimdall_Data.config.inviter)
-- end
if not Heimdall_Data.config.inviter.enabled then return end
local channelId = select(6, ...)
local _, channelname = GetChannelName(channelId)
if channelname ~= Heimdall_Data.config.inviter.listeningChannel then return end
if msg == Heimdall_Data.config.inviter.keyword then
if Heimdall_Data.config.inviter.debug then
print(string.format("[%s] Inviting %s", ModuleName, sender))
end
InviteUnit(sender)
end
end)
if Heimdall_Data.config.inviter.debug then if Heimdall_Data.config.inviter.debug then
print(string.format("[%s] Module initialized - All assist: %s, Agents assist: %s", print(string.format("[%s] Module initialized - All assist: %s, Agents assist: %s",
ModuleName, ModuleName,

View File

@@ -11,17 +11,6 @@ function shared.Messenger.Init()
---@field channel string ---@field channel string
---@field data string ---@field data string
local function GetChannelId(channelName)
local channels = { GetChannelList() }
for i = 1, #channels, 2 do
local id = channels[i]
local name = channels[i + 1]
if name == channelName then
return id
end
end
end
local function FindOrJoinChannel(channelName, password) local function FindOrJoinChannel(channelName, password)
local channelId = GetChannelName(channelName) local channelId = GetChannelName(channelName)
if channelId == 0 then if channelId == 0 then
@@ -78,7 +67,8 @@ function shared.Messenger.Init()
if message.channel == "CHANNEL" and message.data and string.match(message.data, "%D") then if message.channel == "CHANNEL" and message.data and string.match(message.data, "%D") then
if Heimdall_Data.config.messenger.debug then if Heimdall_Data.config.messenger.debug then
print(string.format("[%s] Processing channel message: '%s' to '%s'", ModuleName, message.message, message.data)) print(string.format("[%s] Processing channel message: '%s' to '%s'", ModuleName, message.message,
message.data))
end end
local channelId = GetChannelName(message.data) local channelId = GetChannelName(message.data)
if channelId == 0 then if channelId == 0 then
@@ -114,7 +104,8 @@ function shared.Messenger.Init()
end end
if Heimdall_Data.config.messenger.debug then if Heimdall_Data.config.messenger.debug then
print(string.format("[%s] Sending message: '%s' to %s:%s", ModuleName, message.message, message.channel, message.data)) print(string.format("[%s] Sending message: '%s' to %s:%s", ModuleName, message.message, message.channel,
message.data))
end end
SendChatMessage(message.message, message.channel, nil, message.data) SendChatMessage(message.message, message.channel, nil, message.data)
end end
@@ -130,7 +121,8 @@ function shared.Messenger.Init()
end end
if Heimdall_Data.config.messenger.debug then if Heimdall_Data.config.messenger.debug then
print(string.format("[%s] Module initialized with interval: %s", ModuleName, Heimdall_Data.config.messenger.interval)) print(string.format("[%s] Module initialized with interval: %s", ModuleName,
Heimdall_Data.config.messenger.interval))
end end
print("[Heimdall] Messenger loaded") print("[Heimdall] Messenger loaded")
end end

View File

@@ -67,7 +67,8 @@ function shared.Spotter.Init()
end end
if Heimdall_Data.config.spotter.debug then if Heimdall_Data.config.spotter.debug then
print(string.format("[%s] Using everyone setting: %s", ModuleName, tostring(Heimdall_Data.config.spotter.everyone))) print(string.format("[%s] Using everyone setting: %s", ModuleName,
tostring(Heimdall_Data.config.spotter.everyone)))
end end
return Heimdall_Data.config.spotter.everyone return Heimdall_Data.config.spotter.everyone
end end

View File

@@ -26,7 +26,8 @@ function shared.StinkyTracker.Init()
hostile = true hostile = true
} }
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
print(string.format("[%s] Found hostile player: %s (%s) at %s", ModuleName, name, class, date("%H:%M:%S", time()))) print(string.format("[%s] Found hostile player: %s (%s) at %s", ModuleName, name, class,
date("%H:%M:%S", time())))
end end
end end
return stinkies return stinkies
@@ -55,7 +56,8 @@ function shared.StinkyTracker.Init()
} }
stinkies[name] = stinky stinkies[name] = stinky
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
print(string.format("[%s] Found stinky in SEE: %s (%s) - %s at %s", ModuleName, name, class, aggression, date("%H:%M:%S", time()))) print(string.format("[%s] Found stinky in SEE: %s (%s) - %s at %s", ModuleName, name, class, aggression,
date("%H:%M:%S", time())))
end end
return stinkies return stinkies
end end
@@ -95,21 +97,21 @@ function shared.StinkyTracker.Init()
local frame = CreateFrame("Frame") local frame = CreateFrame("Frame")
frame:RegisterEvent("CHAT_MSG_CHANNEL") frame:RegisterEvent("CHAT_MSG_CHANNEL")
frame:SetScript("OnEvent", function(self, event, msg, sender, ...) frame:SetScript("OnEvent", function(self, event, msg, sender, ...)
-- if Heimdall_Data.config.stinkyTracker.debug then -- if Heimdall_Data.config.stinkyTracker.debug then
-- print(string.format("[%s] Event received: %s from %s", ModuleName, event, sender)) -- print(string.format("[%s] Event received: %s from %s", ModuleName, event, sender))
-- end -- end
if not Heimdall_Data.config.stinkyTracker.enabled then if not Heimdall_Data.config.stinkyTracker.enabled then
-- if Heimdall_Data.config.stinkyTracker.debug then -- if Heimdall_Data.config.stinkyTracker.debug then
-- print(string.format("[%s] Module disabled, ignoring event", ModuleName)) -- print(string.format("[%s] Module disabled, ignoring event", ModuleName))
-- end -- end
return return
end end
local channelId = select(6, ...) local channelId = select(6, ...)
local _, channelname = GetChannelName(channelId) local _, channelname = GetChannelName(channelId)
if channelname ~= Heimdall_Data.config.stinkyTracker.masterChannel then if channelname ~= Heimdall_Data.config.stinkyTracker.masterChannel then
-- if Heimdall_Data.config.stinkyTracker.debug then -- if Heimdall_Data.config.stinkyTracker.debug then
-- print(string.format("[%s] Ignoring message from non-master channel: %s", ModuleName, channelname)) -- print(string.format("[%s] Ignoring message from non-master channel: %s", ModuleName, channelname))
-- end -- end
return return
end end
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
@@ -129,7 +131,8 @@ function shared.StinkyTracker.Init()
if stinky.hostile then if stinky.hostile then
shared.stinkyTracker.stinkies[name] = stinky shared.stinkyTracker.stinkies[name] = stinky
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
print(string.format("[%s] Added hostile stinky from WHO: %s (%s)", ModuleName, name, stinky.class)) print(string.format("[%s] Added hostile stinky from WHO: %s (%s)", ModuleName, name, stinky
.class))
end end
end end
end end
@@ -146,7 +149,8 @@ function shared.StinkyTracker.Init()
if stinky.hostile then if stinky.hostile then
shared.stinkyTracker.stinkies[name] = stinky shared.stinkyTracker.stinkies[name] = stinky
if Heimdall_Data.config.stinkyTracker.debug then if Heimdall_Data.config.stinkyTracker.debug then
print(string.format("[%s] Added hostile stinky from SEE: %s (%s)", ModuleName, name, stinky.class)) print(string.format("[%s] Added hostile stinky from SEE: %s (%s)", ModuleName, name, stinky
.class))
end end
end end
if not stinky.hostile then if not stinky.hostile then

View File

@@ -172,7 +172,8 @@ function shared.Whoer.Init()
if Heimdall_Data.config.who.doWhisper then if Heimdall_Data.config.who.doWhisper then
if Heimdall_Data.config.who.debug then if Heimdall_Data.config.who.debug then
print(string.format("[%s] Processing whisper notifications for %d recipients", ModuleName, #Heimdall_Data.config.whisperNotify)) print(string.format("[%s] Processing whisper notifications for %d recipients", ModuleName,
#Heimdall_Data.config.whisperNotify))
end end
for _, name in pairs(Heimdall_Data.config.whisperNotify) do for _, name in pairs(Heimdall_Data.config.whisperNotify) do
---@type Message ---@type Message
@@ -359,6 +360,9 @@ function shared.Whoer.Init()
print(string.format("[%s] Player %s marked as stinky!", ModuleName, name)) print(string.format("[%s] Player %s marked as stinky!", ModuleName, name))
end end
player.stinky = true player.stinky = true
--PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
else
--PlaySoundFile("Interface\\Sounds\\Cloak.ogg", "Master")
end end
local err = Notify(player) local err = Notify(player)
@@ -432,4 +436,3 @@ function shared.Whoer.Init()
print("Heimdall - Whoer loaded") print("Heimdall - Whoer loaded")
end end