Merge branch 'master' into maven-plugin-upgrades

This commit is contained in:
William Collishaw
2019-05-02 17:49:41 -06:00
20 changed files with 51 additions and 36 deletions

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>cache-client</artifactId>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<name>Cache Updater</name>

2
cache/pom.xml vendored
View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>cache</artifactId>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<name>Web API</name>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<name>Web Service</name>

View File

@@ -28,7 +28,7 @@
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RuneLite</name>

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>protocol-api</artifactId>

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>protocol</artifactId>

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>runelite-api</artifactId>

View File

@@ -18575,5 +18575,6 @@ public final class ObjectID
public static final int STRANGE_CASKET = 34733;
public static final int INCONSPICUOUS_BUSH_BEGINNER = 34734;
public static final int STASH_BEGINNER = 34735;
public static final int ROCKS_34741 = 34741;
/* This file is automatically generated. Do not edit. */
}

View File

@@ -204,9 +204,9 @@ public class WidgetID
static class ClanChat
{
static final int TITLE = 1;
static final int NAME = 3;
static final int OWNER = 5;
static final int LIST = 15;
static final int NAME = 4;
static final int OWNER = 6;
static final int LIST = 16;
}
static class Bank

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>client</artifactId>

View File

@@ -87,8 +87,8 @@ import net.runelite.client.util.Text;
public class ClanChatPlugin extends Plugin
{
private static final int MAX_CHATS = 10;
private static final String CLAN_CHAT_TITLE = "Clan Chat";
private static final String RECENT_TITLE = "Recent Clan Chats";
private static final String CLAN_CHAT_TITLE = "CC";
private static final String RECENT_TITLE = "Recent CCs";
private static final int JOIN_LEAVE_DURATION = 20;
private static final int MESSAGE_DELAY = 10;

View File

@@ -55,7 +55,7 @@ enum ItemIdentification
HARRALANDER(Type.HERB, "Harra", "H", ItemID.HARRALANDER, ItemID.GRIMY_HARRALANDER),
RANARR(Type.HERB, "Ranarr", "R", ItemID.RANARR_WEED, ItemID.GRIMY_RANARR_WEED),
TOADFLAX(Type.HERB, "Toad", "TOA", ItemID.TOADFLAX, ItemID.GRIMY_TOADFLAX),
IRIT(Type.HERB, "Irit", "I", ItemID.IRIT_LEAF, ItemID.GRIMY_TOADFLAX),
IRIT(Type.HERB, "Irit", "I", ItemID.IRIT_LEAF, ItemID.GRIMY_IRIT_LEAF),
AVANTOE(Type.HERB, "Avantoe", "A", ItemID.AVANTOE, ItemID.GRIMY_AVANTOE),
KWUARM(Type.HERB, "Kwuarm", "K", ItemID.KWUARM, ItemID.GRIMY_KWUARM),
SNAPDRAGON(Type.HERB, "Snap", "S", ItemID.SNAPDRAGON, ItemID.GRIMY_SNAPDRAGON),

View File

@@ -26,7 +26,7 @@
package net.runelite.client.plugins.npchighlight;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Provides;
import java.time.Instant;
import java.util.ArrayList;
@@ -47,6 +47,7 @@ import net.runelite.api.GameState;
import net.runelite.api.GraphicID;
import net.runelite.api.GraphicsObject;
import net.runelite.api.MenuAction;
import static net.runelite.api.MenuAction.MENU_ACTION_DEPRIORITIZE_OFFSET;
import net.runelite.api.MenuEntry;
import net.runelite.api.NPC;
import net.runelite.api.coords.WorldPoint;
@@ -83,7 +84,7 @@ public class NpcIndicatorsPlugin extends Plugin
// Option added to NPC menu
private static final String TAG = "Tag";
private static final List<MenuAction> NPC_MENU_ACTIONS = ImmutableList.of(MenuAction.NPC_FIRST_OPTION, MenuAction.NPC_SECOND_OPTION,
private static final Set<MenuAction> NPC_MENU_ACTIONS = ImmutableSet.of(MenuAction.NPC_FIRST_OPTION, MenuAction.NPC_SECOND_OPTION,
MenuAction.NPC_THIRD_OPTION, MenuAction.NPC_FOURTH_OPTION, MenuAction.NPC_FIFTH_OPTION);
@Inject
@@ -249,38 +250,37 @@ public class NpcIndicatorsPlugin extends Plugin
@Subscribe
public void onMenuEntryAdded(MenuEntryAdded event)
{
MenuEntry[] menuEntries = client.getMenuEntries();
String target = event.getTarget();
final int identifier = event.getIdentifier();
int type = event.getType();
if (type >= 2000)
if (type >= MENU_ACTION_DEPRIORITIZE_OFFSET)
{
type -= 2000;
type -= MENU_ACTION_DEPRIORITIZE_OFFSET;
}
if (config.highlightMenuNames() &&
NPC_MENU_ACTIONS.contains(MenuAction.of(type)) &&
highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == identifier))
highlightedNpcs.stream().anyMatch(npc -> npc.getIndex() == event.getIdentifier()))
{
MenuEntry[] menuEntries = client.getMenuEntries();
final MenuEntry menuEntry = menuEntries[menuEntries.length - 1];
target = ColorUtil.prependColorTag(Text.removeTags(target), config.getHighlightColor());
final String target = ColorUtil.prependColorTag(Text.removeTags(event.getTarget()), config.getHighlightColor());
menuEntry.setTarget(target);
client.setMenuEntries(menuEntries);
}
if (hotKeyPressed && type == MenuAction.EXAMINE_NPC.getId())
else if (hotKeyPressed && type == MenuAction.EXAMINE_NPC.getId())
{
// Add tag option
MenuEntry[] menuEntries = client.getMenuEntries();
menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1);
final MenuEntry tagEntry = menuEntries[menuEntries.length - 1] = new MenuEntry();
tagEntry.setOption(TAG);
tagEntry.setTarget(target);
tagEntry.setTarget(event.getTarget());
tagEntry.setParam0(event.getActionParam0());
tagEntry.setParam1(event.getActionParam1());
tagEntry.setIdentifier(event.getIdentifier());
tagEntry.setType(MenuAction.RUNELITE.getId());
client.setMenuEntries(menuEntries);
}
client.setMenuEntries(menuEntries);
}
@Subscribe

