add local loot saving for chests, clue scrolls, etc
Signed-off-by: PKLite <stonewall@pklite.xyz>
This commit is contained in:
@@ -518,14 +518,19 @@ public class LootTrackerPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
final LootTrackerItem[] entries = buildEntries(stack(items));
|
final LootTrackerItem[] entries = buildEntries(stack(items));
|
||||||
|
|
||||||
SwingUtilities.invokeLater(() -> panel.add(eventType, client.getLocalPlayer().getName(), -1, entries));
|
SwingUtilities.invokeLater(() -> panel.add(eventType, client.getLocalPlayer().getName(), -1, entries));
|
||||||
|
LootRecord lootRecord = new LootRecord(eventType, client.getLocalPlayer().getName(), LootRecordType.EVENT,
|
||||||
|
toGameItems(items), Instant.now());
|
||||||
|
|
||||||
if (lootTrackerClient != null && config.saveLoot())
|
if (lootTrackerClient != null && config.saveLoot())
|
||||||
{
|
{
|
||||||
LootRecord lootRecord = new LootRecord(eventType, client.getLocalPlayer().getName(), LootRecordType.EVENT,
|
|
||||||
toGameItems(items), Instant.now());
|
|
||||||
lootTrackerClient.submit(lootRecord);
|
lootTrackerClient.submit(lootRecord);
|
||||||
}
|
}
|
||||||
|
if (config.localPersistence())
|
||||||
|
{
|
||||||
|
saveLocalLootRecord(lootRecord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -744,13 +749,18 @@ public class LootTrackerPlugin extends Plugin
|
|||||||
final LootTrackerItem[] entries = buildEntries(stack(items));
|
final LootTrackerItem[] entries = buildEntries(stack(items));
|
||||||
SwingUtilities.invokeLater(() -> panel.add(chestType, client.getLocalPlayer().getName(), -1, entries));
|
SwingUtilities.invokeLater(() -> panel.add(chestType, client.getLocalPlayer().getName(), -1, entries));
|
||||||
|
|
||||||
|
LootRecord lootRecord = new LootRecord(chestType, client.getLocalPlayer().getName(),
|
||||||
|
LootRecordType.EVENT, toGameItems(items), Instant.now());
|
||||||
if (lootTrackerClient != null && config.saveLoot())
|
if (lootTrackerClient != null && config.saveLoot())
|
||||||
{
|
{
|
||||||
LootRecord lootRecord = new LootRecord(chestType, client.getLocalPlayer().getName(),
|
|
||||||
LootRecordType.EVENT, toGameItems(items), Instant.now());
|
|
||||||
lootTrackerClient.submit(lootRecord);
|
lootTrackerClient.submit(lootRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.localPersistence())
|
||||||
|
{
|
||||||
|
saveLocalLootRecord(lootRecord);
|
||||||
|
}
|
||||||
|
|
||||||
inventorySnapshot = null;
|
inventorySnapshot = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user