Skip to content

Commit 777f0cc

Browse files
Updated last_alerted to also use Unix epoch time and fixed bug with name-only headline generation.
Brough the last_alerted in line with Hazal's change to last_seen. Also added a fallback to index the udi by name in alert report generation, which was causing a lua error with name-only matches when trying to look up their entry in the udi table.
1 parent 63288fc commit 777f0cc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

core.lua

+5-2
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ function SB:is_off_alert_lockout()
580580
local udi = self:get_UDI()
581581
local q = self.query
582582
local index = q.guid
583-
local timeNow=GetServerTime()
583+
local timeNow = GetServerTime()
584584
if not q.guid_match then
585585
index = q.full_name
586586
end
@@ -707,7 +707,7 @@ function SB:update_UDI()
707707
local p = udi[index]
708708

709709
-- Always update last seen
710-
p.last_seen = GetTime()
710+
p.last_seen = GetServerTime()
711711

712712
-- At this point can also check the provider names against the actual name of
713713
-- any GUID-matched player in-game.
@@ -742,6 +742,9 @@ function SB:construct_printout_headline()
742742
local q = self.query
743743
local udi = self:get_UDI()
744744
local u = udi[q.guid]
745+
if not u then
746+
u = udi[q.full_name]
747+
end
745748
local name = self:colorise_name(u.short_name, u.english_class)
746749
if u == nil then
747750
u = udi[q.full_name]

test_list.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ local case_data_1 = {
4141
name = "Swedger",
4242
},
4343
[1] = {
44-
name = "Accomplice",
44+
name = "Kasuka",
4545
class = "DRUID",
4646
}
4747
},

0 commit comments

Comments
 (0)