From 77859e2229122fb414a5dee7dcaa58b27fe08917 Mon Sep 17 00:00:00 2001 From: Gargul Date: Fri, 31 May 2024 16:28:43 +0200 Subject: [PATCH] Sort exported loot entries by award time --- Classes/Exporter.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Classes/Exporter.lua b/Classes/Exporter.lua index 5b6f3622..3eddfd0c 100644 --- a/Classes/Exporter.lua +++ b/Classes/Exporter.lua @@ -256,6 +256,15 @@ function Exporter:getLootEntries(raw) end)(); end + -- Sort the entries by award time + table.sort(Entries, function (a, b) + if (not a.timestamp or not b.timestamp) then + return false; + end + + return a.timestamp < b.timestamp; + end); + return Entries; end