This commit is contained in:
@@ -110,8 +110,13 @@ function shared.MinimapTagger.Init()
|
||||
end
|
||||
if Heimdall_Data.config.minimapTagger.alertSound then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Playing alert sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.alertSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Playing alert sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.alertSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
if muteAlertUntil > GetTime() then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
@@ -121,14 +126,17 @@ function shared.MinimapTagger.Init()
|
||||
muteAlertUntil = GetTime() + Heimdall_Data.config.minimapTagger.alertSoundThrottle
|
||||
local ok = PlaySoundFile(SoundRoot .. Heimdall_Data.config.minimapTagger.alertSoundFile, "Master")
|
||||
if not ok and Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Failed to play alert sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.alertSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Failed to play alert sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.alertSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
if doTag then
|
||||
PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.alertTTL)
|
||||
end
|
||||
if doTag then PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.alertTTL) end
|
||||
end
|
||||
--endregion
|
||||
|
||||
@@ -166,8 +174,13 @@ function shared.MinimapTagger.Init()
|
||||
end
|
||||
if Heimdall_Data.config.minimapTagger.tagSound then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Playing tag sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.tagSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Playing tag sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.tagSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
if muteTagUntil > GetTime() then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
@@ -177,14 +190,17 @@ function shared.MinimapTagger.Init()
|
||||
muteTagUntil = GetTime() + Heimdall_Data.config.minimapTagger.tagSoundThrottle
|
||||
local ok = PlaySoundFile(SoundRoot .. Heimdall_Data.config.minimapTagger.tagSoundFile, "Master")
|
||||
if not ok and Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Failed to play tag sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.tagSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Failed to play tag sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.tagSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
if doTag then
|
||||
PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.tagTTL)
|
||||
end
|
||||
if doTag then PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.tagTTL) end
|
||||
end
|
||||
--endregion
|
||||
|
||||
@@ -222,8 +238,13 @@ function shared.MinimapTagger.Init()
|
||||
end
|
||||
if Heimdall_Data.config.minimapTagger.combatSound then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Playing combat sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.combatSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Playing combat sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.combatSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
if muteCombatUntil > GetTime() then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
@@ -233,14 +254,17 @@ function shared.MinimapTagger.Init()
|
||||
muteCombatUntil = GetTime() + Heimdall_Data.config.minimapTagger.combatSoundThrottle
|
||||
local ok = PlaySoundFile(SoundRoot .. Heimdall_Data.config.minimapTagger.combatSoundFile, "Master")
|
||||
if not ok and Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Failed to play combat sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.combatSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Failed to play combat sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.combatSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
if doTag then
|
||||
PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.combatTTL)
|
||||
end
|
||||
if doTag then PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.combatTTL) end
|
||||
end
|
||||
--endregion
|
||||
|
||||
@@ -278,8 +302,13 @@ function shared.MinimapTagger.Init()
|
||||
end
|
||||
if Heimdall_Data.config.minimapTagger.helpSound then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Playing help sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.helpSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Playing help sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.helpSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
if muteHelpUntil > GetTime() then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
@@ -289,14 +318,17 @@ function shared.MinimapTagger.Init()
|
||||
muteHelpUntil = GetTime() + Heimdall_Data.config.minimapTagger.helpSoundThrottle
|
||||
local ok = PlaySoundFile(SoundRoot .. Heimdall_Data.config.minimapTagger.helpSoundFile, "Master")
|
||||
if not ok and Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Failed to play help sound: %s", ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.helpSoundFile))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Failed to play help sound: %s",
|
||||
ModuleName,
|
||||
Heimdall_Data.config.minimapTagger.helpSoundFile
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
if doTag then
|
||||
PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.helpTTL)
|
||||
end
|
||||
if doTag then PlantFrame(x, y, frame, scale, Heimdall_Data.config.minimapTagger.helpTTL) end
|
||||
end
|
||||
--endregion
|
||||
|
||||
@@ -370,8 +402,14 @@ function shared.MinimapTagger.Init()
|
||||
|
||||
if not ok then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Ignoring message from non-master channel: %s, need %s", ModuleName, channelname,
|
||||
Heimdall_Data.config.minimapTagger.masterChannel))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Ignoring message from non-master channel: %s, need %s",
|
||||
ModuleName,
|
||||
channelname,
|
||||
Heimdall_Data.config.minimapTagger.masterChannel
|
||||
)
|
||||
)
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -387,8 +425,14 @@ function shared.MinimapTagger.Init()
|
||||
local currentMapId = GetCurrentMapAreaID()
|
||||
if currentMapId ~= messageMapId 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",
|
||||
ModuleName, currentMapId, messageMapId))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Current map ID (%d) does not match message map ID (%d), ignoring message",
|
||||
ModuleName,
|
||||
currentMapId,
|
||||
messageMapId
|
||||
)
|
||||
)
|
||||
end
|
||||
doTag = false
|
||||
end
|
||||
@@ -405,9 +449,7 @@ function shared.MinimapTagger.Init()
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found alert position: %s, %s", ModuleName, tostring(x), tostring(y)))
|
||||
end
|
||||
if x and y then
|
||||
PlantTag(tonumber(x), tonumber(y), 2, doTag)
|
||||
end
|
||||
if x and y then PlantTag(tonumber(x), tonumber(y), 2, doTag) end
|
||||
end
|
||||
--endregion
|
||||
--region Combat
|
||||
@@ -425,9 +467,7 @@ function shared.MinimapTagger.Init()
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found combat position: %s, %s", ModuleName, tostring(x), tostring(y)))
|
||||
end
|
||||
if x and y then
|
||||
PlantCombat(tonumber(x), tonumber(y), 2, doTag)
|
||||
end
|
||||
if x and y then PlantCombat(tonumber(x), tonumber(y), 2, doTag) end
|
||||
end
|
||||
--endregion
|
||||
--region Death
|
||||
@@ -445,9 +485,7 @@ function shared.MinimapTagger.Init()
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Found death position: %s, %s", ModuleName, tostring(x), tostring(y)))
|
||||
end
|
||||
if x and y then
|
||||
PlantAlert(tonumber(x), tonumber(y), 2, doTag)
|
||||
end
|
||||
if x and y then PlantAlert(tonumber(x), tonumber(y), 2, doTag) end
|
||||
end
|
||||
--endregion
|
||||
--region Help
|
||||
@@ -497,7 +535,5 @@ function shared.MinimapTagger.Init()
|
||||
print("[Heimdall] MinimapTagger loaded")
|
||||
end
|
||||
|
||||
SlashCmdList["HEIMDALL_MINIMAPTAGGER"] = function(args)
|
||||
shared.MinimapTagger.Init()
|
||||
end
|
||||
SlashCmdList["HEIMDALL_MINIMAPTAGGER"] = function(args) shared.MinimapTagger.Init() end
|
||||
SLASH_HEIMDALL_MINIMAPTAGGER1 = "/mf"
|
||||
|
||||
Reference in New Issue
Block a user