slayerplugin: Cancel task when leaving fight caves (#3150)

This commit is contained in:
Iguaan
2018-05-23 19:21:34 +03:00
committed by Tomas Slusny
parent 49180de422
commit c6d5c3d76e

View File

@@ -85,6 +85,7 @@ public class SlayerPlugin extends Plugin
private static final String CHAT_GEM_COMPLETE_MESSAGE = "You need something new to hunt.";
private static final Pattern CHAT_COMPLETE_MESSAGE = Pattern.compile("[\\d]+(?:,[\\d]+)?");
private static final String CHAT_CANCEL_MESSAGE = "Your task has been cancelled.";
private static final String CHAT_CANCEL_MESSAGE_JAD = "You no longer have a slayer task as you left the fight cave.";
private static final String CHAT_SUPERIOR_MESSAGE = "A superior foe has appeared...";
private static final String CHAT_BRACELET_SLAUGHTER = "Your bracelet of slaughter prevents your slayer";
private static final String CHAT_BRACELET_EXPEDITIOUS = "Your expeditious bracelet helps you progress your";
@@ -372,7 +373,7 @@ public class SlayerPlugin extends Plugin
return;
}
if (chatMsg.equals(CHAT_GEM_COMPLETE_MESSAGE) || chatMsg.equals(CHAT_CANCEL_MESSAGE))
if (chatMsg.equals(CHAT_GEM_COMPLETE_MESSAGE) || chatMsg.equals(CHAT_CANCEL_MESSAGE) || chatMsg.equals(CHAT_CANCEL_MESSAGE_JAD))
{
setTask("", 0);
return;