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
|
if Heimdall_Data.config.deathReporter.debug then
|
||||||
print(string.format("[%s] Player coordinates: %.2f, %.2f", ModuleName, x * 100, y * 100))
|
print(string.format("[%s] Player coordinates: %.2f, %.2f", ModuleName, x * 100, y * 100))
|
||||||
end
|
end
|
||||||
|
|
||||||
SetMapToCurrentZone()
|
SetMapToCurrentZone()
|
||||||
SetMapByID(GetCurrentMapAreaID())
|
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
|
---@type Message
|
||||||
local msg = {
|
local msg = {
|
||||||
channel = "CHANNEL",
|
channel = "CHANNEL",
|
||||||
@@ -100,7 +109,7 @@ function shared.DeathReporter.Init()
|
|||||||
destination,
|
destination,
|
||||||
spellName,
|
spellName,
|
||||||
location,
|
location,
|
||||||
tostring(GetCurrentMapAreaID()),
|
zoneId,
|
||||||
x * 100, y * 100)
|
x * 100, y * 100)
|
||||||
}
|
}
|
||||||
if Heimdall_Data.config.deathReporter.debug then
|
if Heimdall_Data.config.deathReporter.debug then
|
||||||
@@ -126,7 +135,7 @@ function shared.DeathReporter.Init()
|
|||||||
destination,
|
destination,
|
||||||
spellName,
|
spellName,
|
||||||
string.format("%s (%s)", zone, subZone),
|
string.format("%s (%s)", zone, subZone),
|
||||||
tostring(GetCurrentMapAreaID()),
|
zoneId,
|
||||||
x * 100, y * 100)
|
x * 100, y * 100)
|
||||||
}
|
}
|
||||||
table.insert(shared.messenger.queue, msg)
|
table.insert(shared.messenger.queue, msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user