@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user