Hopefully fix nil in deathreporter
This commit is contained in:
@@ -88,9 +88,18 @@ function shared.DeathReporter.Init()
|
||||
if Heimdall_Data.config.deathReporter.debug then
|
||||
print(string.format("[%s] Player coordinates: %.2f, %.2f", ModuleName, x * 100, y * 100))
|
||||
end
|
||||
|
||||
SetMapToCurrentZone()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
local zoneId = GetCurrentMapAreaID()
|
||||
|
||||
source = source or "unknown"
|
||||
destination = destination or "unknown"
|
||||
spellName = spellName or "unknown"
|
||||
location = location or "unknown"
|
||||
zoneId = zoneId or 0
|
||||
x = x or 0
|
||||
y = y or 0
|
||||
|
||||
---@type Message
|
||||
local msg = {
|
||||
channel = "CHANNEL",
|
||||
@@ -100,7 +109,7 @@ function shared.DeathReporter.Init()
|
||||
destination,
|
||||
spellName,
|
||||
location,
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
zoneId,
|
||||
x * 100, y * 100)
|
||||
}
|
||||
if Heimdall_Data.config.deathReporter.debug then
|
||||
@@ -126,7 +135,7 @@ function shared.DeathReporter.Init()
|
||||
destination,
|
||||
spellName,
|
||||
string.format("%s (%s)", zone, subZone),
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
zoneId,
|
||||
x * 100, y * 100)
|
||||
}
|
||||
table.insert(shared.messenger.queue, msg)
|
||||
|
||||
Reference in New Issue
Block a user