View File

@@ -90,7 +90,7 @@ import net.runelite.http.api.chat.ChatClient;
public class SlayerPlugin extends Plugin
{
//Chat messages
private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("^(?:You're assigned to kill|You have received a new Slayer assignment from .*:) (?:[Tt]he )?(?<name>.+?)(?: (?:in|on) (?:the )?(?<location>[^;]+))?(?:; only | \\()(?<amount>\\d+)(?: more to go\\.|\\))$");
private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("^(?:You're assigned to kill|You have received a new Slayer assignment from .*:) (?:[Tt]he )?(?<name>.+?)(?: (?:in|on|south of) (?:the )?(?<location>[^;]+))?(?:; only | \\()(?<amount>\\d+)(?: more to go\\.|\\))$");
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.";
@@ -107,10 +107,10 @@ public class SlayerPlugin extends Plugin
private static final Pattern COMBAT_BRACELET_TASK_UPDATE_MESSAGE = Pattern.compile("^You still need to kill (\\d+) monsters to complete your current Slayer assignment");
//NPC messages
private static final Pattern NPC_ASSIGN_MESSAGE = Pattern.compile(".*(?:Your new task is to kill|You are to bring balance to)\\s*(?<amount>\\d+) (?<name>.+?)(?: (?:in|on) (?:the )?(?<location>.+))?\\.");
private static final Pattern NPC_ASSIGN_MESSAGE = Pattern.compile(".*(?:Your new task is to kill|You are to bring balance to)\\s*(?<amount>\\d+) (?<name>.+?)(?: (?:in|on|south of) (?:the )?(?<location>.+))?\\.");
private static final Pattern NPC_ASSIGN_BOSS_MESSAGE = Pattern.compile("^Excellent. You're now assigned to kill (?:the )?(.*) (\\d+) times.*Your reward point tally is (.*)\\.$");
private static final Pattern NPC_ASSIGN_FIRST_MESSAGE = Pattern.compile("^We'll start you off hunting (.*), you'll need to kill (\\d*) of them.");
private static final Pattern NPC_CURRENT_MESSAGE = Pattern.compile("^You're still (?:hunting|bringing balance to) (?<name>.+)(?: (?:in|on) (?:the )?(?<location>.+), with|; you have) (?<amount>\\d+) to go\\..*");
private static final Pattern NPC_CURRENT_MESSAGE = Pattern.compile("^You're still (?:hunting|bringing balance to) (?<name>.+)(?: (?:in|on|south of) (?:the )?(?<location>.+), with|; you have) (?<amount>\\d+) to go\\..*");
//Reward UI
private static final Pattern REWARD_POINTS = Pattern.compile("Reward points: ((?:\\d+,)*\\d+)");

View File

@@ -67,6 +67,7 @@ public class SlayerPluginTest
private static final String TASK_NEW = "Your new task is to kill 231 Suqahs.";
private static final String TASK_NEW_KONAR = "You are to bring balance to 147 Wyrms in the Karuulm Slayer Dungeon.";
private static final String TASK_NEW_KONAR_2 = "You are to bring balance to 142 Hellhounds in Witchhaven Dungeon.";
private static final String TASK_NEW_KONAR_3 = "You are to bring balance to 135 Trolls south of Mount Quidamortem.";
private static final String TASK_NEW_FIRST = "We'll start you off hunting goblins, you'll need to kill 17 of them.";
private static final String TASK_NEW_NPC_CONTACT = "Excellent, you're doing great. Your new task is to kill<br>211 Suqahs.";
private static final String TASK_NEW_FROM_PARTNER = "You have received a new Slayer assignment from breaklulz: Dust Devils (377)";
@@ -201,6 +202,19 @@ public class SlayerPluginTest
assertEquals("Witchhaven Dungeon", slayerPlugin.getTaskLocation());
}
@Test
public void testNewKonarTask3()
{
Widget npcDialog = mock(Widget.class);
when(npcDialog.getText()).thenReturn(TASK_NEW_KONAR_3);
when(client.getWidget(WidgetInfo.DIALOG_NPC_TEXT)).thenReturn(npcDialog);
slayerPlugin.onGameTick(new GameTick());
assertEquals("Trolls", slayerPlugin.getTaskName());
assertEquals(135, slayerPlugin.getAmount());
assertEquals("Mount Quidamortem", slayerPlugin.getTaskLocation());
}
@Test
public void testFirstTask()
{

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>mixins</artifactId>

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<artifactId>script-assembler-plugin</artifactId>

View File

@@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.5.22-SNAPSHOT</version>
<version>1.5.23-SNAPSHOT</version>
</parent>
<groupId>net.runelite.rs</groupId>