From 70f6d207acad0dbe6b6e8d491bdd9989d0b5e15b Mon Sep 17 00:00:00 2001 From: PKLite Date: Tue, 11 Jun 2019 21:02:37 -0400 Subject: [PATCH] Adds constructor for data retrieved from http api (just uses a blank username for now) Signed-off-by: PKLite --- .../http/api/loottracker/LootRecord.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java index 4a802a12fb..993959ee88 100644 --- a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java +++ b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java @@ -26,6 +26,7 @@ package net.runelite.http.api.loottracker; import java.time.Instant; import java.util.Collection; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; @@ -42,4 +43,21 @@ public class LootRecord private LootRecordType type; private Collection drops; private Instant time; + + /** + * constructor for lootRecords retrieved by http api (doesn't store/retrieve username) + * @param eventId - the eventID or the name/title of the LootRecord + * @param type - The LootRecordType + * @param gameItems - the list of items/quantities + * @param time - the Instant that the Loot Record was received + */ + public LootRecord(String eventId, LootRecordType type, List gameItems, Instant time) + { + // Insert blank username + this.username = ""; + this.eventId = eventId; + this.type = type; + this.drops = gameItems; + this.time = time; + } }