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 Tomas Slusny
parent 86ddedd507
commit 473d447ec7

View File

@@ -105,9 +105,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"
); );
@Inject @Inject
@@ -384,7 +387,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))