loottracker service: include time in loot record
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package net.runelite.http.api.loottracker;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -37,4 +38,5 @@ public class LootRecord
|
||||
private String eventId;
|
||||
private LootRecordType type;
|
||||
private Collection<GameItem> drops;
|
||||
private Instant time;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class LootTrackerService
|
||||
{
|
||||
if (!gameItems.isEmpty())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(current.getEventId(), current.getType(), gameItems);
|
||||
LootRecord lootRecord = new LootRecord(current.getEventId(), current.getType(), gameItems, current.getTime());
|
||||
lootRecords.add(lootRecord);
|
||||
|
||||
gameItems = new ArrayList<>();
|
||||
@@ -157,7 +157,7 @@ public class LootTrackerService
|
||||
|
||||
if (!gameItems.isEmpty())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(current.getEventId(), current.getType(), gameItems);
|
||||
LootRecord lootRecord = new LootRecord(current.getEventId(), current.getType(), gameItems, current.getTime());
|
||||
lootRecords.add(lootRecord);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ package net.runelite.client.plugins.loottracker;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -274,7 +275,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
|
||||
if (lootTrackerClient != null && config.saveLoot())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(name, LootRecordType.NPC, toGameItems(items));
|
||||
LootRecord lootRecord = new LootRecord(name, LootRecordType.NPC, toGameItems(items), Instant.now());
|
||||
lootTrackerClient.submit(lootRecord);
|
||||
}
|
||||
}
|
||||
@@ -291,7 +292,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
|
||||
if (lootTrackerClient != null && config.saveLoot())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(name, LootRecordType.PLAYER, toGameItems(items));
|
||||
LootRecord lootRecord = new LootRecord(name, LootRecordType.PLAYER, toGameItems(items), Instant.now());
|
||||
lootTrackerClient.submit(lootRecord);
|
||||
}
|
||||
}
|
||||
@@ -350,7 +351,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
|
||||
if (lootTrackerClient != null && config.saveLoot())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(eventType, LootRecordType.EVENT, toGameItems(items));
|
||||
LootRecord lootRecord = new LootRecord(eventType, LootRecordType.EVENT, toGameItems(items), Instant.now());
|
||||
lootTrackerClient.submit(lootRecord);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user