Standardize location reporting across modules
This commit is contained in:
@@ -79,11 +79,29 @@ function shared.DeathReporter.Init()
|
||||
ModuleName, source, destination, spellName))
|
||||
end
|
||||
|
||||
local location = Heimdall_Data.config.deathReporter.zoneOverride
|
||||
if not location or location == "" then
|
||||
location = string.format("%s (%s)", GetZoneText(), GetSubZoneText())
|
||||
end
|
||||
|
||||
local x, y = GetPlayerMapPosition("player")
|
||||
if Heimdall_Data.config.deathReporter.debug then
|
||||
print(string.format("[%s] Player coordinates: %.2f, %.2f", ModuleName, x * 100, y * 100))
|
||||
end
|
||||
|
||||
SetMapToCurrentZone()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
---@type Message
|
||||
local msg = {
|
||||
channel = "CHANNEL",
|
||||
data = Heimdall_Data.config.deathReporter.masterChannel,
|
||||
message = string.format("%s killed %s with %s", source, destination, spellName)
|
||||
message = string.format("%s killed %s with %s in %s [%s](%2.2f, %2.2f)",
|
||||
source,
|
||||
destination,
|
||||
spellName,
|
||||
location,
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
x * 100, y * 100)
|
||||
}
|
||||
if Heimdall_Data.config.deathReporter.debug then
|
||||
print(string.format("[%s] Adding message to queue: %s", ModuleName, msg.message))
|
||||
|
||||
Reference in New Issue
Block a user