Added Larran's chest to loot tracker (#9209)

Closes #9177
This commit is contained in:
Daniel
2019-06-26 16:05:04 -04:00
committed by sdburns1998
parent 6c9af71445
commit b98c40bd4f

View File

@@ -129,9 +129,12 @@ public class LootTrackerPlugin extends Plugin
// Chest loot handling // Chest loot handling
private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!"; private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!";
private static final Pattern LARRAN_LOOTED_PATTERN = Pattern.compile("You have opened Larran's (big|small) chest .*");
private static final Map<Integer, String> CHEST_EVENT_TYPES = ImmutableMap.of( private static final Map<Integer, String> CHEST_EVENT_TYPES = ImmutableMap.of(
5179, "Brimstone Chest", 5179, "Brimstone Chest",
11573, "Crystal Chest" 11573, "Crystal Chest",
12093, "Larran's big chest",
13113, "Larran's small chest"
); );
private static final File LOOT_RECORDS_FILE = new File(RuneLite.RUNELITE_DIR, "lootRecords.json"); private static final File LOOT_RECORDS_FILE = new File(RuneLite.RUNELITE_DIR, "lootRecords.json");
private static final Set<Integer> RESPAWN_REGIONS = ImmutableSet.of( private static final Set<Integer> RESPAWN_REGIONS = ImmutableSet.of(
@@ -538,7 +541,7 @@ public class LootTrackerPlugin extends Plugin
final String message = event.getMessage(); final String message = event.getMessage();
if (message.equals(CHEST_LOOTED_MESSAGE)) if (message.equals(CHEST_LOOTED_MESSAGE) || LARRAN_LOOTED_PATTERN.matcher(message).matches())
{ {
final int regionID = client.getLocalPlayer().getWorldLocation().getRegionID(); final int regionID = client.getLocalPlayer().getWorldLocation().getRegionID();
if (!CHEST_EVENT_TYPES.containsKey(regionID)) if (!CHEST_EVENT_TYPES.containsKey(regionID))