loot tracker: add world id to loot record for dmmt
This commit is contained in:
@@ -40,4 +40,5 @@ public class LootRecord
|
||||
private Object metadata;
|
||||
private Collection<GameItem> drops;
|
||||
private Instant time;
|
||||
private Integer world;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ import net.runelite.api.ObjectID;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.api.SpriteID;
|
||||
import net.runelite.api.WorldType;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
@@ -479,7 +480,7 @@ public class LootTrackerPlugin extends Plugin
|
||||
|
||||
if (config.saveLoot())
|
||||
{
|
||||
LootRecord lootRecord = new LootRecord(name, type, metadata, toGameItems(items), Instant.now());
|
||||
LootRecord lootRecord = new LootRecord(name, type, metadata, toGameItems(items), Instant.now(), getLootWorldId());
|
||||
synchronized (queuedLoots)
|
||||
{
|
||||
queuedLoots.add(lootRecord);
|
||||
@@ -489,6 +490,12 @@ public class LootTrackerPlugin extends Plugin
|
||||
eventBus.post(new LootReceived(name, combatLevel, type, items));
|
||||
}
|
||||
|
||||
private Integer getLootWorldId()
|
||||
{
|
||||
// For the wiki to determine drop rates based on dmm brackets
|
||||
return client.getWorldType().contains(WorldType.SEASONAL) ? client.getWorld() : null;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onNpcLootReceived(final NpcLootReceived npcLootReceived)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user