From 0f4b921124b742985f1abd3e5191d983291d3595 Mon Sep 17 00:00:00 2001 From: Vetricci <81270549+Vetricci@users.noreply.github.com> Date: Mon, 26 Jul 2021 17:32:04 -0500 Subject: [PATCH 01/20] itemstats: Add new Gauntlet food --- .../net/runelite/client/plugins/itemstats/ItemStatChanges.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java index e8aa2b4de9..2016aa6dcb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java @@ -212,6 +212,7 @@ public class ItemStatChanges add(combo(boost(ATTACK, 2), boost(STRENGTH, 1), heal(DEFENCE, -1)), JANGERBERRIES); // Gauntlet items + add(heal(HITPOINTS, 16), CRYSTAL_PADDLEFISH); add(heal(HITPOINTS, 20), PADDLEFISH); add(new GauntletPotion(), EGNIOL_POTION_1, EGNIOL_POTION_2, EGNIOL_POTION_3, EGNIOL_POTION_4); From 45b85bff6a687f5c5eab94d9e97f90a30896ae8f Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 27 Jul 2021 16:39:01 -0400 Subject: [PATCH 02/20] api: fix naming of menuoptionclicked params --- .../api/events/MenuOptionClicked.java | 26 +++++++++++++------ .../runelite/client/menus/MenuManager.java | 2 +- .../plugins/banktags/BankTagsPlugin.java | 4 +-- .../plugins/banktags/tabs/TabInterface.java | 16 ++++++------ .../chathistory/ChatHistoryPlugin.java | 2 +- .../woodcutting/CrowdsourcingWoodcutting.java | 2 +- .../plugins/devtools/WidgetInspector.java | 2 +- .../client/plugins/examine/ExaminePlugin.java | 6 ++--- .../friendnotes/FriendNotesPlugin.java | 2 +- .../plugins/herbiboars/HerbiboarPlugin.java | 2 +- .../kourendlibrary/KourendLibraryPlugin.java | 2 +- .../MenuEntrySwapperPlugin.java | 2 +- .../ObjectIndicatorsPlugin.java | 4 +-- .../puzzlesolver/PuzzleSolverPlugin.java | 2 +- .../client/plugins/timers/TimersPlugin.java | 2 +- .../client/plugins/wiki/WikiPlugin.java | 4 +-- .../plugins/xptracker/XpTrackerPlugin.java | 2 +- 17 files changed, 46 insertions(+), 36 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java b/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java index 2cd15c48f9..94ab334bc2 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java +++ b/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java @@ -42,9 +42,13 @@ import net.runelite.api.MenuAction; public class MenuOptionClicked { /** - * The action parameter used in the click. + * Action parameter 0. Its value depends on the menuAction. */ - private int actionParam; + private int param0; + /** + * Action parameter 1. Its value depends on the menuAction. + */ + private int param1; /** * The option text added to the menu. */ @@ -61,12 +65,6 @@ public class MenuOptionClicked * The ID of the object, actor, or item that the interaction targets. */ private int id; - /** - * The ID of the widget where the menu was clicked. - * - * @see net.runelite.api.widgets.WidgetID - */ - private int widgetId; /** * The selected item index at the time of the option click. */ @@ -87,4 +85,16 @@ public class MenuOptionClicked { this.consumed = true; } + + @Deprecated + public int getActionParam() + { + return param0; + } + + @Deprecated + public int getWidgetId() + { + return param1; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java b/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java index f5b76b335b..c6a952239a 100644 --- a/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java +++ b/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java @@ -206,7 +206,7 @@ public class MenuManager return; } - int widgetId = event.getWidgetId(); + int widgetId = event.getParam1(); Collection options = managedMenuOptions.get(widgetId); for (WidgetMenuOption curMenuOption : options) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java index 4e56358252..eb5da21a12 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/BankTagsPlugin.java @@ -371,12 +371,12 @@ public class BankTagsPlugin extends Plugin implements MouseWheelListener @Subscribe public void onMenuOptionClicked(MenuOptionClicked event) { - if (event.getWidgetId() == WidgetInfo.BANK_ITEM_CONTAINER.getId() + if (event.getParam1() == WidgetInfo.BANK_ITEM_CONTAINER.getId() && event.getMenuAction() == MenuAction.RUNELITE && event.getMenuOption().startsWith(EDIT_TAGS_MENU_OPTION)) { event.consume(); - int inventoryIndex = event.getActionParam(); + int inventoryIndex = event.getParam0(); ItemContainer bankContainer = client.getItemContainer(InventoryID.BANK); if (bankContainer == null) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index 0846efdf43..523e215b1f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -661,26 +661,26 @@ public class TabInterface activateTab(null); } else if (activeTab != null - && event.getWidgetId() == WidgetInfo.BANK_ITEM_CONTAINER.getId() + && event.getParam1() == WidgetInfo.BANK_ITEM_CONTAINER.getId() && event.getMenuAction() == MenuAction.RUNELITE && event.getMenuOption().startsWith(REMOVE_TAG)) { // Add "remove" menu entry to all items in bank while tab is selected event.consume(); - final ItemComposition item = getItem(event.getActionParam()); + final ItemComposition item = getItem(event.getParam0()); final int itemId = item.getId(); tagManager.removeTag(itemId, activeTab.getTag()); bankSearch.layoutBank(); // re-layout to filter the removed item out } else if (event.getMenuAction() == MenuAction.RUNELITE - && ((event.getWidgetId() == WidgetInfo.BANK_DEPOSIT_INVENTORY.getId() && event.getMenuOption().equals(TAG_INVENTORY)) - || (event.getWidgetId() == WidgetInfo.BANK_DEPOSIT_EQUIPMENT.getId() && event.getMenuOption().equals(TAG_GEAR)))) + && ((event.getParam1() == WidgetInfo.BANK_DEPOSIT_INVENTORY.getId() && event.getMenuOption().equals(TAG_INVENTORY)) + || (event.getParam1() == WidgetInfo.BANK_DEPOSIT_EQUIPMENT.getId() && event.getMenuOption().equals(TAG_GEAR)))) { - handleDeposit(event, event.getWidgetId() == WidgetInfo.BANK_DEPOSIT_INVENTORY.getId()); + handleDeposit(event, event.getParam1() == WidgetInfo.BANK_DEPOSIT_INVENTORY.getId()); } - else if (activeTab != null && ((event.getWidgetId() == WidgetInfo.BANK_EQUIPMENT_BUTTON.getId() && event.getMenuOption().equals(SHOW_WORN)) - || (event.getWidgetId() == WidgetInfo.BANK_SETTINGS_BUTTON.getId() && event.getMenuOption().equals(SHOW_SETTINGS)) - || (event.getWidgetId() == WidgetInfo.BANK_TUTORIAL_BUTTON.getId() && event.getMenuOption().equals(SHOW_TUTORIAL)))) + else if (activeTab != null && ((event.getParam1() == WidgetInfo.BANK_EQUIPMENT_BUTTON.getId() && event.getMenuOption().equals(SHOW_WORN)) + || (event.getParam1() == WidgetInfo.BANK_SETTINGS_BUTTON.getId() && event.getMenuOption().equals(SHOW_SETTINGS)) + || (event.getParam1() == WidgetInfo.BANK_TUTORIAL_BUTTON.getId() && event.getMenuOption().equals(SHOW_TUTORIAL)))) { saveTab(); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chathistory/ChatHistoryPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chathistory/ChatHistoryPlugin.java index 8464d973e0..3313caf91c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chathistory/ChatHistoryPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chathistory/ChatHistoryPlugin.java @@ -254,7 +254,7 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener // The menu option for clear history is "Public: Clear history" if (menuOption.endsWith(CLEAR_HISTORY)) { - clearChatboxHistory(ChatboxTab.of(event.getWidgetId())); + clearChatboxHistory(ChatboxTab.of(event.getParam1())); } else if (COPY_TO_CLIPBOARD.equals(menuOption) && !Strings.isNullOrEmpty(currentMessage)) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/crowdsourcing/woodcutting/CrowdsourcingWoodcutting.java b/runelite-client/src/main/java/net/runelite/client/plugins/crowdsourcing/woodcutting/CrowdsourcingWoodcutting.java index 2a52784764..98ee6c1b09 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/crowdsourcing/woodcutting/CrowdsourcingWoodcutting.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/crowdsourcing/woodcutting/CrowdsourcingWoodcutting.java @@ -276,7 +276,7 @@ public class CrowdsourcingWoodcutting state = SkillingState.CLICKED; lastExperimentEnd = client.getTickCount(); treeId = id; - treeLocation = WorldPoint.fromScene(client, menuOptionClicked.getActionParam(), menuOptionClicked.getWidgetId(), client.getPlane()); + treeLocation = WorldPoint.fromScene(client, menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), client.getPlane()); } else { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspector.java b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspector.java index d137ea3053..bb0ac5bf40 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspector.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspector.java @@ -487,7 +487,7 @@ class WidgetInspector extends DevToolsFrame client.setSpellSelected(false); ev.consume(); - Object target = getWidgetOrWidgetItemForMenuOption(ev.getMenuAction().getId(), ev.getActionParam(), ev.getWidgetId()); + Object target = getWidgetOrWidgetItemForMenuOption(ev.getMenuAction().getId(), ev.getParam0(), ev.getParam1()); if (target == null) { return; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java index 8e57e889c8..bda2548479 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java @@ -97,11 +97,11 @@ public class ExaminePlugin extends Plugin type = ExamineType.ITEM; id = event.getId(); - int widgetId = event.getWidgetId(); + int widgetId = event.getParam1(); int widgetGroup = TO_GROUP(widgetId); int widgetChild = TO_CHILD(widgetId); Widget widget = client.getWidget(widgetGroup, widgetChild); - WidgetItem widgetItem = widget.getWidgetItem(event.getActionParam()); + WidgetItem widgetItem = widget.getWidgetItem(event.getParam0()); quantity = widgetItem != null && widgetItem.getId() >= 0 ? widgetItem.getQuantity() : 1; // Examine on inventory items with more than 100000 quantity is handled locally and shows the item stack @@ -127,7 +127,7 @@ public class ExaminePlugin extends Plugin case CC_OP_LOW_PRIORITY: { type = ExamineType.ITEM_BANK_EQ; - int[] qi = findItemFromWidget(event.getWidgetId(), event.getActionParam()); + int[] qi = findItemFromWidget(event.getParam1(), event.getParam0()); if (qi == null) { log.debug("Examine for item with unknown widget: {}", event); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendnotes/FriendNotesPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/friendnotes/FriendNotesPlugin.java index 1a274d664c..db87e799a0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendnotes/FriendNotesPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/friendnotes/FriendNotesPlugin.java @@ -265,7 +265,7 @@ public class FriendNotesPlugin extends Plugin @Subscribe public void onMenuOptionClicked(MenuOptionClicked event) { - final int groupId = WidgetInfo.TO_GROUP(event.getWidgetId()); + final int groupId = WidgetInfo.TO_GROUP(event.getParam1()); if (groupId == WidgetInfo.FRIENDS_LIST.getGroupId() || groupId == WidgetInfo.IGNORE_LIST.getGroupId()) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/herbiboars/HerbiboarPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/herbiboars/HerbiboarPlugin.java index 02288075c5..7936730ff3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/herbiboars/HerbiboarPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/herbiboars/HerbiboarPlugin.java @@ -255,7 +255,7 @@ public class HerbiboarPlugin extends Plugin case "Rock": case "Mushroom": case "Driftwood": - startPoint = WorldPoint.fromScene(client, menuOpt.getActionParam(), menuOpt.getWidgetId(), client.getPlane()); + startPoint = WorldPoint.fromScene(client, menuOpt.getParam0(), menuOpt.getParam1(), client.getPlane()); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPlugin.java index b79ee73720..c4a3237535 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPlugin.java @@ -218,7 +218,7 @@ public class KourendLibraryPlugin extends Plugin { if (MenuAction.GAME_OBJECT_FIRST_OPTION == menuOpt.getMenuAction() && menuOpt.getMenuTarget().contains("Bookshelf")) { - lastBookcaseClick = WorldPoint.fromScene(client, menuOpt.getActionParam(), menuOpt.getWidgetId(), client.getPlane()); + lastBookcaseClick = WorldPoint.fromScene(client, menuOpt.getParam0(), menuOpt.getParam1(), client.getPlane()); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index 4ba7dd1558..5e632a991e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -646,7 +646,7 @@ public class MenuEntrySwapperPlugin extends Plugin @Subscribe public void onMenuOptionClicked(MenuOptionClicked event) { - if (event.getMenuAction() != MenuAction.RUNELITE || event.getWidgetId() != WidgetInfo.INVENTORY.getId()) + if (event.getMenuAction() != MenuAction.RUNELITE || event.getParam1() != WidgetInfo.INVENTORY.getId()) { return; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java index 5fe914b968..826eb725da 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java @@ -253,8 +253,8 @@ public class ObjectIndicatorsPlugin extends Plugin Scene scene = client.getScene(); Tile[][][] tiles = scene.getTiles(); - final int x = event.getActionParam(); - final int y = event.getWidgetId(); + final int x = event.getParam0(); + final int y = event.getParam1(); final int z = client.getPlane(); final Tile tile = tiles[z][x][y]; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/puzzlesolver/PuzzleSolverPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/puzzlesolver/PuzzleSolverPlugin.java index a2dfb8577b..0cf417f2d8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/puzzlesolver/PuzzleSolverPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/puzzlesolver/PuzzleSolverPlugin.java @@ -138,7 +138,7 @@ public class PuzzleSolverPlugin extends Plugin @Subscribe public void onMenuOptionClicked(MenuOptionClicked menuOptionClicked) { - int widgetId = menuOptionClicked.getWidgetId(); + int widgetId = menuOptionClicked.getParam1(); if (TO_GROUP(widgetId) != WidgetID.LIGHT_BOX_GROUP_ID) { return; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index 8efa8c2ed5..0171b9148e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -487,7 +487,7 @@ public class TimersPlugin extends Plugin imbuedHeartClickTick = client.getTickCount(); } - TeleportWidget teleportWidget = TeleportWidget.of(event.getWidgetId()); + TeleportWidget teleportWidget = TeleportWidget.of(event.getParam1()); if (teleportWidget != null) { lastTeleportClicked = teleportWidget; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java index a794f6c157..0e57fb47f7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java @@ -284,11 +284,11 @@ public class WikiPlugin extends Plugin } id = lc.getId(); name = lc.getName(); - location = WorldPoint.fromScene(client, ev.getActionParam(), ev.getWidgetId(), client.getPlane()); + location = WorldPoint.fromScene(client, ev.getParam0(), ev.getParam1(), client.getPlane()); break; } case SPELL_CAST_ON_WIDGET: - Widget w = getWidget(ev.getWidgetId(), ev.getActionParam()); + Widget w = getWidget(ev.getParam1(), ev.getParam0()); if (w.getType() == WidgetType.GRAPHIC && w.getItemId() != -1) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerPlugin.java index a69575503a..7433a81323 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpTrackerPlugin.java @@ -538,7 +538,7 @@ public class XpTrackerPlugin extends Plugin public void onMenuOptionClicked(MenuOptionClicked event) { if (event.getMenuAction().getId() != MenuAction.RUNELITE.getId() - || TO_GROUP(event.getWidgetId()) != WidgetID.SKILLS_GROUP_ID) + || TO_GROUP(event.getParam1()) != WidgetID.SKILLS_GROUP_ID) { return; } From 87c72e94a30434f2e7abcedcebee8da184fe2de9 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 28 Jul 2021 16:32:08 -0400 Subject: [PATCH 03/20] chat commands: fix parsing nightmare pb --- .../plugins/chatcommands/ChatCommandsPlugin.java | 2 +- .../chatcommands/ChatCommandsPluginTest.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 11dab4a780..1c48b810cf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -114,7 +114,7 @@ public class ChatCommandsPlugin extends Plugin private static final Pattern RAIDS_DURATION_PATTERN = Pattern.compile("Congratulations - your raid is complete!
Team size: " + COX_TEAM_SIZES + " Duration: [0-9:.]+ Personal best: (?[0-9:]+(?:\\.[0-9]+)?)"); private static final Pattern TOB_WAVE_PB_PATTERN = Pattern.compile("Theatre of Blood wave completion time: (?[0-9:]+(?:\\.[0-9]+)?) \\(new personal best\\)"); private static final Pattern TOB_WAVE_DURATION_PATTERN = Pattern.compile("Theatre of Blood wave completion time: [0-9:.]+\\. Personal best: (?[0-9:]+(?:\\.[0-9]+)?)"); - private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)^(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) [0-9:.]+\\. Personal best: (?:)?(?[0-9:]+(?:\\.[0-9]+)?)"); + private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) [0-9:.]+\\. Personal best: (?:)?(?[0-9:]+(?:\\.[0-9]+)?)"); private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?i)(?:(?:Fight |Lap |Challenge |Corrupted challenge )?duration:|Subdued in) (?[0-9:]+(?:\\.[0-9]+)?) \\(new personal best\\)"); private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?"); private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?"); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java index 5daeb49aca..77acb81b63 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/chatcommands/ChatCommandsPluginTest.java @@ -971,6 +971,19 @@ public class ChatCommandsPluginTest verify(configManager).setRSProfileConfiguration("personalbest", "nightmare", 3 * 60 + 28.0); } + @Test + public void testNightmareNoPb() + { + ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Nightmare kill count is: 1130", null, 0); + chatCommandsPlugin.onChatMessage(chatMessage); + + chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Team size: Solo Fight duration: 10:47. Personal best: 8:44", null, 0); + chatCommandsPlugin.onChatMessage(chatMessage); + + verify(configManager).setRSProfileConfiguration("killcount", "nightmare", 1130); + verify(configManager).setRSProfileConfiguration("personalbest", "nightmare", 8 * 60 + 44.0); + } + @Test public void testPlayerPetList() { From 7505862316040f135b005913d9cf435bce6f8958 Mon Sep 17 00:00:00 2001 From: Hydrox Date: Wed, 28 Jul 2021 22:08:08 +0100 Subject: [PATCH 04/20] world map: correct locations of quest markers (#13960) * world map: correct locations of quest markers * world map: remove unneeded multi-quest support Jagex have decided to make a marker for every quest now, instead of reusing markers for multiple quests. This simplifies logic a lot * world map: remove unneeded tooltip system The update on 28/07/21 added vanilla support for quest completion tooltips. As such, ours are no longer necessary. * world map: update config text to better reflect quest icons new function --- .../plugins/worldmap/QuestStartLocation.java | 94 ++++++++++--------- .../plugins/worldmap/WorldMapConfig.java | 4 +- .../plugins/worldmap/WorldMapPlugin.java | 24 +---- 3 files changed, 54 insertions(+), 68 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java index d3a8da0a61..6c73e79b4a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java @@ -29,32 +29,32 @@ import lombok.Getter; import net.runelite.api.Quest; import net.runelite.api.coords.WorldPoint; -// Some quests are in the same spot, but they are done in order. If multiple -// quests start in the same location, an array of quests is expected. enum QuestStartLocation { //Free Quests BELOW_ICE_MOUNTAIN(Quest.BELOW_ICE_MOUNTAIN, new WorldPoint(3001, 3436, 0)), - COOKS_ASSISTANT_RFD(Quest.COOKS_ASSISTANT, new WorldPoint(3211, 3216, 0)), + BLACK_KNIGHTS_FORTRESS(Quest.BLACK_KNIGHTS_FORTRESS, new WorldPoint(2959, 3336, 0)), + COOKS_ASSISTANT(Quest.COOKS_ASSISTANT, new WorldPoint(3209, 3215, 0)), THE_CORSAIR_CURSE(Quest.THE_CORSAIR_CURSE, new WorldPoint(3029, 3273, 0)), DEMON_SLAYER(Quest.DEMON_SLAYER, new WorldPoint(3204, 3424, 0)), DORICS_QUEST(Quest.DORICS_QUEST, new WorldPoint(2952, 3450, 0)), DRAGON_SLAYER_I(Quest.DRAGON_SLAYER_I, new WorldPoint(3190, 3362, 0)), ERNEST_THE_CHICKEN(Quest.ERNEST_THE_CHICKEN, new WorldPoint(3109, 3330, 0)), GOBLIN_DIPLOMACY(Quest.GOBLIN_DIPLOMACY, new WorldPoint(2957, 3509, 0)), - IMP_CATCHER(Quest.IMP_CATCHER, new WorldPoint(3108, 3160, 0)), + IMP_CATCHER(Quest.IMP_CATCHER, new WorldPoint(3102, 3164, 0)), THE_KNIGHTS_SWORD(Quest.THE_KNIGHTS_SWORD, new WorldPoint(2976, 3342, 0)), MISTHALIN_MYSTERY(Quest.MISTHALIN_MYSTERY, new WorldPoint(3235, 3155, 0)), PIRATES_TREASURE(Quest.PIRATES_TREASURE, new WorldPoint(3051, 3252, 0)), PRINCE_ALI_RESCUE(Quest.PRINCE_ALI_RESCUE, new WorldPoint(3301, 3163, 0)), THE_RESTLESS_GHOST(Quest.THE_RESTLESS_GHOST, new WorldPoint(3240, 3210, 0)), - RUNE_MYSTERIES(Quest.RUNE_MYSTERIES, new WorldPoint(3210, 3220, 0)), - SHEEP_SHEARER(Quest.SHEEP_SHEARER, new WorldPoint(3190, 3272, 0)), + ROMEO__JULIET(Quest.ROMEO__JULIET, new WorldPoint(3210, 3423, 0)), + RUNE_MYSTERIES(Quest.RUNE_MYSTERIES, new WorldPoint(3211, 3224, 0)), + SHEEP_SHEARER(Quest.SHEEP_SHEARER, new WorldPoint(3187, 3272, 0)), SHIELD_OF_ARRAV_PHOENIX_GANG(Quest.SHIELD_OF_ARRAV, new WorldPoint(3208, 3495, 0)), SHIELD_OF_ARRAV_BLACK_ARM_GANG(Quest.SHIELD_OF_ARRAV, new WorldPoint(3208, 3392, 0)), VAMPYRE_SLAYER(Quest.VAMPYRE_SLAYER, new WorldPoint(3096, 3266, 0)), - WITCHS_POTION(Quest.WITCHS_POTION, new WorldPoint(2967, 3203, 0)), - X_MARKS_THE_SPOT(Quest.X_MARKS_THE_SPOT, new WorldPoint(3227, 3242, 0)), + WITCHS_POTION(Quest.WITCHS_POTION, new WorldPoint(2968, 3204, 0)), + X_MARKS_THE_SPOT(Quest.X_MARKS_THE_SPOT, new WorldPoint(3226, 3242, 0)), //Members' Quests ANIMAL_MAGNETISM(Quest.ANIMAL_MAGNETISM, new WorldPoint(3094, 3360, 0)), @@ -65,29 +65,31 @@ enum QuestStartLocation BIOHAZARD(Quest.BIOHAZARD, new WorldPoint(2591, 3335, 0)), BONE_VOYAGE(Quest.BONE_VOYAGE, new WorldPoint(3259, 3450, 0)), CABIN_FEVER(Quest.CABIN_FEVER, new WorldPoint(3674, 3496, 0)), - CLIENT_OF_KOUREND(Quest.CLIENT_OF_KOUREND, new WorldPoint(1823, 3690, 0)), + CLIENT_OF_KOUREND(Quest.CLIENT_OF_KOUREND, new WorldPoint(1825, 3690, 0)), CLOCK_TOWER(Quest.CLOCK_TOWER, new WorldPoint(2568, 3249, 0)), COLD_WAR(Quest.COLD_WAR, new WorldPoint(2593, 3265, 0)), CONTACT(Quest.CONTACT, new WorldPoint(3280, 2770, 0)), CREATURE_OF_FENKENSTRAIN(Quest.CREATURE_OF_FENKENSTRAIN, new WorldPoint(3487, 3485, 0)), - DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3494, 9628, 0)), - DEATH_PLATEAU_TROLL_STRONGHOLD(new Quest[]{Quest.DEATH_PLATEAU, Quest.TROLL_STRONGHOLD}, new WorldPoint(2895, 3528, 0)), + DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3493, 9588, 0)), + DEATH_PLATEAU(Quest.DEATH_PLATEAU, new WorldPoint(2897, 3529, 0)), DEATH_TO_THE_DORGESHUUN(Quest.DEATH_TO_THE_DORGESHUUN, new WorldPoint(3316, 9613, 0)), THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1781, 3570, 0)), DESERT_TREASURE(Quest.DESERT_TREASURE, new WorldPoint(3177, 3043, 0)), DEVIOUS_MINDS(Quest.DEVIOUS_MINDS, new WorldPoint(3405, 3492, 0)), - THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3337, 0)), + THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3341, 0)), DRAGON_SLAYER_II(Quest.DRAGON_SLAYER_II, new WorldPoint(2456, 2868, 0)), DREAM_MENTOR(Quest.DREAM_MENTOR, new WorldPoint(2144, 10346, 0)), DRUIDIC_RITUAL(Quest.DRUIDIC_RITUAL, new WorldPoint(2916, 3484, 0)), DWARF_CANNON(Quest.DWARF_CANNON, new WorldPoint(2566, 3461, 0)), EADGARS_RUSE(Quest.EADGARS_RUSE, new WorldPoint(2896, 3426, 0)), EAGLES_PEAK(Quest.EAGLES_PEAK, new WorldPoint(2605, 3264, 0)), - ELEMENTAL_WORKSHOP(new Quest[]{Quest.ELEMENTAL_WORKSHOP_I, Quest.ELEMENTAL_WORKSHOP_II}, new WorldPoint(2714, 3482, 0)), + ELEMENTAL_WORKSHOP_I(Quest.ELEMENTAL_WORKSHOP_I, new WorldPoint(2714, 3482, 0)), + ELEMENTAL_WORKSHOP_II(Quest.ELEMENTAL_WORKSHOP_II, new WorldPoint(3364, 3335, 0)), ENAKHRAS_LAMENT(Quest.ENAKHRAS_LAMENT, new WorldPoint(3190, 2926, 0)), ENLIGHTENED_JOURNEY(Quest.ENLIGHTENED_JOURNEY, new WorldPoint(2809, 3356, 0)), - THE_EYES_OF_GLOUPHRIE(Quest.THE_EYES_OF_GLOUPHRIE, new WorldPoint(2400, 3419, 0)), - FAIRYTALE(new Quest[]{Quest.FAIRYTALE_I__GROWING_PAINS, Quest.FAIRYTALE_II__CURE_A_QUEEN}, new WorldPoint(3077, 3258, 0)), + THE_EYES_OF_GLOUPHRIE(Quest.THE_EYES_OF_GLOUPHRIE, new WorldPoint(2405, 9817, 0)), + FAIRYTALE_I(Quest.FAIRYTALE_I__GROWING_PAINS, new WorldPoint(3075, 3259, 0)), + FAIRYTALE_II(Quest.FAIRYTALE_II__CURE_A_QUEEN, new WorldPoint(3078, 3258, 0)), FAMILY_CREST(Quest.FAMILY_CREST, new WorldPoint(3278, 3404, 0)), THE_FEUD(Quest.THE_FEUD, new WorldPoint(3301, 3211, 0)), FIGHT_ARENA(Quest.FIGHT_ARENA, new WorldPoint(2565, 3199, 0)), @@ -96,60 +98,71 @@ enum QuestStartLocation FORGETTABLE_TALE(Quest.FORGETTABLE_TALE, new WorldPoint(2826, 10215, 0)), THE_FORSAKEN_TOWER(Quest.THE_FORSAKEN_TOWER, new WorldPoint(1482, 3748, 0)), THE_FREMENNIK_ISLES(Quest.THE_FREMENNIK_ISLES, new WorldPoint(2645, 3711, 0)), - THE_FREMENNIK_TRIALS(Quest.THE_FREMENNIK_TRIALS, new WorldPoint(2657, 3669, 0)), - THE_FREMENNIK_EXILES(Quest.THE_FREMENNIK_EXILES, new WorldPoint(2658, 3669, 0)), + THE_FREMENNIK_TRIALS(Quest.THE_FREMENNIK_TRIALS, new WorldPoint(2658, 3667, 0)), + THE_FREMENNIK_EXILES(Quest.THE_FREMENNIK_EXILES, new WorldPoint(2656, 3669, 0)), GARDEN_OF_TRANQUILLITY(Quest.GARDEN_OF_TRANQUILLITY, new WorldPoint(3227, 3477, 0)), - GERTRUDES_CAT_RATCATCHERS(Quest.GERTRUDES_CAT, new WorldPoint(3150, 3411, 0)), + GERTRUDES_CAT(Quest.GERTRUDES_CAT, new WorldPoint(3150, 3411, 0)), GETTING_AHEAD(Quest.GETTING_AHEAD, new WorldPoint(1247, 3686, 0)), GHOSTS_AHOY(Quest.GHOSTS_AHOY, new WorldPoint(3677, 3510, 0)), THE_GIANT_DWARF(Quest.THE_GIANT_DWARF, new WorldPoint(2841, 10129, 0)), THE_GOLEM(Quest.THE_GOLEM, new WorldPoint(3487, 3089, 0)), - THE_GRAND_TREE_MONKEY_MADNESS(new Quest[]{Quest.THE_GRAND_TREE, Quest.MONKEY_MADNESS_I, Quest.MONKEY_MADNESS_II}, new WorldPoint(2466, 3497, 0)), + THE_GRAND_TREE(Quest.THE_GRAND_TREE, new WorldPoint(2464, 3494, 0)), THE_GREAT_BRAIN_ROBBERY(Quest.THE_GREAT_BRAIN_ROBBERY, new WorldPoint(3681, 2963, 0)), GRIM_TALES(Quest.GRIM_TALES, new WorldPoint(2890, 3454, 0)), - THE_HAND_IN_THE_SAND(Quest.THE_HAND_IN_THE_SAND, new WorldPoint(2552, 3101, 0)), + THE_HAND_IN_THE_SAND(Quest.THE_HAND_IN_THE_SAND, new WorldPoint(2551, 3101, 0)), HAUNTED_MINE(Quest.HAUNTED_MINE, new WorldPoint(3443, 3258, 0)), HAZEEL_CULT(Quest.HAZEEL_CULT, new WorldPoint(2565, 3271, 0)), HEROES_QUEST(Quest.HEROES_QUEST, new WorldPoint(2903, 3511, 0)), - HOLY_GRAIL(new Quest[]{Quest.MERLINS_CRYSTAL, Quest.HOLY_GRAIL}, new WorldPoint(2763, 3515, 0)), + HOLY_GRAIL(Quest.HOLY_GRAIL, new WorldPoint(2763, 3513, 0)), HORROR_FROM_THE_DEEP(Quest.HORROR_FROM_THE_DEEP, new WorldPoint(2507, 3635, 0)), ICTHLARINS_LITTLE_HELPER(Quest.ICTHLARINS_LITTLE_HELPER, new WorldPoint(3314, 2849, 0)), + IN_AID_OF_THE_MYREQUE(Quest.IN_AID_OF_THE_MYREQUE, new WorldPoint(3505, 9839, 0)), IN_SEARCH_OF_THE_MYREQUE(Quest.IN_SEARCH_OF_THE_MYREQUE, new WorldPoint(3502, 3477, 0)), JUNGLE_POTION(Quest.JUNGLE_POTION, new WorldPoint(2809, 3086, 0)), A_KINGDOM_DIVIDED(Quest.A_KINGDOM_DIVIDED, new WorldPoint(1663, 3672, 0)), KINGS_RANSOM(Quest.KINGS_RANSOM, new WorldPoint(2741, 3554, 0)), LEGENDS_QUEST(Quest.LEGENDS_QUEST, new WorldPoint(2725, 3367, 0)), LOST_CITY(Quest.LOST_CITY, new WorldPoint(3149, 3205, 0)), - THE_LOST_TRIBE(Quest.THE_LOST_TRIBE, new WorldPoint(3211, 3224, 0)), + THE_LOST_TRIBE(Quest.THE_LOST_TRIBE, new WorldPoint(3210, 3220, 0)), LUNAR_DIPLOMACY(Quest.LUNAR_DIPLOMACY, new WorldPoint(2618, 3691, 0)), MAKING_FRIENDS_WITH_MY_ARM(Quest.MAKING_FRIENDS_WITH_MY_ARM, new WorldPoint(2904, 10092, 0)), MAKING_HISTORY(Quest.MAKING_HISTORY, new WorldPoint(2435, 3346, 0)), - MONKS_FRIEND(Quest.MONKS_FRIEND, new WorldPoint(2605, 3209, 0)), + MERLINS_CRYSTAL(Quest.MERLINS_CRYSTAL, new WorldPoint(2761, 3516, 0)), + MONKEY_MADNESS_I(Quest.MONKEY_MADNESS_I, new WorldPoint(2465, 3498, 0)), + MONKEY_MADNESS_II(Quest.MONKEY_MADNESS_II, new WorldPoint(2466, 3496, 0)), + MONKS_FRIEND(Quest.MONKS_FRIEND, new WorldPoint(2605, 3211, 0)), MOUNTAIN_DAUGHTER(Quest.MOUNTAIN_DAUGHTER, new WorldPoint(2810, 3672, 0)), - MOURNINGS_ENDS_PART_I(Quest.MOURNINGS_END_PART_I, new WorldPoint(2289, 3149, 0)), + MOURNINGS_ENDS_PART_I(Quest.MOURNINGS_END_PART_I, new WorldPoint(2288, 3147, 0)), MOURNINGS_ENDS_PART_II(Quest.MOURNINGS_END_PART_II, new WorldPoint(2352, 3172, 0)), MURDER_MYSTERY(Quest.MURDER_MYSTERY, new WorldPoint(2740, 3562, 0)), MY_ARMS_BIG_ADVENTURE(Quest.MY_ARMS_BIG_ADVENTURE, new WorldPoint(2908, 10088, 0)), - NATURE_SPIRIT(Quest.NATURE_SPIRIT, new WorldPoint(3440, 9894, 0)), + NATURE_SPIRIT(Quest.NATURE_SPIRIT, new WorldPoint(3423, 9886, 0)), A_NIGHT_AT_THE_THEATRE(Quest.A_NIGHT_AT_THE_THEATRE, new WorldPoint(3672, 3224, 0)), OBSERVATORY_QUEST(Quest.OBSERVATORY_QUEST, new WorldPoint(2438, 3185, 0)), OLAFS_QUEST(Quest.OLAFS_QUEST, new WorldPoint(2723, 3729, 0)), ONE_SMALL_FAVOUR(Quest.ONE_SMALL_FAVOUR, new WorldPoint(2834, 2985, 0)), - PLAGUE_CITY_SONG_OF_THE_ELVES(new Quest[]{Quest.PLAGUE_CITY, Quest.SONG_OF_THE_ELVES}, new WorldPoint(2567, 3334, 0)), + PLAGUE_CITY(Quest.PLAGUE_CITY, new WorldPoint(2568, 3332, 0)), A_PORCINE_OF_INTEREST(Quest.A_PORCINE_OF_INTEREST, new WorldPoint(3085, 3251, 0)), PRIEST_IN_PERIL(Quest.PRIEST_IN_PERIL, new WorldPoint(3219, 3473, 0)), THE_QUEEN_OF_THIEVES(Quest.THE_QUEEN_OF_THIEVES, new WorldPoint(1795, 3782, 0)), - RAG_AND_BONE_MAN_I(new Quest[]{Quest.RAG_AND_BONE_MAN_I, Quest.RAG_AND_BONE_MAN_II}, new WorldPoint(3359, 3504, 0)), - RECRUITMENT_DRIVE_BLACK_KNIGHTS_FORTRESS(new Quest[]{Quest.BLACK_KNIGHTS_FORTRESS, Quest.RECRUITMENT_DRIVE}, new WorldPoint(2959, 3336, 0)), - ROVING_ELVES(Quest.ROVING_ELVES, new WorldPoint(2288, 3146, 0)), - RUM_DEAL(Quest.RUM_DEAL, new WorldPoint(3679, 3535, 0)), - SCORPION_CATCHER(Quest.SCORPION_CATCHER, new WorldPoint(2701, 3399, 0)), + RAG_AND_BONE_MAN_I(Quest.RAG_AND_BONE_MAN_I, new WorldPoint(3359, 3504, 0)), + RAG_AND_BONE_MAN_II(Quest.RAG_AND_BONE_MAN_II, new WorldPoint(3361, 3507, 0)), + RATCATCHERS(Quest.RATCATCHERS, new WorldPoint(3243, 9867, 0)), + RECIPE_FOR_DISASTER(Quest.RECIPE_FOR_DISASTER, new WorldPoint(3206, 3213, 0)), + RECRUITMENT_DRIVE(Quest.RECRUITMENT_DRIVE, new WorldPoint(2962, 3338, 0)), + REGICIDE(Quest.REGICIDE, new WorldPoint(2575, 3293, 0)), + ROVING_ELVES(Quest.ROVING_ELVES, new WorldPoint(2287, 3144, 0)), + ROYAL_TROUBLE(Quest.ROYAL_TROUBLE, new WorldPoint(2497, 3857, 0)), + RUM_DEAL(Quest.RUM_DEAL, new WorldPoint(3677, 3535, 0)), + SCORPION_CATCHER(Quest.SCORPION_CATCHER, new WorldPoint(2700, 3404, 0)), SEA_SLUG(Quest.SEA_SLUG, new WorldPoint(2715, 3302, 0)), SHADES_OF_MORTTON(Quest.SHADES_OF_MORTTON, new WorldPoint(3463, 3308, 0)), SHADOW_OF_THE_STORM(Quest.SHADOW_OF_THE_STORM, new WorldPoint(3270, 3159, 0)), SHEEP_HERDER(Quest.SHEEP_HERDER, new WorldPoint(2616, 3299, 0)), SHILO_VILLAGE(Quest.SHILO_VILLAGE, new WorldPoint(2882, 2951, 0)), SINS_OF_THE_FATHER(Quest.SINS_OF_THE_FATHER, new WorldPoint(3728, 3319, 0)), + THE_SLUG_MENACE(Quest.THE_SLUG_MENACE, new WorldPoint(2994, 3374, 0)), + SONG_OF_THE_ELVES(Quest.SONG_OF_THE_ELVES, new WorldPoint(2567, 3335, 0)), A_SOULS_BANE(Quest.A_SOULS_BANE, new WorldPoint(3307, 3454, 0)), SPIRITS_OF_THE_ELID(Quest.SPIRITS_OF_THE_ELID, new WorldPoint(3441, 2911, 0)), SWAN_SONG(Quest.SWAN_SONG, new WorldPoint(2345, 3652, 0)), @@ -158,15 +171,16 @@ enum QuestStartLocation TALE_OF_THE_RIGHTEOUS(Quest.TALE_OF_THE_RIGHTEOUS, new WorldPoint(1541, 3570, 0)), A_TASTE_OF_HOPE(Quest.A_TASTE_OF_HOPE, new WorldPoint(3668, 3216, 0)), TEARS_OF_GUTHIX(Quest.TEARS_OF_GUTHIX, new WorldPoint(3251, 9517, 0)), - TEMPLE_OF_IKOV(Quest.TEMPLE_OF_IKOV, new WorldPoint(2574, 3320, 0)), - THRONE_OF_MISCELLANIA_ROYAL_TROUBLE(new Quest[]{Quest.THRONE_OF_MISCELLANIA, Quest.ROYAL_TROUBLE}, new WorldPoint(2497, 3859, 0)), + TEMPLE_OF_IKOV(Quest.TEMPLE_OF_IKOV, new WorldPoint(2571, 3320, 0)), + THRONE_OF_MISCELLANIA(Quest.THRONE_OF_MISCELLANIA, new WorldPoint(2497, 3861, 0)), THE_TOURIST_TRAP(Quest.THE_TOURIST_TRAP, new WorldPoint(3302, 3113, 0)), TOWER_OF_LIFE(Quest.TOWER_OF_LIFE, new WorldPoint(2640, 3218, 0)), TREE_GNOME_VILLAGE(Quest.TREE_GNOME_VILLAGE, new WorldPoint(2541, 3169, 0)), TRIBAL_TOTEM(Quest.TRIBAL_TOTEM, new WorldPoint(2790, 3182, 0)), TROLL_ROMANCE(Quest.TROLL_ROMANCE, new WorldPoint(2890, 10097, 0)), - UNDERGROUND_PASS_REGICIDE(new Quest[]{Quest.REGICIDE, Quest.UNDERGROUND_PASS}, new WorldPoint(2575, 3293, 0)), - WANTED_SLUG_MENACE(new Quest[]{Quest.WANTED, Quest.THE_SLUG_MENACE}, new WorldPoint(2996, 3373, 0)), + TROLL_STRONGHOLD(Quest.TROLL_STRONGHOLD, new WorldPoint(2893, 3528, 0)), + UNDERGROUND_PASS(Quest.UNDERGROUND_PASS, new WorldPoint(2578, 3295, 0)), + WANTED(Quest.WANTED, new WorldPoint(2998, 3372, 0)), WATCHTOWER(Quest.WATCHTOWER, new WorldPoint(2545, 3112, 0)), WATERFALL_QUEST(Quest.WATERFALL_QUEST, new WorldPoint(2521, 3498, 0)), WHAT_LIES_BELOW(Quest.WHAT_LIES_BELOW, new WorldPoint(3265, 3333, 0)), @@ -177,17 +191,11 @@ enum QuestStartLocation private final WorldPoint location; @Getter - private final Quest[] quests; - - QuestStartLocation(Quest[] quests, WorldPoint location) - { - this.location = location; - this.quests = quests; - } + private final Quest quest; QuestStartLocation(Quest quest, WorldPoint location) { this.location = location; - this.quests = new Quest[]{quest}; + this.quest = quest; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java index 3fbca342b6..fcd4c9f0ed 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java @@ -188,8 +188,8 @@ public interface WorldMapConfig extends Config @ConfigItem( keyName = WorldMapPlugin.CONFIG_KEY_QUEST_START_TOOLTIPS, - name = "Quest names and status", - description = "Indicates the names of quests and shows completion status", + name = "Quest status icons", + description = "Shows completion status of quests on the quest's icon", position = 15 ) default boolean questStartTooltips() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java index 1306c88b75..cfe7714b5e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java @@ -33,7 +33,6 @@ import java.util.function.Predicate; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.Quest; -import net.runelite.api.QuestState; import net.runelite.api.Skill; import net.runelite.api.events.StatChanged; import net.runelite.api.events.WidgetLoaded; @@ -505,41 +504,21 @@ public class WorldMapPlugin extends Plugin private MapPoint createQuestStartPoint(QuestStartLocation data) { - Quest[] quests = data.getQuests(); - - // Get first uncompleted quest. Else, return the last quest. - Quest quest = null; - for (Quest q : quests) - { - if (q.getState(client) != QuestState.FINISHED) - { - quest = q; - break; - } - } - if (quest == null) - { - quest = quests[quests.length - 1]; - } + Quest quest = data.getQuest(); BufferedImage icon = BLANK_ICON; - String tooltip = ""; if (quest != null) { - tooltip = quest.getName(); switch (quest.getState(client)) { case FINISHED: icon = FINISHED_ICON; - tooltip += " - Finished"; break; case IN_PROGRESS: icon = STARTED_ICON; - tooltip += " - Started"; break; case NOT_STARTED: icon = NOT_STARTED_ICON; - tooltip += " - Not Started"; break; } } @@ -548,7 +527,6 @@ public class WorldMapPlugin extends Plugin .type(MapPoint.Type.QUEST) .worldPoint(data.getLocation()) .image(icon) - .tooltip(tooltip) .build(); } From e276d5e5cee9d43d8dabeae6d8f326759b0d194f Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 29 Jul 2021 18:06:24 -0400 Subject: [PATCH 05/20] Add interact highlight plugin Co-authored-by: Eirik Leikvoll <12532870+LeikvollE@users.noreply.github.com> --- .../InteractHighlightConfig.java | 202 +++++++++++++++ .../InteractHighlightOverlay.java | 158 ++++++++++++ .../InteractHighlightPlugin.java | 230 ++++++++++++++++++ .../net/runelite/client/util/ColorUtil.java | 5 +- .../runelite/client/util/ColorUtilTest.java | 1 + 5 files changed, 595 insertions(+), 1 deletion(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightConfig.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightOverlay.java create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightConfig.java new file mode 100644 index 0000000000..8fff918cda --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightConfig.java @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.interacthighlight; + +import java.awt.Color; +import net.runelite.client.config.Alpha; +import net.runelite.client.config.Config; +import net.runelite.client.config.ConfigGroup; +import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; +import net.runelite.client.config.Range; + +@ConfigGroup("interacthighlight") +public interface InteractHighlightConfig extends Config +{ + @ConfigSection( + name = "NPCs", + description = "Settings for NPC highlight", + position = 0 + ) + String npcSection = "npcSection"; + + @ConfigSection( + name = "Objects", + description = "Settings for object highlight", + position = 1 + ) + String objectSection = "objectSection"; + + @ConfigItem( + keyName = "npcShowHover", + name = "Show on hover", + description = "Outline NPCs when hovered", + position = 1, + section = npcSection + ) + default boolean npcShowHover() + { + return true; + } + + @ConfigItem( + keyName = "npcShowInteract", + name = "Show on interact", + description = "Outline NPCs when interacted", + position = 2, + section = npcSection + ) + default boolean npcShowInteract() + { + return true; + } + + @Alpha + @ConfigItem( + keyName = "npcHoverHighlightColor", + name = "NPC hover", + description = "The color of the hover outline for NPCs", + position = 3, + section = npcSection + ) + default Color npcHoverHighlightColor() + { + return new Color(0x90FFFF00, true); + } + + @Alpha + @ConfigItem( + keyName = "npcAttackHoverHighlightColor", + name = "NPC attack hover", + description = "The color of the attack hover outline for NPCs", + position = 4, + section = npcSection + ) + default Color npcAttackHoverHighlightColor() + { + return new Color(0x90FFFF00, true); + } + + @Alpha + @ConfigItem( + keyName = "npcInteractHighlightColor", + name = "NPC interact", + description = "The color of the target outline for NPCs", + position = 5, + section = npcSection + ) + default Color npcInteractHighlightColor() + { + return new Color(0x90FF0000, true); + } + + @Alpha + @ConfigItem( + keyName = "npcAttackHighlightColor", + name = "NPC attack", + description = "The color of the outline on attacked NPCs", + position = 6, + section = npcSection + ) + default Color npcAttackHighlightColor() + { + return new Color(0x90FF0000, true); + } + + @ConfigItem( + keyName = "objectShowHover", + name = "Show on hover", + description = "Outline objects when hovered", + position = 1, + section = objectSection + ) + default boolean objectShowHover() + { + return true; + } + + @ConfigItem( + keyName = "objectShowInteract", + name = "Show on interact", + description = "Outline objects when interacted", + position = 2, + section = objectSection + ) + default boolean objectShowInteract() + { + return true; + } + + @Alpha + @ConfigItem( + keyName = "objectHoverHighlightColor", + name = "Object hover", + description = "The color of the hover outline for objects", + position = 4, + section = objectSection + ) + default Color objectHoverHighlightColor() + { + return new Color(0x9000FFFF, true); + } + + @Alpha + @ConfigItem( + keyName = "objectInteractHighlightColor", + name = "Object interact", + description = "The color of the target outline for objects", + position = 6, + section = objectSection + ) + default Color objectInteractHighlightColor() + { + return new Color(0x90FF0000, true); + } + + @ConfigItem( + keyName = "borderWidth", + name = "Border Width", + description = "Width of the outlined border", + position = 7 + ) + default int borderWidth() + { + return 4; + } + + @ConfigItem( + keyName = "outlineFeather", + name = "Outline feather", + description = "Specify between 0-4 how much of the model outline should be faded", + position = 8 + ) + @Range( + max = 4 + ) + default int outlineFeather() + { + return 4; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightOverlay.java new file mode 100644 index 0000000000..664d274f5a --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightOverlay.java @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.interacthighlight; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics2D; +import javax.inject.Inject; +import net.runelite.api.Actor; +import net.runelite.api.Client; +import net.runelite.api.MenuAction; +import net.runelite.api.MenuEntry; +import net.runelite.api.NPC; +import net.runelite.api.TileObject; +import net.runelite.client.ui.overlay.Overlay; +import net.runelite.client.ui.overlay.OverlayLayer; +import net.runelite.client.ui.overlay.OverlayPosition; +import net.runelite.client.ui.overlay.OverlayPriority; +import net.runelite.client.ui.overlay.outline.ModelOutlineRenderer; +import net.runelite.client.util.ColorUtil; + +class InteractHighlightOverlay extends Overlay +{ + private static final Color INTERACT_CLICK_COLOR = new Color(0x90ffffff); + + private final Client client; + private final InteractHighlightPlugin plugin; + private final InteractHighlightConfig config; + private final ModelOutlineRenderer modelOutlineRenderer; + + @Inject + private InteractHighlightOverlay(Client client, InteractHighlightPlugin plugin, InteractHighlightConfig config, ModelOutlineRenderer modelOutlineRenderer) + { + this.client = client; + this.plugin = plugin; + this.config = config; + this.modelOutlineRenderer = modelOutlineRenderer; + setPosition(OverlayPosition.DYNAMIC); + setLayer(OverlayLayer.ABOVE_SCENE); + setPriority(OverlayPriority.LOW); + } + + @Override + public Dimension render(Graphics2D graphics) + { + renderMouseover(); + renderTarget(); + return null; + } + + private void renderMouseover() + { + MenuEntry[] menuEntries = client.getMenuEntries(); + if (menuEntries.length == 0) + { + return; + } + + MenuEntry top = menuEntries[menuEntries.length - 1]; + MenuAction menuAction = MenuAction.of(top.getType()); + + switch (menuAction) + { + case ITEM_USE_ON_GAME_OBJECT: + case SPELL_CAST_ON_GAME_OBJECT: + case GAME_OBJECT_FIRST_OPTION: + case GAME_OBJECT_SECOND_OPTION: + case GAME_OBJECT_THIRD_OPTION: + case GAME_OBJECT_FOURTH_OPTION: + case GAME_OBJECT_FIFTH_OPTION: + { + int x = top.getParam0(); + int y = top.getParam1(); + int id = top.getIdentifier(); + TileObject tileObject = plugin.findTileObject(x, y, id); + if (tileObject != null && config.objectShowHover() && (tileObject != plugin.getInteractedObject() || !config.objectShowInteract())) + { + modelOutlineRenderer.drawOutline(tileObject, config.borderWidth(), config.objectHoverHighlightColor(), config.outlineFeather()); + } + break; + } + case ITEM_USE_ON_NPC: + case SPELL_CAST_ON_NPC: + case NPC_FIRST_OPTION: + case NPC_SECOND_OPTION: + case NPC_THIRD_OPTION: + case NPC_FOURTH_OPTION: + case NPC_FIFTH_OPTION: + { + int id = top.getIdentifier(); + NPC npc = plugin.findNpc(id); + if (npc != null && config.npcShowHover() && (npc != plugin.getInteractedTarget() || !config.npcShowInteract())) + { + Color highlightColor = menuAction == MenuAction.NPC_SECOND_OPTION || menuAction == MenuAction.SPELL_CAST_ON_NPC + ? config.npcAttackHoverHighlightColor() : config.npcHoverHighlightColor(); + modelOutlineRenderer.drawOutline(npc, config.borderWidth(), highlightColor, config.outlineFeather()); + } + break; + } + } + } + + private void renderTarget() + { + TileObject interactedObject = plugin.getInteractedObject(); + if (interactedObject != null && config.objectShowInteract()) + { + Color clickColor = getClickColor(config.objectHoverHighlightColor(), config.objectInteractHighlightColor(), + client.getGameCycle() - plugin.getGameCycle()); + modelOutlineRenderer.drawOutline(interactedObject, config.borderWidth(), clickColor, config.outlineFeather()); + } + + Actor target = plugin.getInteractedTarget(); + if (target instanceof NPC && config.npcShowInteract()) + { + Color startColor = plugin.isAttacked() ? config.npcAttackHoverHighlightColor() : config.npcHoverHighlightColor(); + Color endColor = plugin.isAttacked() ? config.npcAttackHighlightColor() : config.npcInteractHighlightColor(); + Color clickColor = getClickColor(startColor, endColor, + client.getGameCycle() - plugin.getGameCycle()); + modelOutlineRenderer.drawOutline((NPC) target, config.borderWidth(), clickColor, config.outlineFeather()); + } + } + + private Color getClickColor(Color start, Color end, long time) + { + if (time < 5) + { + return ColorUtil.colorLerp(start, INTERACT_CLICK_COLOR, time / 5f); + } + else if (time < 10) + { + return ColorUtil.colorLerp(INTERACT_CLICK_COLOR, end, (time - 5) / 5f); + } + return end; + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java new file mode 100644 index 0000000000..96ef8f1ba5 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.interacthighlight; + +import com.google.inject.Provides; +import javax.annotation.Nullable; +import javax.inject.Inject; +import lombok.AccessLevel; +import lombok.Getter; +import net.runelite.api.Actor; +import net.runelite.api.Client; +import net.runelite.api.DecorativeObject; +import net.runelite.api.GameObject; +import net.runelite.api.GameState; +import net.runelite.api.GroundObject; +import net.runelite.api.MenuAction; +import net.runelite.api.NPC; +import net.runelite.api.Scene; +import net.runelite.api.Tile; +import net.runelite.api.TileObject; +import net.runelite.api.WallObject; +import net.runelite.api.events.GameStateChanged; +import net.runelite.api.events.GameTick; +import net.runelite.api.events.MenuOptionClicked; +import net.runelite.api.events.NpcDespawned; +import net.runelite.client.config.ConfigManager; +import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.plugins.PluginDescriptor; +import net.runelite.client.ui.overlay.OverlayManager; + +@PluginDescriptor( + name = "Interact Highlight", + description = "Outlines npcs and objects you interact with or hover over", + enabledByDefault = false +) +public class InteractHighlightPlugin extends Plugin +{ + @Inject + private OverlayManager overlayManager; + + @Inject + private InteractHighlightOverlay interactHighlightOverlay; + + @Inject + private Client client; + + @Getter(AccessLevel.PACKAGE) + private TileObject interactedObject; + private NPC interactedNpc; + @Getter(AccessLevel.PACKAGE) + boolean attacked; + private int clickTick; + @Getter(AccessLevel.PACKAGE) + private int gameCycle; + + @Provides + InteractHighlightConfig provideConfig(ConfigManager configManager) + { + return configManager.getConfig(InteractHighlightConfig.class); + } + + @Override + protected void startUp() + { + overlayManager.add(interactHighlightOverlay); + } + + @Override + protected void shutDown() + { + overlayManager.remove(interactHighlightOverlay); + } + + @Subscribe + public void onGameStateChanged(GameStateChanged gameStateChanged) + { + if (gameStateChanged.getGameState() == GameState.LOADING) + { + interactedObject = null; + } + } + + @Subscribe + public void onNpcDespawned(NpcDespawned npcDespawned) + { + if (npcDespawned.getNpc() == interactedNpc) + { + interactedNpc = null; + } + } + + @Subscribe + public void onGameTick(GameTick gameTick) + { + if (client.getTickCount() > clickTick && client.getLocalDestinationLocation() == null) + { + // when the destination is reached, clear the interacting object + interactedObject = null; + interactedNpc = null; + } + } + + @Subscribe + public void onMenuOptionClicked(MenuOptionClicked menuOptionClicked) + { + switch (menuOptionClicked.getMenuAction()) + { + case ITEM_USE_ON_GAME_OBJECT: + case SPELL_CAST_ON_GAME_OBJECT: + case GAME_OBJECT_FIRST_OPTION: + case GAME_OBJECT_SECOND_OPTION: + case GAME_OBJECT_THIRD_OPTION: + case GAME_OBJECT_FOURTH_OPTION: + case GAME_OBJECT_FIFTH_OPTION: + { + int x = menuOptionClicked.getParam0(); + int y = menuOptionClicked.getParam1(); + int id = menuOptionClicked.getId(); + interactedObject = findTileObject(x, y, id); + interactedNpc = null; + clickTick = client.getTickCount(); + gameCycle = client.getGameCycle(); + break; + } + case ITEM_USE_ON_NPC: + case SPELL_CAST_ON_NPC: + case NPC_FIRST_OPTION: + case NPC_SECOND_OPTION: + case NPC_THIRD_OPTION: + case NPC_FOURTH_OPTION: + case NPC_FIFTH_OPTION: + { + int id = menuOptionClicked.getId(); + interactedObject = null; + interactedNpc = findNpc(id); + attacked = menuOptionClicked.getMenuAction() == MenuAction.NPC_SECOND_OPTION || menuOptionClicked.getMenuAction() == MenuAction.SPELL_CAST_ON_NPC; + clickTick = client.getTickCount(); + gameCycle = client.getGameCycle(); + break; + } + // Any menu click which clears an interaction + case WALK: + case ITEM_USE: + case ITEM_USE_ON_GROUND_ITEM: + case ITEM_USE_ON_PLAYER: + case ITEM_FIRST_OPTION: + case ITEM_SECOND_OPTION: + case ITEM_THIRD_OPTION: + case ITEM_FOURTH_OPTION: + case ITEM_FIFTH_OPTION: + case GROUND_ITEM_FIRST_OPTION: + case GROUND_ITEM_SECOND_OPTION: + case GROUND_ITEM_THIRD_OPTION: + case GROUND_ITEM_FOURTH_OPTION: + case GROUND_ITEM_FIFTH_OPTION: + interactedObject = null; + interactedNpc = null; + } + } + + TileObject findTileObject(int x, int y, int id) + { + Scene scene = client.getScene(); + Tile[][][] tiles = scene.getTiles(); + Tile tile = tiles[client.getPlane()][x][y]; + if (tile != null) + { + for (GameObject gameObject : tile.getGameObjects()) + { + if (gameObject != null && gameObject.getId() == id) + { + return gameObject; + } + } + + WallObject wallObject = tile.getWallObject(); + if (wallObject != null && wallObject.getId() == id) + { + return wallObject; + } + + DecorativeObject decorativeObject = tile.getDecorativeObject(); + if (decorativeObject != null && decorativeObject.getId() == id) + { + return decorativeObject; + } + + GroundObject groundObject = tile.getGroundObject(); + if (groundObject != null && groundObject.getId() == id) + { + return groundObject; + } + } + return null; + } + + NPC findNpc(int id) + { + return client.getCachedNPCs()[id]; + } + + @Nullable + Actor getInteractedTarget() + { + return interactedNpc != null ? interactedNpc : client.getLocalPlayer().getInteracting(); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java b/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java index 6b39003f11..6a7b8f8908 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ColorUtil.java @@ -101,11 +101,14 @@ public class ColorUtil final double g2 = b.getGreen(); final double b1 = a.getBlue(); final double b2 = b.getBlue(); + final double a1 = a.getAlpha(); + final double a2 = b.getAlpha(); return new Color( (int) Math.round(r1 + (t * (r2 - r1))), (int) Math.round(g1 + (t * (g2 - g1))), - (int) Math.round(b1 + (t * (b2 - b1))) + (int) Math.round(b1 + (t * (b2 - b1))), + (int) Math.round(a1 + (t * (a2 - a1))) ); } diff --git a/runelite-client/src/test/java/net/runelite/client/util/ColorUtilTest.java b/runelite-client/src/test/java/net/runelite/client/util/ColorUtilTest.java index 8a531b18bc..cf663d1fa2 100644 --- a/runelite-client/src/test/java/net/runelite/client/util/ColorUtilTest.java +++ b/runelite-client/src/test/java/net/runelite/client/util/ColorUtilTest.java @@ -116,6 +116,7 @@ public class ColorUtilTest assertEquals(new Color(128, 128, 128), ColorUtil.colorLerp(Color.BLACK, Color.WHITE, 0.5)); assertEquals(Color.BLACK, ColorUtil.colorLerp(Color.BLACK, Color.CYAN, 0)); assertEquals(Color.CYAN, ColorUtil.colorLerp(Color.BLACK, Color.CYAN, 1)); + assertEquals(new Color(0x80800080, true), ColorUtil.colorLerp(new Color(0xff0000ff, true), new Color(0x00ff0000, true), 0.5)); } @Test From 28cdb62198fc09c743899fd047b504010745d07a Mon Sep 17 00:00:00 2001 From: Trevor Engen <48308407+trevorengen@users.noreply.github.com> Date: Fri, 30 Jul 2021 22:36:11 -0700 Subject: [PATCH 06/20] slayer: Change moss giants task icon to mossy key (#13962) --- .../src/main/java/net/runelite/client/plugins/slayer/Task.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java index bb90740f61..4a079391a2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java @@ -137,7 +137,7 @@ enum Task MOGRES("Mogres", ItemID.MOGRE), MOLANISKS("Molanisks", ItemID.MOLANISK), MONKEYS("Monkeys", ItemID.ENSOULED_MONKEY_HEAD, "Tortured gorilla"), - MOSS_GIANTS("Moss giants", ItemID.HILL_GIANT_CLUB), + MOSS_GIANTS("Moss giants", ItemID.MOSSY_KEY), MUTATED_ZYGOMITES("Mutated zygomites", ItemID.MUTATED_ZYGOMITE, 7, ItemID.FUNGICIDE_SPRAY_0, "Zygomite", "Fungi"), NECHRYAEL("Nechryael", ItemID.NECHRYAEL, "Nechryarch"), OGRES("Ogres", ItemID.ENSOULED_OGRE_HEAD), From 240ec79da0418ffda87e77e5d6fd933dfe805002 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 31 Jul 2021 17:12:31 -0400 Subject: [PATCH 07/20] loot tracker: add ruins of camdozaal vault lockboxes Co-authored-by: Kevin --- .../client/plugins/loottracker/LootTrackerPlugin.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index 05d3ad751e..bdc4d738d7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -792,7 +792,8 @@ public class LootTrackerPlugin extends Plugin || WINTERTODT_SUPPLY_CRATE_EVENT.equals(eventType) || eventType.endsWith("Bird House") || eventType.startsWith("H.A.M. chest") - || lootRecordType == LootRecordType.PICKPOCKET) + || lootRecordType == LootRecordType.PICKPOCKET + || eventType.endsWith("lockbox")) { WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation(); Collection groundItems = lootManager.getItemSpawns(playerLocation); @@ -860,6 +861,12 @@ public class LootTrackerPlugin extends Plugin setEvent(LootRecordType.EVENT, TEMPOROSS_CASKET_EVENT); takeInventorySnapshot(); break; + case ItemID.SIMPLE_LOCKBOX_25647: + case ItemID.ELABORATE_LOCKBOX_25649: + case ItemID.ORNATE_LOCKBOX_25651: + setEvent(LootRecordType.EVENT, itemManager.getItemComposition(event.getId()).getName()); + takeInventorySnapshot(); + break; } } } From f85d5dff43f382c1214ca7822b404a32a4e821da Mon Sep 17 00:00:00 2001 From: Christian <42303117+Chicagolight@users.noreply.github.com> Date: Sun, 1 Aug 2021 10:07:12 -0500 Subject: [PATCH 08/20] menu swapper: add placeholder withdraw swap --- .../client/plugins/menuentryswapper/ShiftWithdrawMode.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/ShiftWithdrawMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/ShiftWithdrawMode.java index bbe09b1393..6e5d42a1fe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/ShiftWithdrawMode.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/ShiftWithdrawMode.java @@ -37,9 +37,10 @@ public enum ShiftWithdrawMode WITHDRAW_10("Withdraw-10", MenuAction.CC_OP, 4, 3), WITHDRAW_X("Withdraw-X", MenuAction.CC_OP, 5, 5), WITHDRAW_ALL("Withdraw-All", MenuAction.CC_OP_LOW_PRIORITY, 7, 4), - // chambers of xeric storage units do not have an "all-but-1" option, so this option will choose "Withdraw-all" - // instead when using the storage unit. + // chambers of xeric storage units do not have an "all-but-1" option or a "placeholder" option, so these options will choose "Withdraw-all" + // choose "Withdraw-all" instead when using the storage unit. WITHDRAW_ALL_BUT_1("Withdraw-All-But-1", MenuAction.CC_OP_LOW_PRIORITY, 8, 4), + WITHDRAW_PLACEHOLDER("Placeholder", MenuAction.CC_OP_LOW_PRIORITY, 9, 4), OFF("Off", MenuAction.UNKNOWN, 0, 0); private final String name; From 44134dc668158da1244b10f8ab1f04e9950e350b Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 23 May 2021 14:42:23 -0400 Subject: [PATCH 09/20] poh: fix burner overlay timers The object spawn event happens after the lighting animation, which was causing it to create a new burner with the default timers applied instead of the one applied via the fm level. Also fix computing upper limit on the random timer which is not inclusive of the fm level --- .../client/plugins/poh/BurnerOverlay.java | 7 +------ .../client/plugins/poh/IncenseBurner.java | 14 ++++++++------ .../runelite/client/plugins/poh/PohPlugin.java | 15 ++++++++++----- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/poh/BurnerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/poh/BurnerOverlay.java index 16c8d4edc3..0594e86dd5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/poh/BurnerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/poh/BurnerOverlay.java @@ -64,12 +64,7 @@ class BurnerOverlay extends Overlay plugin.getIncenseBurners().forEach((tile, burner) -> { - if (tile.getPlane() != client.getPlane()) - { - return; - } - - if (!PohPlugin.BURNER_LIT.contains(burner.getId())) + if (tile.getPlane() != client.getPlane() || !burner.isLit()) { return; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/poh/IncenseBurner.java b/runelite-client/src/main/java/net/runelite/client/plugins/poh/IncenseBurner.java index c47f9bfe14..0679dc6474 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/poh/IncenseBurner.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/poh/IncenseBurner.java @@ -25,20 +25,22 @@ package net.runelite.client.plugins.poh; import java.time.Instant; -import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.RequiredArgsConstructor; import lombok.Setter; @Getter @Setter -@RequiredArgsConstructor -@AllArgsConstructor class IncenseBurner { - private final Instant start = Instant.now(); - private final int id; + private Instant start; + private boolean lit; private double countdownTimer; private double randomTimer; private Instant end; + + void reset() + { + countdownTimer = 0; + randomTimer = 0; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohPlugin.java index d7d7181060..1cb0a21044 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/poh/PohPlugin.java @@ -27,6 +27,7 @@ package net.runelite.client.plugins.poh; import com.google.common.collect.Sets; import com.google.inject.Provides; import java.io.IOException; +import java.time.Instant; import java.util.Comparator; import java.util.HashMap; import java.util.Map; @@ -49,7 +50,6 @@ import net.runelite.api.Tile; import net.runelite.api.TileObject; import net.runelite.api.coords.LocalPoint; import net.runelite.api.events.AnimationChanged; -import net.runelite.client.events.ConfigChanged; import net.runelite.api.events.DecorativeObjectDespawned; import net.runelite.api.events.DecorativeObjectSpawned; import net.runelite.api.events.GameObjectDespawned; @@ -57,6 +57,7 @@ import net.runelite.api.events.GameObjectSpawned; import net.runelite.api.events.GameStateChanged; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.events.ConfigChanged; import net.runelite.client.game.HiscoreManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; @@ -144,9 +145,11 @@ public class PohPlugin extends Plugin return; } - final double countdownTimer = 130.0; // Minimum amount of seconds a burner will light - final double randomTimer = 30.0; // Minimum amount of seconds a burner will light - incenseBurners.put(event.getTile(), new IncenseBurner(gameObject.getId(), countdownTimer, randomTimer, null)); + IncenseBurner incenseBurner = incenseBurners.computeIfAbsent(event.getTile(), k -> new IncenseBurner()); + incenseBurner.setStart(Instant.now()); + incenseBurner.setLit(BURNER_LIT.contains(gameObject.getId())); + incenseBurner.setEnd(null); + // The burner timers are set when observing a player light the burner } @Subscribe @@ -203,6 +206,7 @@ public class PohPlugin extends Plugin .ifPresent(tile -> { final IncenseBurner incenseBurner = incenseBurners.get(tile); + incenseBurner.reset(); if (actor == client.getLocalPlayer()) { @@ -245,6 +249,7 @@ public class PohPlugin extends Plugin { final double tickLengthSeconds = Constants.GAME_TICK_LENGTH / 1000.0; incenseBurner.setCountdownTimer((200 + fmLevel) * tickLengthSeconds); - incenseBurner.setRandomTimer(fmLevel * tickLengthSeconds); + incenseBurner.setRandomTimer((fmLevel - 1) * tickLengthSeconds); + log.debug("Set burner timer for firemaking level {}", fmLevel); } } \ No newline at end of file From 4d845e5862410b689402c003e35d93bd68972cb0 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 1 Aug 2021 16:04:26 -0400 Subject: [PATCH 10/20] api: add menu location and size accessors --- .../main/java/net/runelite/api/Client.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index d5a2393a5e..b669649272 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -618,6 +618,34 @@ public interface Client extends GameEngine */ boolean isMenuOpen(); + /** + * Get the menu x location. Only valid if the menu is open. + * + * @return the menu x location + */ + int getMenuX(); + + /** + * Get the menu y location. Only valid if the menu is open. + * + * @return the menu y location + */ + int getMenuY(); + + /** + * Get the menu height. Only valid if the menu is open. + * + * @return the menu height + */ + int getMenuHeight(); + + /** + * Get the menu width. Only valid if the menu is open. + * + * @return the menu width + */ + int getMenuWidth(); + /** * Gets the angle of the map, or target camera yaw. * From 29066dfc45f39a52f03f7ca51b4cf9f611112ad2 Mon Sep 17 00:00:00 2001 From: Eirik Leikvoll <12532870+LeikvollE@users.noreply.github.com> Date: Sun, 1 Aug 2021 22:51:15 +0200 Subject: [PATCH 11/20] interact highlight: fix auto retaliate highlight color --- .../interacthighlight/InteractHighlightPlugin.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java index 96ef8f1ba5..026b94301e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interacthighlight/InteractHighlightPlugin.java @@ -45,6 +45,7 @@ import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.GameTick; import net.runelite.api.events.MenuOptionClicked; import net.runelite.api.events.NpcDespawned; +import net.runelite.api.events.InteractingChanged; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.plugins.Plugin; @@ -123,6 +124,17 @@ public class InteractHighlightPlugin extends Plugin } } + @Subscribe + public void onInteractingChanged(InteractingChanged interactingChanged) + { + if (interactingChanged.getSource() == client.getLocalPlayer() + && client.getTickCount() > clickTick && interactingChanged.getTarget() != interactedNpc) + { + interactedNpc = null; + attacked = interactingChanged.getTarget() != null && interactingChanged.getTarget().getCombatLevel() > 0; + } + } + @Subscribe public void onMenuOptionClicked(MenuOptionClicked menuOptionClicked) { From 30671697196e7b9df0d229369823c8959e20eec4 Mon Sep 17 00:00:00 2001 From: emerald000 Date: Sun, 1 Aug 2021 20:43:10 -0500 Subject: [PATCH 12/20] boss timers: Change Grotesque Guardians timer to 5 minutes (#13893) The instance closes 5 minutes after killing Dusk if you don't ring the bell again. --- .../main/java/net/runelite/client/plugins/bosstimer/Boss.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/bosstimer/Boss.java b/runelite-client/src/main/java/net/runelite/client/plugins/bosstimer/Boss.java index 078463bfb3..362a4f6784 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/bosstimer/Boss.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/bosstimer/Boss.java @@ -56,7 +56,7 @@ enum Boss THERMONUCLEAR_SMOKE_DEVIL(NpcID.THERMONUCLEAR_SMOKE_DEVIL, 8400, ChronoUnit.MILLIS, ItemID.PET_SMOKE_DEVIL), KRAKEN(NpcID.KRAKEN, 8400, ChronoUnit.MILLIS, ItemID.PET_KRAKEN), KALPHITE_QUEEN(NpcID.KALPHITE_QUEEN_965, 30, ChronoUnit.SECONDS, ItemID.KALPHITE_PRINCESS), - DUSK(NpcID.DUSK_7889, 2, ChronoUnit.MINUTES, ItemID.NOON), + DUSK(NpcID.DUSK_7889, 5, ChronoUnit.MINUTES, ItemID.NOON), ALCHEMICAL_HYDRA(NpcID.ALCHEMICAL_HYDRA_8622, 25200, ChronoUnit.MILLIS, ItemID.IKKLE_HYDRA), SARACHNIS(NpcID.SARACHNIS, 10, ChronoUnit.SECONDS, ItemID.SRARACHA), ZALCANO(NpcID.ZALCANO_9050, 21600, ChronoUnit.MILLIS, ItemID.SMOLCANO); From 327218af9ce33fe40c1b2a75b58c4c5d86925cb9 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 3 Aug 2021 21:10:31 -0400 Subject: [PATCH 13/20] hiscore: switch to dmmt hiscores --- .../client/plugins/hiscore/HiscorePanel.java | 2 +- .../runelite/client/plugins/hiscore/league.png | Bin 997 -> 0 bytes .../client/plugins/hiscore/tournament.png | Bin 0 -> 3020 bytes 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java index 25ae9a55b3..5d3147be7b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java @@ -114,7 +114,7 @@ public class HiscorePanel extends PluginPanel ); private static final HiscoreEndpoint[] ENDPOINTS = { - HiscoreEndpoint.NORMAL, HiscoreEndpoint.IRONMAN, HiscoreEndpoint.HARDCORE_IRONMAN, HiscoreEndpoint.ULTIMATE_IRONMAN, HiscoreEndpoint.DEADMAN, HiscoreEndpoint.LEAGUE + HiscoreEndpoint.NORMAL, HiscoreEndpoint.IRONMAN, HiscoreEndpoint.HARDCORE_IRONMAN, HiscoreEndpoint.ULTIMATE_IRONMAN, HiscoreEndpoint.DEADMAN, HiscoreEndpoint.TOURNAMENT }; private final HiscorePlugin plugin; diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png b/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png deleted file mode 100644 index 9b8394065a908d7ddc8a1fbe28f8714f4814df0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 997 zcmVpurkhZ<9w7aZxiH($`jLgu7 ztEyu?JS0X%Db&`7c#e`=b$uyHS)Ztzou-*6NmxZ6nCw~Lu~uC;UC+o;{z zr;nU?VtIUajFHaKh^?$-kf4oObbN}KdF$lU>h_AMEUwD7Dyse<9n!&`N+}ft==Bx7Sxcu|a^6a?b z-Kn3bnyj>@)76Eyy{@6Do591O-P)-0?6~smx8U5T%gdsxv!&M8hIfsTElgQscVe!! zbkWd;_V2*;?z!~sx%TeB)zyfyxOIAqXk5_SdC`ea|mv`;wz1!N2 z@$0Sa=&aJxh?AdrJzHmwpo^%dVnjqK$IOXtgN2r(ez?AQ;ohm=+^Mj)b(5cZ($ThD zba-=$j>^u5xVLMRq>^cbdeqdrlcSBWu4PI} zEYj46l%tSWa(gOFT%MkIBx6van~>)`hOEWo5UI zNdN!<5_D2dQvd^7*IES4%3#~u-(_G0-_+6zJW^o*00BiwL_t&-(_>%&0!AigAs}F8 zVq|~-Miypa5m7NQaS2Ig7O)^Io0PPStem`pqLQ+TDmzGwLrq;)LsLszM^{hZz)+P1 zsEE_Z*u>P#+``h_%G$7-$-~o2l8J%K+s9YS&p#kADA+&5 zDl{ydnL#K*KQhWCIwm$YCNADwH$hy8K}akyDLExIEj>LWFw-I{I|n3`o0ne@RG6M# z6j)rMQwkC)E3c@ms;;T6t8Zv*(rs=LV&HCVYwzgn>h9_7>*_a~FmVzW1JC3s8dII7 zO`kDy*6cZR=gk-9W#HpquyE1hB}NRV*SQ!|2)~(;*uyNDotSwv1x2a3< z0{zG*ux`Qj9rF}+I_%nQq$bD;3JN|R{>gjx=H#^Ov*YLCgN7I%4>u?Xxgi1oT+3H% Tp=}dM00000NkvXXu0mjflke=# diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png b/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png new file mode 100644 index 0000000000000000000000000000000000000000..e74b1d940b387aa63d4bffeb3e8fd257950db778 GIT binary patch literal 3020 zcmV;-3p4bIP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002@Nkl9LTKw3z01X`BobB9wiH~%~%M`o9lDd zZ`p0k)+ArBjO#gWP&GbhBsVu(RBNkNv%i!i_v=@I8mup-XCOO9V&c~veehe9`LD+Z zgCvd@qX43QO^=cVI^Tfjoz`UcB$E&&N4C)a=x_$Jt6vLW|CRQScn<(Xdyd4pn%g`8 O0000 Date: Tue, 3 Aug 2021 13:07:23 -0600 Subject: [PATCH 14/20] Update Widget IDs to 2021-8-4 --- .../net/runelite/api/widgets/WidgetID.java | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index a3fd845de8..c51e0ed1eb 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -412,64 +412,64 @@ public class WidgetID static final int RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX = 19; static final int MULTICOMBAT_INDICATOR = 23; static final int MINIMAP = 25; - static final int MINIMAP_DRAW_AREA = 33; - static final int MINIMAP_ORB_HOLDER = 36; - static final int FRIENDS_CHAT_TAB = 45; - static final int IGNORES_TAB = 46; - static final int FRIENDS_TAB = 47; - static final int LOGOUT_TAB = 48; - static final int OPTIONS_TAB = 49; - static final int EMOTES_TAB = 50; - static final int MUSIC_TAB = 51; - static final int FRIENDS_CHAT_ICON = 52; - static final int FRIENDS_ICON = 54; - static final int IGNORES_ICON = 53; - static final int LOGOUT_ICON = 55; - static final int OPTIONS_ICON = 56; - static final int EMOTES_ICON = 57; - static final int MUSIC_ICON = 58; - static final int COMBAT_TAB = 61; - static final int STATS_TAB = 62; - static final int QUESTS_TAB = 63; - static final int INVENTORY_TAB = 64; - static final int EQUIPMENT_TAB = 65; - static final int PRAYER_TAB = 66; - static final int MAGIC_TAB = 67; - static final int COMBAT_ICON = 68; - static final int STATS_ICON = 69; - static final int QUESTS_ICON = 70; - static final int INVENTORY_ICON = 71; - static final int EQUIPMENT_ICON = 72; - static final int PRAYER_ICON = 73; - static final int MAGIC_ICON = 74; - static final int INTERFACE_CONTAINER = 75; - static final int INVENTORY_CONTAINER = 81; + static final int MINIMAP_DRAW_AREA = 34; + static final int MINIMAP_ORB_HOLDER = 37; + static final int FRIENDS_CHAT_TAB = 46; + static final int IGNORES_TAB = 47; + static final int FRIENDS_TAB = 48; + static final int LOGOUT_TAB = 49; + static final int OPTIONS_TAB = 50; + static final int EMOTES_TAB = 51; + static final int MUSIC_TAB = 52; + static final int FRIENDS_CHAT_ICON = 53; + static final int FRIENDS_ICON = 55; + static final int IGNORES_ICON = 54; + static final int LOGOUT_ICON = 56; + static final int OPTIONS_ICON = 57; + static final int EMOTES_ICON = 58; + static final int MUSIC_ICON = 59; + static final int COMBAT_TAB = 62; + static final int STATS_TAB = 63; + static final int QUESTS_TAB = 64; + static final int INVENTORY_TAB = 65; + static final int EQUIPMENT_TAB = 66; + static final int PRAYER_TAB = 67; + static final int MAGIC_TAB = 68; + static final int COMBAT_ICON = 69; + static final int STATS_ICON = 70; + static final int QUESTS_ICON = 71; + static final int INVENTORY_ICON = 72; + static final int EQUIPMENT_ICON = 73; + static final int PRAYER_ICON = 74; + static final int MAGIC_ICON = 75; + static final int INTERFACE_CONTAINER = 76; + static final int INVENTORY_CONTAINER = 82; } static class ResizableViewportBottomLine { static final int RESIZABLE_VIEWPORT_BOTTOM_LINE = 19; static final int MINIMAP = 25; - static final int MINIMAP_DRAW_AREA = 33; - static final int MINIMAP_ORB_HOLDER = 36; - static final int LOGOUT_BUTTON_OVERLAY = 37; - static final int MINIMAP_LOGOUT_BUTTON = 38; - static final int FC_ICON = 49; - static final int FRIEND_ICON = 51; - static final int SETTINGS_ICON = 52; - static final int EMOTE_ICON = 53; - static final int MUSIC_ICON = 54; - static final int INVENTORY_TAB = 61; - static final int PRAYER_TAB = 63; - static final int CMB_ICON = 65; - static final int SKILLS_ICON = 66; - static final int QUESTS_ICON = 67; - static final int INVENTORY_ICON = 68; - static final int EQUIP_ICON = 69; - static final int PRAYER_ICON = 70; - static final int MAGIC_ICON = 71; - static final int INTERFACE_CONTAINER = 74; - static final int INVENTORY_CONTAINER = 80; + static final int MINIMAP_DRAW_AREA = 34; + static final int MINIMAP_ORB_HOLDER = 37; + static final int LOGOUT_BUTTON_OVERLAY = 38; + static final int MINIMAP_LOGOUT_BUTTON = 39; + static final int FC_ICON = 50; + static final int FRIEND_ICON = 52; + static final int SETTINGS_ICON = 53; + static final int EMOTE_ICON = 54; + static final int MUSIC_ICON = 55; + static final int INVENTORY_TAB = 62; + static final int PRAYER_TAB = 64; + static final int CMB_ICON = 66; + static final int SKILLS_ICON = 67; + static final int QUESTS_ICON = 68; + static final int INVENTORY_ICON = 69; + static final int EQUIP_ICON = 70; + static final int PRAYER_ICON = 71; + static final int MAGIC_ICON = 72; + static final int INTERFACE_CONTAINER = 75; + static final int INVENTORY_CONTAINER = 81; } static class Chatbox From bd72b16501f363f4ce841d31cd8aacc810a38072 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 3 Aug 2021 13:07:22 -0600 Subject: [PATCH 15/20] Update Scripts to 2021-8-4 --- .../src/main/scripts/ChatSplitBuilder.hash | 2 +- .../src/main/scripts/ChatSplitBuilder.rs2asm | 2 +- .../main/scripts/LayoutResizableStones.hash | 2 +- .../main/scripts/LayoutResizableStones.rs2asm | 148 ++++++++++-------- 4 files changed, 87 insertions(+), 67 deletions(-) diff --git a/runelite-client/src/main/scripts/ChatSplitBuilder.hash b/runelite-client/src/main/scripts/ChatSplitBuilder.hash index c68b80b6f4..c2a17a7084 100644 --- a/runelite-client/src/main/scripts/ChatSplitBuilder.hash +++ b/runelite-client/src/main/scripts/ChatSplitBuilder.hash @@ -1 +1 @@ -BADE5769E553D84CF031C4D278466E46B74E12CF62A3351646CD1C504D7A426A \ No newline at end of file +F4D54D6A71A806F01FA6B823A3E75524B857E2F556E0AE55FEA0A4ABFEB603C9 \ No newline at end of file diff --git a/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm b/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm index 42454852f1..a443acbb19 100644 --- a/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm +++ b/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm @@ -62,7 +62,7 @@ LABEL49: iconst 73 iconst 73 iload 6 - iconst 10551333 + iconst 10551334 enum if_getheight add diff --git a/runelite-client/src/main/scripts/LayoutResizableStones.hash b/runelite-client/src/main/scripts/LayoutResizableStones.hash index 2c7e47c900..60dc015aa3 100644 --- a/runelite-client/src/main/scripts/LayoutResizableStones.hash +++ b/runelite-client/src/main/scripts/LayoutResizableStones.hash @@ -1 +1 @@ -C3095F0E7973E9EF0E8035AF4B4AC7CE28D692B71A63DE31B7820F1D2AB09F2E \ No newline at end of file +A9D5E42A864BFEEE2BB8CAF4A111A68426B7CE5DF5C982AF168F90A28CAE4423 \ No newline at end of file diff --git a/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm b/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm index 2f5f8e0c57..65fd994c2d 100644 --- a/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm +++ b/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm @@ -14,17 +14,17 @@ istore 4 iload 1 switch - 1745: LABEL129 - 1129: LABEL109 - 1130: LABEL87 + 1745: LABEL145 + 1129: LABEL125 + 1130: LABEL95 1131: LABEL9 - jump LABEL204 + jump LABEL220 LABEL9: - iconst 10747944 + iconst 10747945 if_getwidth iconst 33 sub - iconst 10747944 + iconst 10747945 if_getheight istore 3 istore 2 @@ -33,7 +33,7 @@ LABEL9: iconst 73 iconst 73 iload 1 - iconst 10551333 + iconst 10551334 enum if_getwidth sub @@ -48,7 +48,7 @@ LABEL9: LABEL29: iconst 0 iload 3 - iconst 10747959 + iconst 10747960 if_getheight add iconst 2 @@ -56,14 +56,14 @@ LABEL29: iconst 73 iconst 73 iload 1 - iconst 10747976 + iconst 10747977 enum if_setposition iconst 0 iload 3 iconst 2 iconst 2 - iconst 10747959 + iconst 10747960 if_setposition jump LABEL65 LABEL49: @@ -74,14 +74,14 @@ LABEL49: iconst 73 iconst 73 iload 1 - iconst 10747976 + iconst 10747977 enum if_setposition iload 2 iconst 0 iconst 2 iconst 2 - iconst 10747959 + iconst 10747960 if_setposition LABEL65: get_varbit 4084 @@ -93,7 +93,7 @@ LABEL69: iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 jump LABEL84 @@ -102,77 +102,97 @@ LABEL77: iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 LABEL84: clientclock set_varc_int 384 - jump LABEL204 -LABEL87: + invoke 2357 + iconst 1 + if_icmpeq LABEL90 + jump LABEL94 +LABEL90: + get_varbit 12986 + invoke 633 + iconst 10747930 + if_sethide +LABEL94: + jump LABEL220 +LABEL95: get_varbit 4084 iconst 1 - if_icmpeq LABEL91 - jump LABEL99 -LABEL91: + if_icmpeq LABEL99 + jump LABEL107 +LABEL99: iconst 1178 iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 - jump LABEL106 -LABEL99: + jump LABEL114 +LABEL107: iconst 2154 iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 -LABEL106: +LABEL114: clientclock set_varc_int 384 - jump LABEL204 -LABEL109: + invoke 2357 + iconst 1 + if_icmpeq LABEL120 + jump LABEL124 +LABEL120: + get_varbit 12986 + invoke 633 + iconst 10551322 + if_sethide +LABEL124: + jump LABEL220 +LABEL125: invoke 3297 iconst 1 - if_icmpeq LABEL113 - jump LABEL121 -LABEL113: + if_icmpeq LABEL129 + jump LABEL137 +LABEL129: iconst 2422 iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 - jump LABEL128 -LABEL121: + jump LABEL144 +LABEL137: iconst 1200 iconst 73 iconst 73 iload 1 - iconst 10551329 + iconst 10551330 enum 2122 -LABEL128: - jump LABEL204 -LABEL129: +LABEL144: + jump LABEL220 +LABEL145: get_varbit 6257 iconst 1 - if_icmpeq LABEL136 + if_icmpeq LABEL152 get_varbit 542 iconst 1 - if_icmpeq LABEL136 - jump LABEL140 -LABEL136: + if_icmpeq LABEL152 + jump LABEL156 +LABEL152: iconst 1 iconst 39387175 if_sethide - jump LABEL195 -LABEL140: + jump LABEL211 +LABEL156: iconst 0 iconst 39387175 if_sethide @@ -181,11 +201,11 @@ LABEL140: 2308 get_varbit 6255 switch - 1: LABEL157 - 2: LABEL149 - 3: LABEL165 - jump LABEL173 -LABEL149: + 1: LABEL173 + 2: LABEL165 + 3: LABEL181 + jump LABEL189 +LABEL165: iconst 1718 iconst 39387177 if_setgraphic @@ -193,8 +213,8 @@ LABEL149: sconst "Toggle single-tap mode" iconst 39387175 if_setop - jump LABEL180 -LABEL157: + jump LABEL196 +LABEL173: iconst 1717 iconst 39387177 if_setgraphic @@ -202,8 +222,8 @@ LABEL157: sconst "Toggle tap-to-drop mode" iconst 39387175 if_setop - jump LABEL180 -LABEL165: + jump LABEL196 +LABEL181: iconst 1716 iconst 39387177 if_setgraphic @@ -211,8 +231,8 @@ LABEL165: sconst "Show Keyboard" iconst 39387175 if_setop - jump LABEL180 -LABEL173: + jump LABEL196 +LABEL189: iconst 1715 iconst 39387177 if_setgraphic @@ -220,26 +240,26 @@ LABEL173: sconst "" iconst 39387175 if_setop -LABEL180: +LABEL196: get_varbit 6255 iconst 3 - if_icmpne LABEL184 - jump LABEL192 -LABEL184: + if_icmpne LABEL200 + jump LABEL208 +LABEL200: get_varbit 6256 iconst 0 - if_icmpeq LABEL188 - jump LABEL192 -LABEL188: + if_icmpeq LABEL204 + jump LABEL208 +LABEL204: iconst 155 iconst 39387177 if_settrans - jump LABEL195 -LABEL192: + jump LABEL211 +LABEL208: iconst 0 iconst 39387177 if_settrans -LABEL195: +LABEL211: invoke 2581 get_varbit 6254 invoke 633 @@ -249,5 +269,5 @@ LABEL195: pop_int clientclock set_varc_int 384 -LABEL204: +LABEL220: return From 6ac66bf6aefb019b3e54d1a0a46ccc905263aa60 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 4 Aug 2021 10:45:44 +0000 Subject: [PATCH 16/20] Release 1.7.19 --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 18081c2cb9..7dc4ad8efc 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index f93c0269bc..0b72eb6525 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 3aa68da721..9a7da0c82c 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 73d15a2422..38bffcd2d0 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index 219188f988..aa44e5be89 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 Web Service diff --git a/pom.xml b/pom.xml index c37c06d19f..bdf24eddda 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.7.19 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index cbfa69f9b4..8c8c78adf4 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 448af7397f..16b1df61c7 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 669a40c793..796afca9a5 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index c2aed3e403..bd686e9f28 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19-SNAPSHOT + 1.7.19 script-assembler-plugin From d577ddc5709c1f9174ed9ed0c7197350934e0101 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 4 Aug 2021 10:45:47 +0000 Subject: [PATCH 17/20] Bump for 1.7.20-SNAPSHOT --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 7dc4ad8efc..12c1159da0 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 0b72eb6525..aad8636265 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 9a7da0c82c..284f8400e4 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 38bffcd2d0..771d3ffc7c 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index aa44e5be89..da3df117cc 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index bdf24eddda..ece2d18926 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.7.19 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 8c8c78adf4..52744d2493 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 16b1df61c7..76e771ba54 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 796afca9a5..3bbf60812e 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index bd686e9f28..ad89e23a34 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.19 + 1.7.20-SNAPSHOT script-assembler-plugin From 87b8fe0c8717ebe141ec8bbbdc9b01bbb79a9d46 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 4 Aug 2021 11:12:45 -0400 Subject: [PATCH 18/20] antidrag: enable in pvp This feature is enabled in the steam client Co-authored-by: jsuarez5341 --- .../plugins/antidrag/AntiDragConfig.java | 2 +- .../plugins/antidrag/AntiDragPlugin.java | 39 ++++--------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java index 6fa7c3871a..ce2973855f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragConfig.java @@ -46,7 +46,7 @@ public interface AntiDragConfig extends Config @ConfigItem( keyName = "onShiftOnly", name = "On Shift Only", - description = "Configures whether to only adjust the delay while holding shift in non-PvP scenarios. Shift is required in PvP regardless of this config setting", + description = "Configures whether to only adjust the delay while holding shift.", position = 2 ) default boolean onShiftOnly() diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java index 1c3952737e..e1b6377612 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/antidrag/AntiDragPlugin.java @@ -29,9 +29,7 @@ import java.awt.event.KeyEvent; import javax.inject.Inject; import net.runelite.api.Client; import net.runelite.api.GameState; -import net.runelite.api.Varbits; import net.runelite.api.events.FocusChanged; -import net.runelite.api.events.VarbitChanged; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; @@ -69,7 +67,6 @@ public class AntiDragPlugin extends Plugin implements KeyListener @Inject private KeyManager keyManager; - private boolean inPvp; private boolean shiftHeld; private boolean ctrlHeld; @@ -86,8 +83,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener { clientThread.invokeLater(() -> { - inPvp = client.getVar(Varbits.PVP_SPEC_ORB) == 1; - if (!config.onShiftOnly() && !inPvp) + if (!config.onShiftOnly()) { setDragDelay(); } @@ -113,12 +109,12 @@ public class AntiDragPlugin extends Plugin implements KeyListener @Override public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !(inPvp || config.onShiftOnly())) + if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !config.onShiftOnly()) { resetDragDelay(); ctrlHeld = true; } - else if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) + else if (e.getKeyCode() == KeyEvent.VK_SHIFT && config.onShiftOnly()) { setDragDelay(); shiftHeld = true; @@ -128,12 +124,12 @@ public class AntiDragPlugin extends Plugin implements KeyListener @Override public void keyReleased(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !(inPvp || config.onShiftOnly())) + if (e.getKeyCode() == KeyEvent.VK_CONTROL && config.disableOnCtrl() && !config.onShiftOnly()) { setDragDelay(); ctrlHeld = false; } - else if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly())) + else if (e.getKeyCode() == KeyEvent.VK_SHIFT && config.onShiftOnly()) { resetDragDelay(); shiftHeld = false; @@ -150,7 +146,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener ctrlHeld = false; } - if (config.onShiftOnly() || inPvp) + if (config.onShiftOnly()) { shiftHeld = false; clientThread.invoke(this::resetDragDelay); @@ -162,27 +158,6 @@ public class AntiDragPlugin extends Plugin implements KeyListener } } - @Subscribe - public void onVarbitChanged(VarbitChanged varbitChanged) - { - boolean currentStatus = client.getVar(Varbits.PVP_SPEC_ORB) == 1; - - if (currentStatus != inPvp) - { - inPvp = currentStatus; - - if (!inPvp && !config.onShiftOnly()) - { - setDragDelay(); - } - else - { - resetDragDelay(); - } - } - - } - @Subscribe public void onFocusChanged(FocusChanged focusChanged) { @@ -192,7 +167,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener ctrlHeld = false; clientThread.invoke(this::resetDragDelay); } - else if (!inPvp && !config.onShiftOnly()) + else if (!config.onShiftOnly()) { clientThread.invoke(this::setDragDelay); } From 92e85d5db0d25e33199a3099945889a359036f27 Mon Sep 17 00:00:00 2001 From: Steven L Date: Wed, 4 Aug 2021 14:08:06 -0400 Subject: [PATCH 19/20] clues: Add Wizards' Tower fairy ring code to cryptic clue (#13977) --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index e4748262a5..31779810a8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -61,7 +61,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the bucket in the Port Sarim jail.", BUCKET_9568, new WorldPoint(3013, 3179, 0), "Talk to Shantay & identify yourself as an outlaw, refuse to pay the 5gp fine twice and you will be sent to the Port Sarim jail."), new CrypticClue("Search the crates in a bank in Varrock.", CRATE_5107, new WorldPoint(3187, 9825, 0), "Search in the basement of the West Varrock bank."), new CrypticClue("Falo the bard wants to see you.", "Falo the Bard", new WorldPoint(2689, 3550, 0), "Speak to Falo the Bard located between Seers' Village and Rellekka. Southwest of fairy ring CJR."), - new CrypticClue("Search a bookcase in the Wizards tower.", BOOKCASE_12539, new WorldPoint(3113, 3159, 0), "The bookcase located on the ground floor of the Wizards' Tower."), + new CrypticClue("Search a bookcase in the Wizards tower.", BOOKCASE_12539, new WorldPoint(3113, 3159, 0), "The bookcase located on the ground floor of the Wizards' Tower. Fairy ring DIS."), new CrypticClue("Come have a cip with this great soot covered denizen.", "Miner Magnus", new WorldPoint(2527, 3891, 0), "Talk to Miner Magnus on Miscellania, east of the fairy ring CIP. Answer: 8", "How many coal rocks are around here?"), new CrypticClue("Citric cellar.", "Heckel Funch", new WorldPoint(2490, 3488, 0), "Speak to Heckel Funch on the first floor in the Grand Tree."), new CrypticClue("I burn between heroes and legends.", "Candle maker", new WorldPoint(2799, 3438, 0), "Speak to the Candle maker in Catherby."), From 912a68effa816c7f4ee436464bf236d889294928 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 4 Aug 2021 12:54:49 -0400 Subject: [PATCH 20/20] http service: add pets list length check 0 length lists cause a redis exception from sadd, which I think is not being handled correctly by jedis and leaking the error into further commands --- .../java/net/runelite/http/service/chat/ChatController.java | 6 ++++++ .../client/plugins/chatcommands/ChatCommandsPlugin.java | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/http-service/src/main/java/net/runelite/http/service/chat/ChatController.java b/http-service/src/main/java/net/runelite/http/service/chat/ChatController.java index 65f4acfa1a..954c90e94b 100644 --- a/http-service/src/main/java/net/runelite/http/service/chat/ChatController.java +++ b/http-service/src/main/java/net/runelite/http/service/chat/ChatController.java @@ -51,6 +51,7 @@ public class ChatController private static final Pattern STRING_VALIDATION = Pattern.compile("[^a-zA-Z0-9' -]"); private static final int STRING_MAX_LENGTH = 50; private static final int MAX_LAYOUT_ROOMS = 16; + private static final int MAX_PETS = 256; private final Cache killCountCache = CacheBuilder.newBuilder() .expireAfterWrite(2, TimeUnit.MINUTES) @@ -251,6 +252,11 @@ public class ChatController @PostMapping("/pets") public void submitPetList(@RequestParam String name, @RequestBody int[] petList) { + if (petList.length == 0 || petList.length > MAX_PETS) + { + return; + } + chatService.setPetList(name, petList); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 1c48b810cf..09610e774e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -1238,7 +1238,10 @@ public class ChatCommandsPlugin extends Plugin try { List petList = getPetList().stream().map(Pet::getIconID).collect(Collectors.toList()); - chatClient.submitPetList(playerName, petList); + if (!petList.isEmpty()) + { + chatClient.submitPetList(playerName, petList); + } } catch (Exception ex) {