Standardize location reporting across modules
This commit is contained in:
@@ -67,13 +67,16 @@ function shared.CombatAlerter.Init()
|
||||
y * 100))
|
||||
end
|
||||
|
||||
SetMapToCurrentZone()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
---@type Message
|
||||
local msg = {
|
||||
channel = "CHANNEL",
|
||||
data = Heimdall_Data.config.combatAlerter.masterChannel,
|
||||
message = string.format("%s is attacking me in %s(%s) at %2.2f,%2.2f ",
|
||||
message = string.format("I am in combat with %s at %s (%s) at [%s](%2.2f, %2.2f)",
|
||||
source,
|
||||
zone, subZone,
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
x * 100, y * 100
|
||||
),
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -154,7 +154,9 @@ function shared.Spotter.Init()
|
||||
end
|
||||
|
||||
local stinky = Heimdall_Data.config.stinkies[name] or false
|
||||
local text = string.format("I see (%s) %s/%s %s of race %s (%s) with health %s/%s at %s (%2.2f, %2.2f)",
|
||||
SetMapToCurrentZone()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
local text = string.format("I see (%s) %s/%s %s of race %s (%s) with health %s/%s at %s [%s](%2.2f, %2.2f)",
|
||||
hostile and "Hostile" or "Friendly",
|
||||
name,
|
||||
class,
|
||||
@@ -164,6 +166,7 @@ function shared.Spotter.Init()
|
||||
FormatHP(hp),
|
||||
FormatHP(maxHp),
|
||||
location,
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
x * 100, y * 100)
|
||||
|
||||
if Heimdall_Data.config.spotter.debug then
|
||||
|
||||
Reference in New Issue
Block a user