From 88ce57507fceaecd46eb5f0beffbb0f34f77e7a5 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Wed, 26 May 2021 17:01:42 +0100 Subject: [PATCH 01/23] skybox: add clan hall --- .../resources/net/runelite/client/plugins/skybox/skybox.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt b/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt index 8312e96beb..e756861411 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt @@ -990,6 +990,8 @@ R 49 193 51 194 // Braindeath Island #8AD2DF R 33 79 33 80 +// Clan Hall +r 27 85 // Nightmare dungeon (Morytania underground) #0a0a0a From a3016289ec2dffa7258594375e9aaaea38759d05 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:15:38 -0400 Subject: [PATCH 02/23] api: add clan api --- .../main/java/net/runelite/api/Client.java | 30 +++++++++ .../main/java/net/runelite/api/EnumID.java | 2 + .../main/java/net/runelite/api/Player.java | 7 +++ .../net/runelite/api/clan/ClanChannel.java | 54 ++++++++++++++++ .../runelite/api/clan/ClanChannelMember.java | 54 ++++++++++++++++ .../net/runelite/api/clan/ClanMember.java | 44 +++++++++++++ .../java/net/runelite/api/clan/ClanRank.java | 52 ++++++++++++++++ .../net/runelite/api/clan/ClanSettings.java | 62 +++++++++++++++++++ .../java/net/runelite/api/clan/ClanTitle.java | 43 +++++++++++++ 9 files changed, 348 insertions(+) create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanChannel.java create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanChannelMember.java create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanMember.java create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanRank.java create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java create mode 100644 runelite-api/src/main/java/net/runelite/api/clan/ClanTitle.java 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 114119274f..1fc9afb87e 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -33,6 +33,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import net.runelite.api.annotations.VisibleForDevtools; import net.runelite.api.annotations.VisibleForExternalPlugins; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanSettings; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; import net.runelite.api.hooks.Callbacks; @@ -1824,4 +1826,32 @@ public interface Client extends GameEngine * @return */ int getCrossWorldMessageIdsIndex(); + + /** + * Get the primary clan channel the player is in. + * @return + */ + @Nullable + ClanChannel getClanChannel(); + + /** + * Get the guest clan channel the player is in. + * @return + */ + @Nullable + ClanChannel getGuestClanChannel(); + + /** + * Get clan settings for the clan the user is in. + * @return + */ + @Nullable + ClanSettings getClanSettings(); + + /** + * Get the guest clan's settings. + * @return + */ + @Nullable + ClanSettings getGuestClanSettings(); } diff --git a/runelite-api/src/main/java/net/runelite/api/EnumID.java b/runelite-api/src/main/java/net/runelite/api/EnumID.java index 2c2fcecb87..e5ffc4b92a 100644 --- a/runelite-api/src/main/java/net/runelite/api/EnumID.java +++ b/runelite-api/src/main/java/net/runelite/api/EnumID.java @@ -35,4 +35,6 @@ public final class EnumID public static final int MUSIC_TRACK_IDS = 819; public static final int XPDROP_COLORS = 1169; public static final int FRIENDS_CHAT_RANK_ICONS = 1543; + public static final int CLAN_RANK_NAME = 3797; + public static final int CLAN_RANK_GRAPHIC = 3798; } diff --git a/runelite-api/src/main/java/net/runelite/api/Player.java b/runelite-api/src/main/java/net/runelite/api/Player.java index e6ae715a7d..2b7d5a04d7 100644 --- a/runelite-api/src/main/java/net/runelite/api/Player.java +++ b/runelite-api/src/main/java/net/runelite/api/Player.java @@ -71,6 +71,13 @@ public interface Player extends Actor */ boolean isFriend(); + /** + * Checks whether the player is a member of the same clan as the local player. + * + * @return + */ + boolean isClanMember(); + /** * Gets the displayed overhead icon of the player. * diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanChannel.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanChannel.java new file mode 100644 index 0000000000..7f2bba0d28 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanChannel.java @@ -0,0 +1,54 @@ +/* + * 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.api.clan; + +import java.util.List; +import javax.annotation.Nullable; + +/** + * A clan channel. + */ +public interface ClanChannel +{ + /** + * The name of the channel + * @return + */ + String getName(); + + /** + * The members currently online in the channel. + * @return + */ + List getMembers(); + + /** + * Find a clan member by name + * @param name + * @return + */ + @Nullable + ClanChannelMember findMember(String name); +} diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanChannelMember.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanChannelMember.java new file mode 100644 index 0000000000..be01248f76 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanChannelMember.java @@ -0,0 +1,54 @@ +/* + * 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.api.clan; + +import net.runelite.api.ChatPlayer; + +/** + * A member of a clan channel + */ +public interface ClanChannelMember extends ChatPlayer +{ + /** + * The member name + * @return + */ + String getName(); + + /** + * The member's rank relative to the other members. To get the member title, + * see ClanSettings. + * @see ClanRank + * @see ClanSettings#titleForRank(ClanRank) + * @return + */ + ClanRank getRank(); + + /** + * The world the member is on + * @return + */ + int getWorld(); +} diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanMember.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanMember.java new file mode 100644 index 0000000000..896939a505 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanMember.java @@ -0,0 +1,44 @@ +/* + * 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.api.clan; + +import lombok.Value; + +/** + * A member of a clan. + */ +@Value +public class ClanMember +{ + /** + * The clan member's name + */ + String name; + + /** + * The clan member's rank + */ + ClanRank rank; +} diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanRank.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanRank.java new file mode 100644 index 0000000000..05175059fa --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanRank.java @@ -0,0 +1,52 @@ +/* + * 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.api.clan; + +/** + * The ranks in a clan. Clan ranks 1-14 are mapped to corresponding titles via + * the clan settings. + */ +public enum ClanRank +{ + GUEST, + CLAN_RANK_1, + CLAN_RANK_2, + CLAN_RANK_3, + CLAN_RANK_4, + CLAN_RANK_5, + CLAN_RANK_6, + CLAN_RANK_7, + CLAN_RANK_8, + CLAN_RANK_9, + CLAN_RANK_10, + ADMINISTRATOR, + CLAN_RANK_11, + CLAN_RANK_12, + CLAN_RANK_13, + CLAN_RANK_14, + DEPUTY_OWNER, + OWNER, + JMOD; +} diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java new file mode 100644 index 0000000000..c24f6ec23f --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java @@ -0,0 +1,62 @@ +/* + * 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.api.clan; + +import java.util.List; +import javax.annotation.Nullable; + +/** + * A clan's settings. + */ +public interface ClanSettings +{ + /** + * The clan name + * @return + */ + String getName(); + + /** + * The members of the clan. This includes all members, whether online or offline. + * @return + */ + List getMembers(); + + /** + * Find a member of the clan. + * @param name + * @return + */ + @Nullable + ClanMember findMember(String name); + + /** + * Get the clan title for a clan rank. + * @param clanRank the rank + * @see ClanRank + * @return + */ + ClanTitle titleForRank(ClanRank clanRank); +} diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanTitle.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanTitle.java new file mode 100644 index 0000000000..3c6daee6d7 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanTitle.java @@ -0,0 +1,43 @@ +/* + * 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.api.clan; + +import lombok.Value; + +/** + * A clan title, such as Owner, Administrator, Anchor, etc. + */ +@Value +public class ClanTitle +{ + /** + * The id of the title + */ + int id; + /** + * The name of the title + */ + String name; +} From 474ef1562b1a9dbfb950edc99888b6c0b85519c6 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:23:19 -0400 Subject: [PATCH 03/23] chat icon manager: add clan chat icons --- .../runelite/client/game/ChatIconManager.java | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/ChatIconManager.java b/runelite-client/src/main/java/net/runelite/client/game/ChatIconManager.java index 6e80237e96..58f334ca96 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ChatIconManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ChatIconManager.java @@ -37,6 +37,7 @@ import net.runelite.api.EnumID; import net.runelite.api.FriendsChatRank; import net.runelite.api.GameState; import net.runelite.api.IndexedSprite; +import net.runelite.api.clan.ClanTitle; import net.runelite.api.events.GameStateChanged; import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; @@ -52,8 +53,10 @@ public class ChatIconManager private final SpriteManager spriteManager; private BufferedImage[] friendsChatRankImages; + private BufferedImage[] clanRankImages; private int friendsChatOffset; + private int clanOffset; @Inject private ChatIconManager(Client client, SpriteManager spriteManager, EventBus eventBus) @@ -74,11 +77,25 @@ public class ChatIconManager return friendsChatRankImages[friendsChatRank.ordinal() - 1]; } + @Nullable + public BufferedImage getRankImage(final ClanTitle clanTitle) + { + int rank = clanTitle.getId(); + int idx = clanRankToIdx(rank); + return clanRankImages[idx]; + } + public int getIconNumber(final FriendsChatRank friendsChatRank) { return friendsChatOffset + friendsChatRank.ordinal() - 1; } + public int getIconNumber(final ClanTitle clanTitle) + { + int rank = clanTitle.getId(); + return clanOffset + clanRankToIdx(rank); + } + @Subscribe public void onGameStateChanged(GameStateChanged gameStateChanged) { @@ -91,22 +108,25 @@ public class ChatIconManager private void loadRankIcons() { final EnumComposition friendsChatIcons = client.getEnum(EnumID.FRIENDS_CHAT_RANK_ICONS); + final EnumComposition clanIcons = client.getEnum(EnumID.CLAN_RANK_GRAPHIC); { IndexedSprite[] modIcons = client.getModIcons(); friendsChatOffset = modIcons.length; + clanOffset = friendsChatOffset + friendsChatIcons.size(); IndexedSprite blank = ImageUtil.getImageIndexedSprite( new BufferedImage(modIcons[0].getWidth(), modIcons[0].getHeight(), BufferedImage.TYPE_INT_ARGB), client); - modIcons = Arrays.copyOf(modIcons, friendsChatOffset + friendsChatIcons.size()); + modIcons = Arrays.copyOf(modIcons, friendsChatOffset + friendsChatIcons.size() + clanIcons.size()); Arrays.fill(modIcons, friendsChatOffset, modIcons.length, blank); client.setModIcons(modIcons); } friendsChatRankImages = new BufferedImage[friendsChatIcons.size()]; + clanRankImages = new BufferedImage[clanIcons.size()]; final IndexedSprite[] modIcons = client.getModIcons(); @@ -120,6 +140,21 @@ public class ChatIconManager modIcons[friendsChatOffset + fi] = ImageUtil.getImageIndexedSprite(friendsChatRankImages[fi], client); }); } + + for (int i = 0; i < clanIcons.size(); i++) + { + final int key = clanIcons.getKeys()[i]; + final int idx = clanRankToIdx(key); + + assert idx >= 0 && idx < clanIcons.size(); + + spriteManager.getSpriteAsync(clanIcons.getIntValue(key), 0, sprite -> + { + final BufferedImage img = ImageUtil.resizeCanvas(sprite, IMAGE_DIMENSION.width, IMAGE_DIMENSION.height); + clanRankImages[idx] = img; + modIcons[clanOffset + idx] = ImageUtil.getImageIndexedSprite(img, client); + }); + } } private static BufferedImage friendsChatImageFromSprite(final BufferedImage sprite) @@ -127,4 +162,10 @@ public class ChatIconManager final BufferedImage canvas = ImageUtil.resizeCanvas(sprite, IMAGE_DIMENSION.width, IMAGE_DIMENSION.height); return ImageUtil.outlineImage(canvas, IMAGE_OUTLINE_COLOR); } + + private static int clanRankToIdx(int key) + { + // keys are -5 to 264, with no 0 + return key < 0 ? ~key : (key + 4); + } } From 0f0d3de2c49fbd4beaf042680c9dd52e11435596 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:18:07 -0400 Subject: [PATCH 04/23] chat colors: add clan recolors --- .../client/chat/ChatMessageManager.java | 112 +++++- .../client/config/ChatColorConfig.java | 320 ++++++++++++++++-- 2 files changed, 393 insertions(+), 39 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java b/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java index 76038ce8b8..855b69f4cb 100644 --- a/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java +++ b/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java @@ -119,7 +119,7 @@ public class ChatMessageManager boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1; Color usernameColor = null; - Color senderColor; + Color senderColor = null; switch (chatMessageType) { @@ -147,12 +147,22 @@ public class ChatMessageManager break; } case FRIENDSCHAT: + case FRIENDSCHATNOTIFICATION: usernameColor = isChatboxTransparent ? chatColorConfig.transparentFriendsChatUsernames() : chatColorConfig.opaqueFriendsChatUsernames(); + senderColor = isChatboxTransparent ? chatColorConfig.transparentFriendsChatChannelName() : chatColorConfig.opaqueFriendsChatChannelName(); + break; + case CLAN_CHAT: + case CLAN_MESSAGE: + usernameColor = isChatboxTransparent ? chatColorConfig.transparentClanChatUsernames() : chatColorConfig.opaqueClanChatUsernames(); + senderColor = isChatboxTransparent ? chatColorConfig.transparentClanChannelName() : chatColorConfig.opaqueClanChannelName(); + break; + case CLAN_GUEST_CHAT: + case CLAN_GUEST_MESSAGE: + usernameColor = isChatboxTransparent ? chatColorConfig.transparentClanChatGuestUsernames() : chatColorConfig.opaqueClanChatGuestUsernames(); + senderColor = isChatboxTransparent ? chatColorConfig.transparentClanChannelGuestName() : chatColorConfig.opaqueClanGuestChatChannelName(); break; } - senderColor = isChatboxTransparent ? chatColorConfig.transparentFriendsChatChannelName() : chatColorConfig.opaqueFriendsChatChannelName(); - if (usernameColor != null) { messageNode.setName(ColorUtil.wrapWithColorTag(messageNode.getName(), usernameColor)); @@ -226,12 +236,16 @@ public class ChatMessageManager case PRIVATECHAT: return JagexColors.CHAT_PRIVATE_MESSAGE_TEXT_OPAQUE_BACKGROUND; case FRIENDSCHAT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: return JagexColors.CHAT_FC_TEXT_OPAQUE_BACKGROUND; case ITEM_EXAMINE: case OBJECT_EXAMINE: case NPC_EXAMINE: case CONSOLE: case FRIENDSCHATNOTIFICATION: + case CLAN_MESSAGE: + case CLAN_GUEST_MESSAGE: return JagexColors.CHAT_GAME_EXAMINE_TEXT_OPAQUE_BACKGROUND; } } @@ -247,12 +261,16 @@ public class ChatMessageManager case PRIVATECHAT: return JagexColors.CHAT_PRIVATE_MESSAGE_TEXT_TRANSPARENT_BACKGROUND; case FRIENDSCHAT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: return JagexColors.CHAT_FC_TEXT_TRANSPARENT_BACKGROUND; case ITEM_EXAMINE: case OBJECT_EXAMINE: case NPC_EXAMINE: case CONSOLE: case FRIENDSCHATNOTIFICATION: + case CLAN_MESSAGE: + case CLAN_GUEST_MESSAGE: return JagexColors.CHAT_GAME_EXAMINE_TEXT_TRANSPARENT_BACKGROUND; } } @@ -341,6 +359,49 @@ public class ChatMessageManager cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.opaqueFriendsChatMessageHighlight(), false), ChatMessageType.FRIENDSCHAT); } + //region opaque clanchat + if (chatColorConfig.opaqueClanChatInfo() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.opaqueClanChatInfo(), false), + ChatMessageType.CLAN_MESSAGE); + } + if (chatColorConfig.opaqueClanChatInfoHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.opaqueClanChatInfoHighlight(), false), + ChatMessageType.CLAN_MESSAGE); + } + if (chatColorConfig.opaqueClanChatMessage() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.opaqueClanChatMessage(), false), + ChatMessageType.CLAN_CHAT); + } + if (chatColorConfig.opaqueClanChatMessageHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.opaqueClanChatMessageHighlight(), false), + ChatMessageType.CLAN_CHAT); + } + + if (chatColorConfig.opaqueClanChatGuestInfo() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.opaqueClanChatGuestInfo(), false), + ChatMessageType.CLAN_GUEST_MESSAGE); + } + if (chatColorConfig.opaqueClanChatGuestInfoHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.opaqueClanChatGuestInfoHighlight(), false), + ChatMessageType.CLAN_GUEST_MESSAGE); + } + if (chatColorConfig.opaqueClanChatGuestMessage() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.opaqueClanChatGuestMessage(), false), + ChatMessageType.CLAN_GUEST_CHAT); + } + if (chatColorConfig.opaqueClanChatGuestMessageHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.opaqueClanChatGuestMessageHighlight(), false), + ChatMessageType.CLAN_GUEST_CHAT); + } + //endregion if (chatColorConfig.opaqueAutochatMessage() != null) { cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.opaqueAutochatMessage(), false), @@ -454,6 +515,7 @@ public class ChatMessageManager cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentPrivateMessageReceivedHighlight(), true), ChatMessageType.MODPRIVATECHAT); } + //region transpaprent friends chat if (chatColorConfig.transparentFriendsChatInfo() != null) { cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentFriendsChatInfo(), true), @@ -474,6 +536,50 @@ public class ChatMessageManager cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentFriendsChatMessageHighlight(), true), ChatMessageType.FRIENDSCHAT); } + //endregion + //region transparent clanchat + if (chatColorConfig.transparentClanChatInfo() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentClanChatInfo(), true), + ChatMessageType.CLAN_MESSAGE); + } + if (chatColorConfig.transparentClanChatInfoHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentClanChatInfoHighlight(), true), + ChatMessageType.CLAN_MESSAGE); + } + if (chatColorConfig.transparentClanChatMessage() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentClanChatMessage(), true), + ChatMessageType.CLAN_CHAT); + } + if (chatColorConfig.transparentClanChatMessageHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentClanChatMessageHighlight(), true), + ChatMessageType.CLAN_CHAT); + } + + if (chatColorConfig.transparentClanChatGuestInfo() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentClanChatGuestInfo(), true), + ChatMessageType.CLAN_GUEST_MESSAGE); + } + if (chatColorConfig.transparentClanChatGuestInfoHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentClanChatGuestInfoHighlight(), true), + ChatMessageType.CLAN_GUEST_MESSAGE); + } + if (chatColorConfig.transparentClanChatGuestMessage() != null) + { + cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentClanChatGuestMessage(), true), + ChatMessageType.CLAN_GUEST_CHAT); + } + if (chatColorConfig.transparentClanChatGuestMessageHighlight() != null) + { + cacheColor(new ChatColor(ChatColorType.HIGHLIGHT, chatColorConfig.transparentClanChatGuestMessageHighlight(), true), + ChatMessageType.CLAN_GUEST_CHAT); + } + //endregion if (chatColorConfig.transparentAutochatMessage() != null) { cacheColor(new ChatColor(ChatColorType.NORMAL, chatColorConfig.transparentAutochatMessage(), true), diff --git a/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java b/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java index d24d952435..90fc5adbe0 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ChatColorConfig.java @@ -108,6 +108,7 @@ public interface ChatColorConfig extends Config return Color.decode("#002783"); } + //region opaque friends chat @ConfigItem( position = 7, keyName = "opaqueFriendsChatInfo", @@ -149,9 +150,96 @@ public interface ChatColorConfig extends Config { return Color.decode("#000000"); } + //endregion + //region opaque clan chat @ConfigItem( position = 11, + keyName = "opaqueClanInfo", + name = "Clan chat info", + description = "Clan Chat Information (eg. when joining a channel)", + section = opaqueSection + ) + Color opaqueClanChatInfo(); + + @ConfigItem( + position = 12, + keyName = "opaqueClanInfoHighlight", + name = "Clan chat info highlight", + description = "Clan Chat Information highlight", + section = opaqueSection + ) + default Color opaqueClanChatInfoHighlight() + { + return Color.RED; + } + + @ConfigItem( + position = 13, + keyName = "opaqueClanMessage", + name = "Clan chat message", + description = "Color of Clan chat messages", + section = opaqueSection + ) + Color opaqueClanChatMessage(); + + @ConfigItem( + position = 14, + keyName = "opaqueClanChatMessageHighlight", + name = "Clan chat message highlight", + description = "Color of highlights in Clan Chat messages", + section = opaqueSection + ) + default Color opaqueClanChatMessageHighlight() + { + return Color.decode("#000000"); + } + + @ConfigItem( + position = 15, + keyName = "opaqueClanGuestInfo", + name = "Guest Clan chat info", + description = "Guest Clan Chat Information (eg. when joining a channel)", + section = opaqueSection + ) + Color opaqueClanChatGuestInfo(); + + @ConfigItem( + position = 16, + keyName = "opaqueClanGuestInfoHighlight", + name = "Guest Clan chat info highlight", + description = "Guest Clan Chat Information highlight", + section = opaqueSection + ) + default Color opaqueClanChatGuestInfoHighlight() + { + return Color.RED; + } + + @ConfigItem( + position = 17, + keyName = "opaqueClanGuestMessage", + name = "Guest Clan chat message", + description = "Color of Guest Clan chat messages", + section = opaqueSection + ) + Color opaqueClanChatGuestMessage(); + + @ConfigItem( + position = 18, + keyName = "opaqueClanChatGuestMessageHighlight", + name = "Guest Clan chat message highlight", + description = "Color of highlights in Guest Clan Chat messages", + section = opaqueSection + ) + default Color opaqueClanChatGuestMessageHighlight() + { + return Color.decode("#000000"); + } + //endregion + + @ConfigItem( + position = 19, keyName = "opaqueAutochatMessage", name = "Autochat", description = "Color of Autochat messages", @@ -160,7 +248,7 @@ public interface ChatColorConfig extends Config Color opaqueAutochatMessage(); @ConfigItem( - position = 12, + position = 20, keyName = "opaqueAutochatMessageHighlight", name = "Autochat highlight", description = "Color of highlights in Autochat messages", @@ -169,7 +257,7 @@ public interface ChatColorConfig extends Config Color opaqueAutochatMessageHighlight(); @ConfigItem( - position = 13, + position = 21, keyName = "opaqueTradeChatMessage", name = "Trade chat", description = "Color of Trade Chat Messages", @@ -178,7 +266,7 @@ public interface ChatColorConfig extends Config Color opaqueTradeChatMessage(); @ConfigItem( - position = 14, + position = 22, keyName = "opaqueTradeChatMessageHighlight", name = "Trade chat highlight", description = "Color of highlights in Trade Chat Messages", @@ -187,7 +275,7 @@ public interface ChatColorConfig extends Config Color opaqueTradeChatMessageHighlight(); @ConfigItem( - position = 15, + position = 23, keyName = "opaqueServerMessage", name = "Server message", description = "Color of Server Messages (eg. 'Welcome to RuneScape')", @@ -196,7 +284,7 @@ public interface ChatColorConfig extends Config Color opaqueServerMessage(); @ConfigItem( - position = 16, + position = 24, keyName = "opaqueServerMessageHighlight", name = "Server message highlight", description = "Color of highlights in Server Messages", @@ -205,7 +293,7 @@ public interface ChatColorConfig extends Config Color opaqueServerMessageHighlight(); @ConfigItem( - position = 17, + position = 25, keyName = "opaqueGameMessage", name = "Game message", description = "Color of Game Messages", @@ -214,7 +302,7 @@ public interface ChatColorConfig extends Config Color opaqueGameMessage(); @ConfigItem( - position = 18, + position = 26, keyName = "opaqueGameMessageHighlight", name = "Game message highlight", description = "Color of highlights in Game Messages", @@ -226,7 +314,7 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 19, + position = 27, keyName = "opaqueExamine", name = "Examine", description = "Color of Examine Text", @@ -235,7 +323,7 @@ public interface ChatColorConfig extends Config Color opaqueExamine(); @ConfigItem( - position = 20, + position = 28, keyName = "opaqueExamineHighlight", name = "Examine highlight", description = "Color of highlights in Examine Text", @@ -247,7 +335,7 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 21, + position = 29, keyName = "opaqueFiltered", name = "Filtered", description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered)", @@ -256,7 +344,7 @@ public interface ChatColorConfig extends Config Color opaqueFiltered(); @ConfigItem( - position = 22, + position = 30, keyName = "opaqueFilteredHighlight", name = "Filtered highlight", description = "Color of highlights in Filtered Text", @@ -265,7 +353,7 @@ public interface ChatColorConfig extends Config Color opaqueFilteredHighlight(); @ConfigItem( - position = 23, + position = 31, keyName = "opaqueUsername", name = "Usernames", description = "Color of Usernames", @@ -274,7 +362,7 @@ public interface ChatColorConfig extends Config Color opaqueUsername(); @ConfigItem( - position = 24, + position = 32, keyName = "opaquePrivateUsernames", name = "Private chat usernames", description = "Color of Usernames in Private Chat", @@ -283,16 +371,34 @@ public interface ChatColorConfig extends Config Color opaquePrivateUsernames(); @ConfigItem( - position = 25, + position = 33, keyName = "opaqueClanChannelName", - name = "Friends chat channel name", + name = "Friends Chat channel name", description = "Color of Friends chat channel name", section = opaqueSection ) Color opaqueFriendsChatChannelName(); @ConfigItem( - position = 26, + position = 34, + keyName = "opaqueClanChatChannelName", + name = "Clan Chat channel name", + description = "Color of Clan chat channel name", + section = opaqueSection + ) + Color opaqueClanChannelName(); + + @ConfigItem( + position = 35, + keyName = "opaqueClanChatGuestChannelName", + name = "Guest Clan Chat channel name", + description = "Color of Guest clan chat channel name", + section = opaqueSection + ) + Color opaqueClanGuestChatChannelName(); + + @ConfigItem( + position = 36, keyName = "opaqueClanUsernames", name = "Friends chat usernames", description = "Color of usernames in Friends chat", @@ -301,7 +407,25 @@ public interface ChatColorConfig extends Config Color opaqueFriendsChatUsernames(); @ConfigItem( - position = 27, + position = 37, + keyName = "opaqueClanChatUsernames", + name = "Clan chat usernames", + description = "Color of usernames in Clan chat", + section = opaqueSection + ) + Color opaqueClanChatUsernames(); + + @ConfigItem( + position = 38, + keyName = "opaqueClanChatGuestUsernames", + name = "Guest Clan chat usernames", + description = "Color of usernames in Guest Clan chat", + section = opaqueSection + ) + Color opaqueClanChatGuestUsernames(); + + @ConfigItem( + position = 39, keyName = "opaquePublicFriendUsernames", name = "Public friend usernames", description = "Color of Friend Usernames in Public Chat", @@ -310,7 +434,7 @@ public interface ChatColorConfig extends Config Color opaquePublicFriendUsernames(); @ConfigItem( - position = 28, + position = 40, keyName = "opaquePlayerUsername", name = "Your username", description = "Color of your username", @@ -381,6 +505,7 @@ public interface ChatColorConfig extends Config return Color.decode("#FFFFFF"); } + //region transparent friends chat @ConfigItem( position = 57, keyName = "transparentFriendsChatInfo", @@ -422,9 +547,96 @@ public interface ChatColorConfig extends Config { return Color.decode("#FFFFFF"); } + //endregion + //region transparent clan chat @ConfigItem( position = 61, + keyName = "transparentClanInfo", + name = "Clan chat info (transparent)", + description = "Clan Chat Information (eg. when joining a channel) (transparent)", + section = transparentSection + ) + Color transparentClanChatInfo(); + + @ConfigItem( + position = 62, + keyName = "transparentClanInfoHighlight", + name = "Clan chat info highlight (transparent)", + description = "Clan Chat Information highlight (transparent)", + section = transparentSection + ) + default Color transparentClanChatInfoHighlight() + { + return Color.RED; + } + + @ConfigItem( + position = 63, + keyName = "transparentClanMessage", + name = "Clan chat message (transparent)", + description = "Color of Clan chat messages (transparent)", + section = transparentSection + ) + Color transparentClanChatMessage(); + + @ConfigItem( + position = 64, + keyName = "transparentClanChatMessageHighlight", + name = "Clan chat message highlight (transparent)", + description = "Color of highlights in Clan Chat messages (transparent)", + section = transparentSection + ) + default Color transparentClanChatMessageHighlight() + { + return Color.decode("#FFFFFF"); + } + + @ConfigItem( + position = 65, + keyName = "transparentClanGuestInfo", + name = "Guest Clan chat info (transparent)", + description = "Guest Clan Chat Information (eg. when joining a channel) (transparent)", + section = transparentSection + ) + Color transparentClanChatGuestInfo(); + + @ConfigItem( + position = 66, + keyName = "transparentClanGuestInfoHighlight", + name = "Guest Clan chat info highlight (transparent)", + description = "Guest Clan Chat Information highlight (transparent)", + section = transparentSection + ) + default Color transparentClanChatGuestInfoHighlight() + { + return Color.RED; + } + + @ConfigItem( + position = 67, + keyName = "transparentClanGuestMessage", + name = "Guest Clan chat message (transparent)", + description = "Color of Guest Clan chat messages (transparent)", + section = transparentSection + ) + Color transparentClanChatGuestMessage(); + + @ConfigItem( + position = 68, + keyName = "transparentClanChatGuestMessageHighlight", + name = "Guest Clan chat message highlight (transparent)", + description = "Color of highlights in Guest Clan Chat messages (transparent)", + section = transparentSection + ) + default Color transparentClanChatGuestMessageHighlight() + { + return Color.decode("#FFFFFF"); + } + //endregion + + @ConfigItem( + position = 69, keyName = "transparentAutochatMessage", name = "Autochat (transparent)", description = "Color of Autochat messages (transparent)", @@ -433,7 +645,7 @@ public interface ChatColorConfig extends Config Color transparentAutochatMessage(); @ConfigItem( - position = 62, + position = 70, keyName = "transparentAutochatMessageHighlight", name = "Autochat highlight (transparent)", description = "Color of highlights in Autochat messages (transparent)", @@ -442,7 +654,7 @@ public interface ChatColorConfig extends Config Color transparentAutochatMessageHighlight(); @ConfigItem( - position = 63, + position = 71, keyName = "transparentTradeChatMessage", name = "Trade chat (transparent)", description = "Color of Trade Chat Messages (transparent)", @@ -451,7 +663,7 @@ public interface ChatColorConfig extends Config Color transparentTradeChatMessage(); @ConfigItem( - position = 64, + position = 72, keyName = "transparentTradeChatMessageHighlight", name = "Trade chat highlight (transparent)", description = "Color of highlights in Trade Chat Messages (transparent)", @@ -460,7 +672,7 @@ public interface ChatColorConfig extends Config Color transparentTradeChatMessageHighlight(); @ConfigItem( - position = 65, + position = 73, keyName = "transparentServerMessage", name = "Server message (transparent)", description = "Color of Server Messages (eg. 'Welcome to RuneScape') (transparent)", @@ -469,7 +681,7 @@ public interface ChatColorConfig extends Config Color transparentServerMessage(); @ConfigItem( - position = 66, + position = 74, keyName = "transparentServerMessageHighlight", name = "Server message highlight (transparent)", description = "Color of highlights in Server Messages (transparent)", @@ -478,7 +690,7 @@ public interface ChatColorConfig extends Config Color transparentServerMessageHighlight(); @ConfigItem( - position = 67, + position = 75, keyName = "transparentGameMessage", name = "Game message (transparent)", description = "Color of Game Messages (transparent)", @@ -487,7 +699,7 @@ public interface ChatColorConfig extends Config Color transparentGameMessage(); @ConfigItem( - position = 68, + position = 76, keyName = "transparentGameMessageHighlight", name = "Game message highlight (transparent)", description = "Color of highlights in Game Messages (transparent)", @@ -499,7 +711,7 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 69, + position = 77, keyName = "transparentExamine", name = "Examine (transparent)", description = "Color of Examine Text (transparent)", @@ -508,7 +720,7 @@ public interface ChatColorConfig extends Config Color transparentExamine(); @ConfigItem( - position = 70, + position = 78, keyName = "transparentExamineHighlight", name = "Examine highlight (transparent)", description = "Color of highlights in Examine Text (transparent)", @@ -520,7 +732,7 @@ public interface ChatColorConfig extends Config } @ConfigItem( - position = 71, + position = 79, keyName = "transparentFiltered", name = "Filtered (transparent)", description = "Color of Filtered Text (messages that aren't shown when Game messages are filtered) (transparent)", @@ -529,7 +741,7 @@ public interface ChatColorConfig extends Config Color transparentFiltered(); @ConfigItem( - position = 72, + position = 80, keyName = "transparentFilteredHighlight", name = "Filtered highlight (transparent)", description = "Color of highlights in Filtered Text (transparent)", @@ -538,7 +750,7 @@ public interface ChatColorConfig extends Config Color transparentFilteredHighlight(); @ConfigItem( - position = 73, + position = 81, keyName = "transparentUsername", name = "Usernames (transparent)", description = "Color of Usernames (transparent)", @@ -547,7 +759,7 @@ public interface ChatColorConfig extends Config Color transparentUsername(); @ConfigItem( - position = 74, + position = 82, keyName = "transparentPrivateUsernames", name = "Private chat usernames (transparent)", description = "Color of Usernames in Private Chat (transparent)", @@ -556,16 +768,34 @@ public interface ChatColorConfig extends Config Color transparentPrivateUsernames(); @ConfigItem( - position = 75, + position = 83, keyName = "transparentClanChannelName", - name = "Friends chat channel name (transparent)", + name = "Friends Chat channel name (transparent)", description = "Color of Friends chat channel name (transparent)", section = transparentSection ) Color transparentFriendsChatChannelName(); @ConfigItem( - position = 76, + position = 84, + keyName = "transparentClanChatChannelName", + name = "Clan Chat channel name (transparent)", + description = "Color of Clan chat channel name (transparent)", + section = transparentSection + ) + Color transparentClanChannelName(); + + @ConfigItem( + position = 85, + keyName = "transparentClanChatGuestChannelName", + name = "Guest Clan Chat channel name (transparent)", + description = "Color of Guest clan chat channel name (transparent)", + section = transparentSection + ) + Color transparentClanChannelGuestName(); + + @ConfigItem( + position = 86, keyName = "transparentClanUsernames", name = "Friends chat usernames (transparent)", description = "Color of usernames in Friends chat (transparent)", @@ -574,7 +804,25 @@ public interface ChatColorConfig extends Config Color transparentFriendsChatUsernames(); @ConfigItem( - position = 77, + position = 87, + keyName = "transparentClanClanUsernames", + name = "Clan chat usernames (transparent)", + description = "Color of usernames in Clan chat (transparent)", + section = transparentSection + ) + Color transparentClanChatUsernames(); + + @ConfigItem( + position = 88, + keyName = "transparentClanClanGuestUsernames", + name = "Guest Clan chat usernames (transparent)", + description = "Color of usernames in Guest Clan chat (transparent)", + section = transparentSection + ) + Color transparentClanChatGuestUsernames(); + + @ConfigItem( + position = 89, keyName = "transparentPublicFriendUsernames", name = "Public friend usernames (transparent)", description = "Color of Friend Usernames in Public Chat (transparent)", @@ -583,7 +831,7 @@ public interface ChatColorConfig extends Config Color transparentPublicFriendUsernames(); @ConfigItem( - position = 78, + position = 90, keyName = "transparentPlayerUsername", name = "Your username (transparent)", description = "Color of your username (transparent)", From 1c75a97df543c7286d6000b928e6ef1917c0bae6 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:18:43 -0400 Subject: [PATCH 05/23] world hopper: add hop-to clan member --- .../net/runelite/api/widgets/WidgetID.java | 12 ++++++++ .../net/runelite/api/widgets/WidgetInfo.java | 5 +++- .../worldhopper/WorldHopperPlugin.java | 28 +++++++++++++++++-- 3 files changed, 42 insertions(+), 3 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 7bca04ced4..5c5b395588 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 @@ -165,6 +165,8 @@ public class WidgetID public static final int DUEL_INVENTORY_OTHER_GROUP_ID = 481; public static final int TRAILBLAZER_AREAS_GROUP_ID = 512; public static final int TEMPOROSS_GROUP_ID = 437; + public static final int CLAN_GROUP_ID = 701; + public static final int CLAN_GUEST_GROUP_ID = 702; static class WorldMap { @@ -951,4 +953,14 @@ public class WidgetID { static final int STATUS_INDICATOR = 4; } + + static class Clan + { + static final int MEMBERS = 8; + } + + static class ClanGuest + { + static final int MEMBERS = 8; + } } diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index c86678fdff..4044ef93b0 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -541,7 +541,10 @@ public enum WidgetInfo MULTICOMBAT_RESIZEABLE_MODERN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR), MULTICOMBAT_RESIZEABLE_CLASSIC(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR), - TEMPOROSS_STATUS_INDICATOR(WidgetID.TEMPOROSS_GROUP_ID, WidgetID.TemporossStatus.STATUS_INDICATOR) + TEMPOROSS_STATUS_INDICATOR(WidgetID.TEMPOROSS_GROUP_ID, WidgetID.TemporossStatus.STATUS_INDICATOR), + + CLAN_MEMBER_LIST(WidgetID.CLAN_GROUP_ID, WidgetID.Clan.MEMBERS), + CLAN_GUEST_MEMBER_LIST(WidgetID.CLAN_GUEST_GROUP_ID, WidgetID.ClanGuest.MEMBERS), ; private final int groupId; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java index 6fbd1a4c09..52c1e6d231 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java @@ -56,6 +56,8 @@ import net.runelite.api.MenuAction; import net.runelite.api.MenuEntry; import net.runelite.api.NameableContainer; import net.runelite.api.Varbits; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanChannelMember; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.GameTick; @@ -353,10 +355,12 @@ public class WorldHopperPlugin extends Plugin return; } - int groupId = WidgetInfo.TO_GROUP(event.getActionParam1()); + final int componentId = event.getActionParam1(); + int groupId = WidgetInfo.TO_GROUP(componentId); String option = event.getOption(); - if (groupId == WidgetInfo.FRIENDS_LIST.getGroupId() || groupId == WidgetInfo.FRIENDS_CHAT.getGroupId()) + if (groupId == WidgetInfo.FRIENDS_LIST.getGroupId() || groupId == WidgetInfo.FRIENDS_CHAT.getGroupId() + || componentId == WidgetInfo.CLAN_MEMBER_LIST.getId() || componentId == WidgetInfo.CLAN_GUEST_MEMBER_LIST.getId()) { boolean after; @@ -744,6 +748,26 @@ public class WorldHopperPlugin extends Plugin } } + ClanChannel clanChannel = client.getClanChannel(); + if (clanChannel != null) + { + ClanChannelMember member = clanChannel.findMember(cleanName); + if (member != null) + { + return member; + } + } + + clanChannel = client.getGuestClanChannel(); + if (clanChannel != null) + { + ClanChannelMember member = clanChannel.findMember(cleanName); + if (member != null) + { + return member; + } + } + NameableContainer friendContainer = client.getFriendContainer(); if (friendContainer != null) { From 7de3b61860dad942212d019e5fd594d94aed506f Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:21:20 -0400 Subject: [PATCH 06/23] player indicators: add clans --- .../PlayerIndicatorsConfig.java | 39 ++++++++++- .../PlayerIndicatorsOverlay.java | 64 +++++++++++-------- .../PlayerIndicatorsPlugin.java | 23 +++++-- .../PlayerIndicatorsService.java | 38 +++++++++-- 4 files changed, 126 insertions(+), 38 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java index 5daffe8ef0..2fb48231cf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsConfig.java @@ -95,7 +95,7 @@ public interface PlayerIndicatorsConfig extends Config description = "Configures if friends chat members should be highlighted", section = highlightSection ) - default boolean drawFriendsChatMemberNames() + default boolean highlightFriendsChat() { return true; } @@ -138,6 +138,30 @@ public interface PlayerIndicatorsConfig extends Config @ConfigItem( position = 8, + keyName = "drawClanChatMemberNames", + name = "Highlight clan members", + description = "Configures whether or not clan members should be highlighted", + section = highlightSection + ) + default boolean highlightClanMembers() + { + return true; + } + + @ConfigItem( + position = 9, + keyName = "clanChatMemberColor", + name = "Clan member", + description = "Color of clan members", + section = highlightSection + ) + default Color getClanMemberColor() + { + return new Color(36, 15, 171); + } + + @ConfigItem( + position = 10, keyName = "drawNonClanMemberNames", name = "Highlight others", description = "Configures whether or not other players should be highlighted", @@ -149,7 +173,7 @@ public interface PlayerIndicatorsConfig extends Config } @ConfigItem( - position = 9, + position = 11, keyName = "nonClanMemberColor", name = "Others", description = "Color of other players names", @@ -214,4 +238,15 @@ public interface PlayerIndicatorsConfig extends Config { return true; } + + @ConfigItem( + position = 15, + keyName = "clanchatMenuIcons", + name = "Show clan chat ranks", + description = "Add clan chat rank to right click menu and next to player names" + ) + default boolean showClanChatRanks() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java index 063a3cd488..fb16f64754 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java @@ -34,6 +34,7 @@ import javax.inject.Singleton; import net.runelite.api.FriendsChatRank; import net.runelite.api.Player; import net.runelite.api.Point; +import net.runelite.api.clan.ClanTitle; import net.runelite.client.game.ChatIconManager; import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.OverlayPosition; @@ -108,40 +109,49 @@ public class PlayerIndicatorsOverlay extends Overlay return; } - if (actor.isFriendsChatMember() && config.showFriendsChatRanks()) + BufferedImage rankImage = null; + if (actor.isFriendsChatMember() && config.highlightFriendsChat() && config.showFriendsChatRanks()) { final FriendsChatRank rank = playerIndicatorsService.getFriendsChatRank(actor); if (rank != FriendsChatRank.UNRANKED) { - final BufferedImage rankImage = chatIconManager.getRankImage(rank); - - if (rankImage != null) - { - final int imageWidth = rankImage.getWidth(); - final int imageTextMargin; - final int imageNegativeMargin; - - if (drawPlayerNamesConfig == PlayerNameLocation.MODEL_RIGHT) - { - imageTextMargin = imageWidth; - imageNegativeMargin = 0; - } - else - { - imageTextMargin = imageWidth / 2; - imageNegativeMargin = imageWidth / 2; - } - - final int textHeight = graphics.getFontMetrics().getHeight() - graphics.getFontMetrics().getMaxDescent(); - final Point imageLocation = new Point(textLocation.getX() - imageNegativeMargin - 1, textLocation.getY() - textHeight / 2 - rankImage.getHeight() / 2); - OverlayUtil.renderImageLocation(graphics, imageLocation, rankImage); - - // move text - textLocation = new Point(textLocation.getX() + imageTextMargin, textLocation.getY()); - } + rankImage = chatIconManager.getRankImage(rank); } } + else if (actor.isClanMember() && config.highlightClanMembers() && config.showClanChatRanks()) + { + ClanTitle clanTitle = playerIndicatorsService.getClanTitle(actor); + if (clanTitle != null) + { + rankImage = chatIconManager.getRankImage(clanTitle); + } + } + + if (rankImage != null) + { + final int imageWidth = rankImage.getWidth(); + final int imageTextMargin; + final int imageNegativeMargin; + + if (drawPlayerNamesConfig == PlayerNameLocation.MODEL_RIGHT) + { + imageTextMargin = imageWidth; + imageNegativeMargin = 0; + } + else + { + imageTextMargin = imageWidth / 2; + imageNegativeMargin = imageWidth / 2; + } + + final int textHeight = graphics.getFontMetrics().getHeight() - graphics.getFontMetrics().getMaxDescent(); + final Point imageLocation = new Point(textLocation.getX() - imageNegativeMargin - 1, textLocation.getY() - textHeight / 2 - rankImage.getHeight() / 2); + OverlayUtil.renderImageLocation(graphics, imageLocation, rankImage); + + // move text + textLocation = new Point(textLocation.getX() + imageTextMargin, textLocation.getY()); + } OverlayUtil.renderTextLocation(graphics, textLocation, name, color); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java index b7c5d28471..df72925bb8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java @@ -46,6 +46,7 @@ import static net.runelite.api.MenuAction.SPELL_CAST_ON_PLAYER; import static net.runelite.api.MenuAction.WALK; import net.runelite.api.MenuEntry; import net.runelite.api.Player; +import net.runelite.api.clan.ClanTitle; import net.runelite.api.events.ClientTick; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; @@ -189,11 +190,11 @@ public class PlayerIndicatorsPlugin extends Plugin int image = -1; Color color = null; - if (config.highlightFriends() && player.isFriend()) + if (player.isFriend() && config.highlightFriends()) { color = config.getFriendColor(); } - else if (config.drawFriendsChatMemberNames() && player.isFriendsChatMember()) + else if (player.isFriendsChatMember() && config.highlightFriendsChat()) { color = config.getFriendsChatMemberColor(); @@ -206,12 +207,24 @@ public class PlayerIndicatorsPlugin extends Plugin } } } - else if (config.highlightTeamMembers() - && player.getTeam() > 0 && client.getLocalPlayer().getTeam() == player.getTeam()) + else if (player.getTeam() > 0 && client.getLocalPlayer().getTeam() == player.getTeam() && config.highlightTeamMembers()) { color = config.getTeamMemberColor(); } - else if (config.highlightOthers() && !player.isFriendsChatMember()) + else if (player.isClanMember() && config.highlightClanMembers()) + { + color = config.getClanMemberColor(); + + if (config.showClanChatRanks()) + { + ClanTitle clanTitle = playerIndicatorsService.getClanTitle(player); + if (clanTitle != null) + { + image = chatIconManager.getIconNumber(clanTitle); + } + } + } + else if (!player.isFriendsChatMember() && !player.isClanMember() && config.highlightOthers()) { color = config.getOthersColor(); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsService.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsService.java index c0af49d7cb..e39e4bd79d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsService.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsService.java @@ -33,6 +33,11 @@ import net.runelite.api.FriendsChatManager; import net.runelite.api.FriendsChatMember; import net.runelite.api.FriendsChatRank; import net.runelite.api.Player; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanChannelMember; +import net.runelite.api.clan.ClanRank; +import net.runelite.api.clan.ClanSettings; +import net.runelite.api.clan.ClanTitle; @Singleton public class PlayerIndicatorsService @@ -49,8 +54,9 @@ public class PlayerIndicatorsService public void forEachPlayer(final BiConsumer consumer) { - if (!config.highlightOwnPlayer() && !config.drawFriendsChatMemberNames() - && !config.highlightFriends() && !config.highlightOthers()) + if (!config.highlightOwnPlayer() && !config.highlightFriendsChat() + && !config.highlightFriends() && !config.highlightOthers() + && !config.highlightClanMembers()) { return; } @@ -65,6 +71,7 @@ public class PlayerIndicatorsService } boolean isFriendsChatMember = player.isFriendsChatMember(); + boolean isClanMember = player.isClanMember(); if (player == localPlayer) { @@ -77,7 +84,7 @@ public class PlayerIndicatorsService { consumer.accept(player, config.getFriendColor()); } - else if (config.drawFriendsChatMemberNames() && isFriendsChatMember) + else if (config.highlightFriendsChat() && isFriendsChatMember) { consumer.accept(player, config.getFriendsChatMemberColor()); } @@ -85,13 +92,36 @@ public class PlayerIndicatorsService { consumer.accept(player, config.getTeamMemberColor()); } - else if (config.highlightOthers() && !isFriendsChatMember) + else if (config.highlightClanMembers() && isClanMember) + { + consumer.accept(player, config.getClanMemberColor()); + } + else if (config.highlightOthers() && !isFriendsChatMember && !isClanMember) { consumer.accept(player, config.getOthersColor()); } } } + ClanTitle getClanTitle(Player player) + { + ClanChannel clanChannel = client.getClanChannel(); + ClanSettings clanSettings = client.getClanSettings(); + if (clanChannel == null || clanSettings == null) + { + return null; + } + + ClanChannelMember member = clanChannel.findMember(player.getName()); + if (member == null) + { + return null; + } + + ClanRank rank = member.getRank(); + return clanSettings.titleForRank(rank); + } + FriendsChatRank getFriendsChatRank(Player player) { final FriendsChatManager friendsChatManager = client.getFriendsChatManager(); From 5f9ccd253879f3b68a8d3695a0f971975c5faca5 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:22:08 -0400 Subject: [PATCH 07/23] chat filter: add clan chat --- .../plugins/chatfilter/ChatFilterConfig.java | 21 +++++++++++++---- .../plugins/chatfilter/ChatFilterPlugin.java | 23 ++++++++++++++++++- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterConfig.java index 0ad1071f9d..326e8652d0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterConfig.java @@ -110,11 +110,22 @@ public interface ChatFilterConfig extends Config return false; } + @ConfigItem( + keyName = "filterClanChat", + name = "Filter clan Chat Members", + description = "Filter your clan chat members' messages", + position = 7 + ) + default boolean filterClanChat() + { + return false; + } + @ConfigItem( keyName = "filterLogin", name = "Filter Logged In/Out Messages", description = "Filter your private chat to remove logged in/out messages", - position = 7 + position = 8 ) default boolean filterLogin() { @@ -125,7 +136,7 @@ public interface ChatFilterConfig extends Config keyName = "filterGameChat", name = "Filter Game Chat", description = "Filter your game chat messages", - position = 8 + position = 9 ) default boolean filterGameChat() { @@ -136,7 +147,7 @@ public interface ChatFilterConfig extends Config keyName = "collapseGameChat", name = "Collapse Game Chat", description = "Collapse duplicate game chat messages into a single line", - position = 9 + position = 10 ) default boolean collapseGameChat() { @@ -147,7 +158,7 @@ public interface ChatFilterConfig extends Config keyName = "collapsePlayerChat", name = "Collapse Player Chat", description = "Collapse duplicate player chat messages into a single line", - position = 10 + position = 11 ) default boolean collapsePlayerChat() { @@ -158,7 +169,7 @@ public interface ChatFilterConfig extends Config keyName = "maxRepeatedPublicChats", name = "Repeat filter", description = "Block player chat message if repeated this many times. 0 is off", - position = 11 + position = 12 ) default int maxRepeatedPublicChats() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterPlugin.java index c7252a46b3..4cdcc62404 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatfilter/ChatFilterPlugin.java @@ -53,6 +53,7 @@ import net.runelite.api.Client; import net.runelite.api.FriendsChatManager; import net.runelite.api.MessageNode; import net.runelite.api.Player; +import net.runelite.api.clan.ClanChannel; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.OverheadTextChanged; import net.runelite.api.events.ScriptCallbackEvent; @@ -170,6 +171,8 @@ public class ChatFilterPlugin extends Plugin case PRIVATECHAT: case MODPRIVATECHAT: case FRIENDSCHAT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: if (shouldFilterPlayerMessage(Text.removeTags(name))) { message = censorMessage(name, message); @@ -271,7 +274,8 @@ public class ChatFilterPlugin extends Plugin boolean isMessageFromSelf = playerName.equals(client.getLocalPlayer().getName()); return !isMessageFromSelf && (config.filterFriends() || !client.isFriended(playerName, false)) && - (config.filterFriendsChat() || !isFriendsChatMember(playerName)); + (config.filterFriendsChat() || !isFriendsChatMember(playerName)) && + (config.filterClanChat() || !isClanChatMember(playerName)); } private boolean isFriendsChatMember(String name) @@ -280,6 +284,23 @@ public class ChatFilterPlugin extends Plugin return friendsChatManager != null && friendsChatManager.findByName(name) != null; } + private boolean isClanChatMember(String name) + { + ClanChannel clanChannel = client.getClanChannel(); + if (clanChannel != null && clanChannel.findMember(name) != null) + { + return true; + } + + clanChannel = client.getGuestClanChannel(); + if (clanChannel != null && clanChannel.findMember(name) != null) + { + return true; + } + + return false; + } + String censorMessage(final String username, final String message) { String strippedMessage = jagexPrintableCharMatcher.retainFrom(message) From 6957cea91f5347d10ae71d45c3d3485b8dd193bf Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:22:27 -0400 Subject: [PATCH 08/23] emoji plugin: add clan chat --- .../java/net/runelite/client/plugins/emojis/EmojiPlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java index 9fc33d8647..03866ee5c3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/emojis/EmojiPlugin.java @@ -124,6 +124,8 @@ public class EmojiPlugin extends Plugin case PUBLICCHAT: case MODCHAT: case FRIENDSCHAT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: case PRIVATECHAT: case PRIVATECHATOUT: case MODPRIVATECHAT: From fbd0b57b6838ce1438474997ea9fc3436d0c956c Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:22:38 -0400 Subject: [PATCH 09/23] chat notifications: add clan chat --- .../plugins/chatnotifications/ChatNotificationsPlugin.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java index 9c29b4798c..c13e87c38b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java @@ -209,6 +209,8 @@ public class ChatNotificationsPlugin extends Plugin case MODCHAT: case PUBLICCHAT: case FRIENDSCHAT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: case AUTOTYPER: case MODAUTOTYPER: if (client.getLocalPlayer() != null && Text.toJagexName(Text.removeTags(chatMessage.getName())).equals(client.getLocalPlayer().getName())) @@ -250,7 +252,9 @@ public class ChatNotificationsPlugin extends Plugin || chatMessage.getType() == ChatMessageType.PRIVATECHAT || chatMessage.getType() == ChatMessageType.FRIENDSCHAT || chatMessage.getType() == ChatMessageType.MODCHAT - || chatMessage.getType() == ChatMessageType.MODPRIVATECHAT)) + || chatMessage.getType() == ChatMessageType.MODPRIVATECHAT + || chatMessage.getType() == ChatMessageType.CLAN_CHAT + || chatMessage.getType() == ChatMessageType.CLAN_GUEST_CHAT)) { sendNotification(chatMessage); } From 5bd8932f8e1c219af59930d4c642458856a94b40 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 15:22:59 -0400 Subject: [PATCH 10/23] chat commands: add clan chat --- .../main/java/net/runelite/client/chat/ChatCommandManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java b/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java index 0c3a0bfcbc..ff4d8481d9 100644 --- a/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java +++ b/runelite-client/src/main/java/net/runelite/client/chat/ChatCommandManager.java @@ -98,6 +98,8 @@ public class ChatCommandManager implements ChatboxInputListener case PRIVATECHAT: case MODPRIVATECHAT: case PRIVATECHATOUT: + case CLAN_CHAT: + case CLAN_GUEST_CHAT: break; default: return; From 991e8fda501323a964c933fb947251eedb513ffb Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 May 2021 19:08:30 -0400 Subject: [PATCH 11/23] Allow rs.version to be a double This allows sub-versions of the same RS revision --- .../main/java/net/runelite/cache/updater/CacheUpdater.java | 6 +++--- .../src/test/java/net/runelite/cache/CacheProperties.java | 2 +- .../src/main/java/net/runelite/http/api/RuneLiteAPI.java | 7 ------- http-api/src/main/resources/runelite.properties | 1 - 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/cache-updater/src/main/java/net/runelite/cache/updater/CacheUpdater.java b/cache-updater/src/main/java/net/runelite/cache/updater/CacheUpdater.java index 817ba7fbe2..03a1549b30 100644 --- a/cache-updater/src/main/java/net/runelite/cache/updater/CacheUpdater.java +++ b/cache-updater/src/main/java/net/runelite/cache/updater/CacheUpdater.java @@ -39,7 +39,6 @@ import net.runelite.cache.fs.Archive; import net.runelite.cache.fs.Store; import net.runelite.cache.updater.beans.CacheEntry; import net.runelite.cache.updater.beans.IndexEntry; -import net.runelite.http.api.RuneLiteAPI; import net.runelite.protocol.api.login.HandshakeResponseType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +62,9 @@ public class CacheUpdater implements CommandLineRunner @Value("${minio.bucket}") private String minioBucket; + @Value("${rs.version}") + private int rsVersion; + @Autowired public CacheUpdater( @Qualifier("Runelite Cache SQL2O") Sql2o sql2o, @@ -75,8 +77,6 @@ public class CacheUpdater implements CommandLineRunner public void update() throws IOException, InvalidEndpointException, InvalidPortException, InterruptedException { - int rsVersion = RuneLiteAPI.getRsVersion(); - try (Connection con = sql2o.beginTransaction()) { CacheDAO cacheDao = new CacheDAO(); diff --git a/cache/src/test/java/net/runelite/cache/CacheProperties.java b/cache/src/test/java/net/runelite/cache/CacheProperties.java index 5614563f72..2af3c78a5b 100644 --- a/cache/src/test/java/net/runelite/cache/CacheProperties.java +++ b/cache/src/test/java/net/runelite/cache/CacheProperties.java @@ -40,7 +40,7 @@ public class CacheProperties public static int getRsVersion() throws IOException { - return Integer.parseInt(getProperties().getProperty("rs.version")); + return (int) Double.parseDouble(getProperties().getProperty("rs.version")); } public static int getCacheVersion() throws IOException diff --git a/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java b/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java index dc483f35db..6304d59b46 100644 --- a/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java +++ b/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java @@ -61,7 +61,6 @@ public class RuneLiteAPI private static final String STATICBASE = "https://static.runelite.net"; private static final Properties properties = new Properties(); private static String version; - private static int rsVersion; static { @@ -71,7 +70,6 @@ public class RuneLiteAPI properties.load(in); version = properties.getProperty("runelite.version"); - rsVersion = Integer.parseInt(properties.getProperty("rs.version")); String commit = properties.getProperty("runelite.commit"); boolean dirty = Boolean.parseBoolean(properties.getProperty("runelite.dirty")); @@ -179,9 +177,4 @@ public class RuneLiteAPI RuneLiteAPI.version = version; } - public static int getRsVersion() - { - return rsVersion; - } - } diff --git a/http-api/src/main/resources/runelite.properties b/http-api/src/main/resources/runelite.properties index 3abfd6390e..b912fac6ce 100644 --- a/http-api/src/main/resources/runelite.properties +++ b/http-api/src/main/resources/runelite.properties @@ -1,4 +1,3 @@ runelite.version=${project.version} -rs.version=${rs.version} runelite.commit=${git.commit.id.abbrev} runelite.dirty=${git.dirty} \ No newline at end of file From 76dcf1db1077227aa24586b284adf02e56949148 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Fri, 21 May 2021 10:23:27 -0600 Subject: [PATCH 12/23] scripts/SkillTabBuilder: fix unbalanced stack --- runelite-client/src/main/scripts/SkillTabBuilder.rs2asm | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/scripts/SkillTabBuilder.rs2asm b/runelite-client/src/main/scripts/SkillTabBuilder.rs2asm index a9529b3efb..87d1f1fa64 100644 --- a/runelite-client/src/main/scripts/SkillTabBuilder.rs2asm +++ b/runelite-client/src/main/scripts/SkillTabBuilder.rs2asm @@ -21,6 +21,7 @@ sconst "skillTabBaseLevel" ; push event name runelite_callback ; invoke callback istore 4 ; store the (possibly) edited real skill level + pop_int ; pop the skill id we pushed iload 4 tostring cc_settext 1 From 04884beac088031ecb3eecc312de9473c3de0feb Mon Sep 17 00:00:00 2001 From: Max Weber Date: Fri, 21 May 2021 11:56:38 -0600 Subject: [PATCH 13/23] cache: update cs2 opcodes --- .../runelite/cache/script/Instructions.java | 75 ++++++++++++++++++- .../net/runelite/cache/script/Opcodes.java | 75 ++++++++++++++++++- 2 files changed, 144 insertions(+), 6 deletions(-) diff --git a/cache/src/main/java/net/runelite/cache/script/Instructions.java b/cache/src/main/java/net/runelite/cache/script/Instructions.java index 17dfabfcd1..7146c8a74d 100644 --- a/cache/src/main/java/net/runelite/cache/script/Instructions.java +++ b/cache/src/main/java/net/runelite/cache/script/Instructions.java @@ -69,6 +69,8 @@ public class Instructions add(GET_VARC_STRING, "get_varc_string"); add(SET_VARC_STRING, "set_varc_string"); add(SWITCH, "switch"); + add(GET_VARCLANSETTING, "get_varclansetting"); + add(GET_VARCLAN, "get_varclan"); add(CC_CREATE, "cc_create"); add(CC_DELETE, "cc_delete"); add(CC_DELETEALL, "cc_deleteall"); @@ -78,6 +80,7 @@ public class Instructions add(CC_SETSIZE, "cc_setsize"); add(CC_SETHIDE, "cc_sethide"); add(CC_SETNOCLICKTHROUGH, "cc_setnoclickthrough"); + add(CC_SETNOSCROLLTHROUGH, "cc_setnoscrollthrough"); add(CC_SETSCROLLPOS, "cc_setscrollpos"); add(CC_SETCOLOUR, "cc_setcolour"); add(CC_SETFILL, "cc_setfill"); @@ -102,6 +105,7 @@ public class Instructions add(CC_RESUME_PAUSEBUTTON, "cc_resume_pausebutton"); add(CC_SETFILLCOLOUR, "cc_setfillcolour"); add(CC_SETLINEDIRECTION, "cc_setlinedirection"); + add(CC_SETMODELTRANSPARENT, "cc_setmodeltransparent"); add(CC_SETOBJECT, "cc_setobject"); add(CC_SETNPCHEAD, "cc_setnpchead"); add(CC_SETPLAYERHEAD_SELF, "cc_setplayerhead_self"); @@ -115,6 +119,12 @@ public class Instructions add(CC_SETOPBASE, "cc_setopbase"); add(CC_SETTARGETVERB, "cc_settargetverb"); add(CC_CLEAROPS, "cc_clearops"); + add(CC_SETOPKEY, "cc_setopkey"); + add(CC_SETOPTKEY, "cc_setoptkey"); + add(CC_SETOPKEYRATE, "cc_setopkeyrate"); + add(CC_SETOPTKEYRATE, "cc_setoptkeyrate"); + add(CC_SETOPKEYIGNOREHELD, "cc_setopkeyignoreheld"); + add(CC_SETOPTKEYIGNOREHELD, "cc_setoptkeyignoreheld"); add(CC_SETONCLICK, "cc_setonclick"); add(CC_SETONHOLD, "cc_setonhold"); add(CC_SETONRELEASE, "cc_setonrelease"); @@ -141,6 +151,8 @@ public class Instructions add(CC_SETONSUBCHANGE, "cc_setonsubchange"); add(CC_SETONSTOCKTRANSMIT, "cc_setonstocktransmit"); add(CC_SETONRESIZE, "cc_setonresize"); + add(CC_SETONCLANSETTINGSTRANSMIT, "cc_setonclansettingstransmit"); + add(CC_SETONCLANCHANNELTRANSMIT, "cc_setonclanchanneltransmit"); add(CC_GETX, "cc_getx"); add(CC_GETY, "cc_gety"); add(CC_GETWIDTH, "cc_getwidth"); @@ -159,6 +171,7 @@ public class Instructions add(CC_GETTRANS, "cc_gettrans"); add(CC_GETCOLOUR, "cc_getcolour"); add(CC_GETFILLCOLOUR, "cc_getfillcolour"); + add(CC_GETMODELTRANSPARENT, "cc_getmodeltransparent"); add(CC_GETINVOBJECT, "cc_getinvobject"); add(CC_GETINVCOUNT, "cc_getinvcount"); add(CC_GETID, "cc_getid"); @@ -166,10 +179,12 @@ public class Instructions add(CC_GETOP, "cc_getop"); add(CC_GETOPBASE, "cc_getopbase"); add(CC_CALLONRESIZE, "cc_callonresize"); + add(CC_TRIGGEROP, "cc_triggerop"); add(IF_SETPOSITION, "if_setposition"); add(IF_SETSIZE, "if_setsize"); add(IF_SETHIDE, "if_sethide"); add(IF_SETNOCLICKTHROUGH, "if_setnoclickthrough"); + add(IF_SETNOSCROLLTHROUGH, "if_setnoscrollthrough"); add(IF_SETSCROLLPOS, "if_setscrollpos"); add(IF_SETCOLOUR, "if_setcolour"); add(IF_SETFILL, "if_setfill"); @@ -194,6 +209,7 @@ public class Instructions add(IF_RESUME_PAUSEBUTTON, "if_resume_pausebutton"); add(IF_SETFILLCOLOUR, "if_setfillcolour"); add(IF_SETLINEDIRECTION, "if_setlinedirection"); + add(IF_SETMODELTRANSPARENT, "if_setmodeltransparent"); add(IF_SETOBJECT, "if_setobject"); add(IF_SETNPCHEAD, "if_setnpchead"); add(IF_SETPLAYERHEAD_SELF, "if_setplayerhead_self"); @@ -239,6 +255,8 @@ public class Instructions add(IF_SETONSUBCHANGE, "if_setonsubchange"); add(IF_SETONSTOCKTRANSMIT, "if_setonstocktransmit"); add(IF_SETONRESIZE, "if_setonresize"); + add(IF_SETONCLANSETTINGSTRANSMIT, "if_setonclansettingstransmit"); + add(IF_SETONCLANCHANNELTRANSMIT, "if_setonclanchanneltransmit"); add(IF_GETX, "if_getx"); add(IF_GETY, "if_gety"); add(IF_GETWIDTH, "if_getwidth"); @@ -257,6 +275,7 @@ public class Instructions add(IF_GETTRANS, "if_gettrans"); add(IF_GETCOLOUR, "if_getcolour"); add(IF_GETFILLCOLOUR, "if_getfillcolour"); + add(IF_GETMODELTRANSPARENT, "if_getmodeltransparent"); add(IF_GETINVOBJECT, "if_getinvobject"); add(IF_GETINVCOUNT, "if_getinvcount"); add(IF_HASSUB, "if_hassub"); @@ -265,6 +284,7 @@ public class Instructions add(IF_GETOP, "if_getop"); add(IF_GETOPBASE, "if_getopbase"); add(IF_CALLONRESIZE, "if_callonresize"); + add(IF_TRIGGEROP, "if_triggerop"); add(MES, "mes"); add(ANIM, "anim"); add(IF_CLOSE, "if_close"); @@ -288,10 +308,14 @@ public class Instructions add(SETTAPTODROP, "settaptodrop"); add(GETTAPTODROP, "gettaptodrop"); add(GETCANVASSIZE, "getcanvassize"); + add(MOBILE_SETFPS, "mobile_setfps"); + add(MOBILE_OPENSTORE, "mobile_openstore"); + add(MOBILE_OPENSTORECATEGORY, "mobile_openstorecategory"); add(SETHIDEUSERNAME, "sethideusername"); add(GETHIDEUSERNAME, "gethideusername"); add(SETREMEMBERUSERNAME, "setrememberusername"); add(GETREMEMBERUSERNAME, "getrememberusername"); + add(SHOW_IOS_REVIEW, "show_ios_review"); add(SOUND_SYNTH, "sound_synth"); add(SOUND_SONG, "sound_song"); add(SOUND_JINGLE, "sound_jingle"); @@ -349,6 +373,41 @@ public class Instructions add(CLAN_GETCHATOWNERNAME, "clan_getchatownername"); add(CLAN_ISFRIEND, "clan_isfriend"); add(CLAN_ISIGNORE, "clan_isignore"); + add(ACTIVECLANSETTINGS_FIND_LISTENED, "activeclansettings_find_listened"); + add(ACTIVECLANSETTINGS_FIND_AFFINED, "activeclansettings_find_affined"); + add(ACTIVECLANSETTINGS_GETCLANNAME, "activeclansettings_getclanname"); + add(ACTIVECLANSETTINGS_GETALLOWUNAFFINED, "activeclansettings_getallowunaffined"); + add(ACTIVECLANSETTINGS_GETRANKTALK, "activeclansettings_getranktalk"); + add(ACTIVECLANSETTINGS_GETRANKKICK, "activeclansettings_getrankkick"); + add(ACTIVECLANSETTINGS_GETRANKLOOTSHARE, "activeclansettings_getranklootshare"); + add(ACTIVECLANSETTINGS_GETCOINSHARE, "activeclansettings_getcoinshare"); + add(ACTIVECLANSETTINGS_GETAFFINEDCOUNT, "activeclansettings_getaffinedcount"); + add(ACTIVECLANSETTINGS_GETAFFINEDDISPLAYNAME, "activeclansettings_getaffineddisplayname"); + add(ACTIVECLANSETTINGS_GETAFFINEDRANK, "activeclansettings_getaffinedrank"); + add(ACTIVECLANSETTINGS_GETBANNEDCOUNT, "activeclansettings_getbannedcount"); + add(ACTIVECLANSETTINGS_GETBANNEDDISPLAYNAME, "activeclansettings_getbanneddisplayname"); + add(ACTIVECLANSETTINGS_GETAFFINEDEXTRAINFO, "activeclansettings_getaffinedextrainfo"); + add(ACTIVECLANSETTINGS_GETCURRENTOWNER_SLOT, "activeclansettings_getcurrentowner_slot"); + add(ACTIVECLANSETTINGS_GETREPLACEMENTOWNER_SLOT, "activeclansettings_getreplacementowner_slot"); + add(ACTIVECLANSETTINGS_GETAFFINEDSLOT, "activeclansettings_getaffinedslot"); + add(ACTIVECLANSETTINGS_GETSORTEDAFFINEDSLOT, "activeclansettings_getsortedaffinedslot"); + add(AFFINEDCLANSETTINGS_ADDBANNED_FROMCHANNEL, "affinedclansettings_addbanned_fromchannel"); + add(ACTIVECLANSETTINGS_GETAFFINEDJOINRUNEDAY, "activeclansettings_getaffinedjoinruneday"); + add(AFFINEDCLANSETTINGS_SETMUTED_FROMCHANNEL, "affinedclansettings_setmuted_fromchannel"); + add(ACTIVECLANSETTINGS_GETAFFINEDMUTED, "activeclansettings_getaffinedmuted"); + add(ACTIVECLANCHANNEL_FIND_LISTENED, "activeclanchannel_find_listened"); + add(ACTIVECLANCHANNEL_FIND_AFFINED, "activeclanchannel_find_affined"); + add(ACTIVECLANCHANNEL_GETCLANNAME, "activeclanchannel_getclanname"); + add(ACTIVECLANCHANNEL_GETRANKKICK, "activeclanchannel_getrankkick"); + add(ACTIVECLANCHANNEL_GETRANKTALK, "activeclanchannel_getranktalk"); + add(ACTIVECLANCHANNEL_GETUSERCOUNT, "activeclanchannel_getusercount"); + add(ACTIVECLANCHANNEL_GETUSERDISPLAYNAME, "activeclanchannel_getuserdisplayname"); + add(ACTIVECLANCHANNEL_GETUSERRANK, "activeclanchannel_getuserrank"); + add(ACTIVECLANCHANNEL_GETUSERWORLD, "activeclanchannel_getuserworld"); + add(ACTIVECLANCHANNEL_KICKUSER, "activeclanchannel_kickuser"); + add(ACTIVECLANCHANNEL_GETUSERSLOT, "activeclanchannel_getuserslot"); + add(ACTIVECLANCHANNEL_GETSORTEDUSERSLOT, "activeclanchannel_getsorteduserslot"); + add(CLANPROFILE_FIND, "clanprofile_find"); add(STOCKMARKET_GETOFFERTYPE, "stockmarket_getoffertype"); add(STOCKMARKET_GETOFFERITEM, "stockmarket_getofferitem"); add(STOCKMARKET_GETOFFERPRICE, "stockmarket_getofferprice"); @@ -389,6 +448,11 @@ public class Instructions add(AND, "and"); add(OR, "or"); add(SCALE, "scale"); + add(BITCOUNT, "bitcount"); + add(TOGGLEBIT, "togglebit"); + add(SETBIT_RANGE, "setbit_range"); + add(CLEARBIT_RANGE, "clearbit_range"); + add(GETBIT_RANGE, "getbit_range"); add(APPEND_NUM, "append_num"); add(APPEND, "append"); add(APPEND_SIGNNUM, "append_signnum"); @@ -432,6 +496,7 @@ public class Instructions add(CHAT_GETFILTER_PRIVATE, "chat_getfilter_private"); add(CHAT_SENDPUBLIC, "chat_sendpublic"); add(CHAT_SENDPRIVATE, "chat_sendprivate"); + add(CHAT_SENDCLAN, "chat_sendclan"); add(CHAT_PLAYERNAME, "chat_playername"); add(CHAT_GETFILTER_TRADE, "chat_getfilter_trade"); add(CHAT_GETHISTORYLENGTH, "chat_gethistorylength"); @@ -440,6 +505,7 @@ public class Instructions add(DOCHEAT, "docheat"); add(CHAT_SETMESSAGEFILTER, "chat_setmessagefilter"); add(CHAT_GETMESSAGEFILTER, "chat_getmessagefilter"); + add(WRITECONSOLE, "writeconsole"); add(GETWINDOWMODE, "getwindowmode"); add(SETWINDOWMODE, "setwindowmode"); add(GETDEFAULTWINDOWMODE, "getdefaultwindowmode"); @@ -468,9 +534,10 @@ public class Instructions add(STRUCT_PARAM, "struct_param"); add(ON_MOBILE, "on_mobile"); add(CLIENTTYPE, "clienttype"); - add(BATTERYLEVEL, "batterylevel"); - add(BATTERYCHARGING, "batterycharging"); - add(WIFIAVAILABLE, "wifiavailable"); + add(MOBILE_KEYBOARDHIDE, "mobile_keyboardhide"); + add(MOBILE_BATTERYLEVEL, "mobile_batterylevel"); + add(MOBILE_BATTERYCHARGING, "mobile_batterycharging"); + add(MOBILE_WIFIAVAILABLE, "mobile_wifiavailable"); add(WORLDMAP_GETMAPNAME, "worldmap_getmapname"); add(WORLDMAP_SETMAP, "worldmap_setmap"); add(WORLDMAP_GETZOOM, "worldmap_getzoom"); @@ -505,6 +572,8 @@ public class Instructions add(MEC_TEXTSIZE, "mec_textsize"); add(MEC_CATEGORY, "mec_category"); add(MEC_SPRITE, "mec_sprite"); + add(WORLDMAP_ELEMENT, "worldmap_element"); + add(WORLDMAP_ELEMENTCOORD, "worldmap_elementcoord"); } protected void add(int opcode, String name) diff --git a/cache/src/main/java/net/runelite/cache/script/Opcodes.java b/cache/src/main/java/net/runelite/cache/script/Opcodes.java index e69a1ef5ef..bb5df7ed1f 100644 --- a/cache/src/main/java/net/runelite/cache/script/Opcodes.java +++ b/cache/src/main/java/net/runelite/cache/script/Opcodes.java @@ -60,6 +60,8 @@ public class Opcodes public static final int GET_VARC_STRING = 49; public static final int SET_VARC_STRING = 50; public static final int SWITCH = 60; + public static final int GET_VARCLANSETTING = 74;; + public static final int GET_VARCLAN = 76;; public static final int CC_CREATE = 100; public static final int CC_DELETE = 101; public static final int CC_DELETEALL = 102; @@ -69,6 +71,7 @@ public class Opcodes public static final int CC_SETSIZE = 1001; public static final int CC_SETHIDE = 1003; public static final int CC_SETNOCLICKTHROUGH = 1005; + public static final int CC_SETNOSCROLLTHROUGH = 1006; public static final int CC_SETSCROLLPOS = 1100; public static final int CC_SETCOLOUR = 1101; public static final int CC_SETFILL = 1102; @@ -93,6 +96,7 @@ public class Opcodes public static final int CC_RESUME_PAUSEBUTTON = 1121; public static final int CC_SETFILLCOLOUR = 1123; public static final int CC_SETLINEDIRECTION = 1126; + public static final int CC_SETMODELTRANSPARENT = 1127; public static final int CC_SETOBJECT = 1200; public static final int CC_SETNPCHEAD = 1201; public static final int CC_SETPLAYERHEAD_SELF = 1202; @@ -106,6 +110,12 @@ public class Opcodes public static final int CC_SETOPBASE = 1305; public static final int CC_SETTARGETVERB = 1306; public static final int CC_CLEAROPS = 1307; + public static final int CC_SETOPKEY = 1350; + public static final int CC_SETOPTKEY = 1351; + public static final int CC_SETOPKEYRATE = 1352; + public static final int CC_SETOPTKEYRATE = 1353; + public static final int CC_SETOPKEYIGNOREHELD = 1354; + public static final int CC_SETOPTKEYIGNOREHELD = 1355; public static final int CC_SETONCLICK = 1400; public static final int CC_SETONHOLD = 1401; public static final int CC_SETONRELEASE = 1402; @@ -132,6 +142,8 @@ public class Opcodes public static final int CC_SETONSUBCHANGE = 1424; public static final int CC_SETONSTOCKTRANSMIT = 1425; public static final int CC_SETONRESIZE = 1427; + public static final int CC_SETONCLANSETTINGSTRANSMIT = 1428;; + public static final int CC_SETONCLANCHANNELTRANSMIT = 1429;; public static final int CC_GETX = 1500; public static final int CC_GETY = 1501; public static final int CC_GETWIDTH = 1502; @@ -150,6 +162,7 @@ public class Opcodes public static final int CC_GETTRANS = 1609; public static final int CC_GETCOLOUR = 1611; public static final int CC_GETFILLCOLOUR = 1612; + public static final int CC_GETMODELTRANSPARENT = 1614; public static final int CC_GETINVOBJECT = 1700; public static final int CC_GETINVCOUNT = 1701; public static final int CC_GETID = 1702; @@ -157,10 +170,12 @@ public class Opcodes public static final int CC_GETOP = 1801; public static final int CC_GETOPBASE = 1802; public static final int CC_CALLONRESIZE = 1927; + public static final int CC_TRIGGEROP = 1928; public static final int IF_SETPOSITION = 2000; public static final int IF_SETSIZE = 2001; public static final int IF_SETHIDE = 2003; public static final int IF_SETNOCLICKTHROUGH = 2005; + public static final int IF_SETNOSCROLLTHROUGH = 2006; public static final int IF_SETSCROLLPOS = 2100; public static final int IF_SETCOLOUR = 2101; public static final int IF_SETFILL = 2102; @@ -185,6 +200,7 @@ public class Opcodes public static final int IF_RESUME_PAUSEBUTTON = 2121; public static final int IF_SETFILLCOLOUR = 2123; public static final int IF_SETLINEDIRECTION = 2126; + public static final int IF_SETMODELTRANSPARENT = 2127; public static final int IF_SETOBJECT = 2200; public static final int IF_SETNPCHEAD = 2201; public static final int IF_SETPLAYERHEAD_SELF = 2202; @@ -230,6 +246,8 @@ public class Opcodes public static final int IF_SETONSUBCHANGE = 2424; public static final int IF_SETONSTOCKTRANSMIT = 2425; public static final int IF_SETONRESIZE = 2427; + public static final int IF_SETONCLANSETTINGSTRANSMIT = 2428;; + public static final int IF_SETONCLANCHANNELTRANSMIT = 2429;; public static final int IF_GETX = 2500; public static final int IF_GETY = 2501; public static final int IF_GETWIDTH = 2502; @@ -248,6 +266,7 @@ public class Opcodes public static final int IF_GETTRANS = 2609; public static final int IF_GETCOLOUR = 2611; public static final int IF_GETFILLCOLOUR = 2612; + public static final int IF_GETMODELTRANSPARENT = 2614; public static final int IF_GETINVOBJECT = 2700; public static final int IF_GETINVCOUNT = 2701; public static final int IF_HASSUB = 2702; @@ -256,6 +275,7 @@ public class Opcodes public static final int IF_GETOP = 2801; public static final int IF_GETOPBASE = 2802; public static final int IF_CALLONRESIZE = 2927; + public static final int IF_TRIGGEROP = 2928; public static final int MES = 3100; public static final int ANIM = 3101; public static final int IF_CLOSE = 3103; @@ -279,10 +299,14 @@ public class Opcodes public static final int SETTAPTODROP = 3127; public static final int GETTAPTODROP = 3128; public static final int GETCANVASSIZE = 3132; + public static final int MOBILE_SETFPS = 3133; + public static final int MOBILE_OPENSTORE = 3134; + public static final int MOBILE_OPENSTORECATEGORY = 3135; public static final int SETHIDEUSERNAME = 3141; public static final int GETHIDEUSERNAME = 3142; public static final int SETREMEMBERUSERNAME = 3143; public static final int GETREMEMBERUSERNAME = 3144; + public static final int SHOW_IOS_REVIEW = 3145; public static final int SOUND_SYNTH = 3200; public static final int SOUND_SONG = 3201; public static final int SOUND_JINGLE = 3202; @@ -340,6 +364,41 @@ public class Opcodes public static final int CLAN_GETCHATOWNERNAME = 3625; public static final int CLAN_ISFRIEND = 3626; public static final int CLAN_ISIGNORE = 3627; + public static final int ACTIVECLANSETTINGS_FIND_LISTENED = 3800; + public static final int ACTIVECLANSETTINGS_FIND_AFFINED = 3801; + public static final int ACTIVECLANSETTINGS_GETCLANNAME = 3802; + public static final int ACTIVECLANSETTINGS_GETALLOWUNAFFINED = 3803; + public static final int ACTIVECLANSETTINGS_GETRANKTALK = 3804; + public static final int ACTIVECLANSETTINGS_GETRANKKICK = 3805; + public static final int ACTIVECLANSETTINGS_GETRANKLOOTSHARE = 3806; + public static final int ACTIVECLANSETTINGS_GETCOINSHARE = 3807; + public static final int ACTIVECLANSETTINGS_GETAFFINEDCOUNT = 3809; + public static final int ACTIVECLANSETTINGS_GETAFFINEDDISPLAYNAME = 3810; + public static final int ACTIVECLANSETTINGS_GETAFFINEDRANK = 3811; + public static final int ACTIVECLANSETTINGS_GETBANNEDCOUNT = 3812; + public static final int ACTIVECLANSETTINGS_GETBANNEDDISPLAYNAME = 3813; + public static final int ACTIVECLANSETTINGS_GETAFFINEDEXTRAINFO = 3814; + public static final int ACTIVECLANSETTINGS_GETCURRENTOWNER_SLOT = 3815; + public static final int ACTIVECLANSETTINGS_GETREPLACEMENTOWNER_SLOT = 3816; + public static final int ACTIVECLANSETTINGS_GETAFFINEDSLOT = 3817; + public static final int ACTIVECLANSETTINGS_GETSORTEDAFFINEDSLOT = 3818; + public static final int AFFINEDCLANSETTINGS_ADDBANNED_FROMCHANNEL = 3819; + public static final int ACTIVECLANSETTINGS_GETAFFINEDJOINRUNEDAY = 3820; + public static final int AFFINEDCLANSETTINGS_SETMUTED_FROMCHANNEL = 3821; + public static final int ACTIVECLANSETTINGS_GETAFFINEDMUTED = 3822; + public static final int ACTIVECLANCHANNEL_FIND_LISTENED = 3850; + public static final int ACTIVECLANCHANNEL_FIND_AFFINED = 3851; + public static final int ACTIVECLANCHANNEL_GETCLANNAME = 3852; + public static final int ACTIVECLANCHANNEL_GETRANKKICK = 3853; + public static final int ACTIVECLANCHANNEL_GETRANKTALK = 3854; + public static final int ACTIVECLANCHANNEL_GETUSERCOUNT = 3855; + public static final int ACTIVECLANCHANNEL_GETUSERDISPLAYNAME = 3856; + public static final int ACTIVECLANCHANNEL_GETUSERRANK = 3857; + public static final int ACTIVECLANCHANNEL_GETUSERWORLD = 3858; + public static final int ACTIVECLANCHANNEL_KICKUSER = 3859; + public static final int ACTIVECLANCHANNEL_GETUSERSLOT = 3860; + public static final int ACTIVECLANCHANNEL_GETSORTEDUSERSLOT = 3861; + public static final int CLANPROFILE_FIND = 3890; public static final int STOCKMARKET_GETOFFERTYPE = 3903; public static final int STOCKMARKET_GETOFFERITEM = 3904; public static final int STOCKMARKET_GETOFFERPRICE = 3905; @@ -380,6 +439,11 @@ public class Opcodes public static final int AND = 4014; public static final int OR = 4015; public static final int SCALE = 4018; + public static final int BITCOUNT = 4025; + public static final int TOGGLEBIT = 4026; + public static final int SETBIT_RANGE = 4027; + public static final int CLEARBIT_RANGE = 4028; + public static final int GETBIT_RANGE = 4029; public static final int APPEND_NUM = 4100; public static final int APPEND = 4101; public static final int APPEND_SIGNNUM = 4102; @@ -423,6 +487,7 @@ public class Opcodes public static final int CHAT_GETFILTER_PRIVATE = 5005; public static final int CHAT_SENDPUBLIC = 5008; public static final int CHAT_SENDPRIVATE = 5009; + public static final int CHAT_SENDCLAN = 5010; public static final int CHAT_PLAYERNAME = 5015; public static final int CHAT_GETFILTER_TRADE = 5016; public static final int CHAT_GETHISTORYLENGTH = 5017; @@ -431,6 +496,7 @@ public class Opcodes public static final int DOCHEAT = 5020; public static final int CHAT_SETMESSAGEFILTER = 5021; public static final int CHAT_GETMESSAGEFILTER = 5022; + public static final int WRITECONSOLE = 5023; public static final int GETWINDOWMODE = 5306; public static final int SETWINDOWMODE = 5307; public static final int GETDEFAULTWINDOWMODE = 5308; @@ -459,9 +525,10 @@ public class Opcodes public static final int STRUCT_PARAM = 6516; public static final int ON_MOBILE = 6518; public static final int CLIENTTYPE = 6519; - public static final int BATTERYLEVEL = 6524; - public static final int BATTERYCHARGING = 6525; - public static final int WIFIAVAILABLE = 6526; + public static final int MOBILE_KEYBOARDHIDE = 6521; + public static final int MOBILE_BATTERYLEVEL = 6524; + public static final int MOBILE_BATTERYCHARGING = 6525; + public static final int MOBILE_WIFIAVAILABLE = 6526; public static final int WORLDMAP_GETMAPNAME = 6601; public static final int WORLDMAP_SETMAP = 6602; public static final int WORLDMAP_GETZOOM = 6603; @@ -496,4 +563,6 @@ public class Opcodes public static final int MEC_TEXTSIZE = 6694; public static final int MEC_CATEGORY = 6695; public static final int MEC_SPRITE = 6696; + public static final int WORLDMAP_ELEMENT = 6697; + public static final int WORLDMAP_ELEMENTCOORD = 6699; } From cb0d98bbc80cf32f74895ff9e65eb0efb4159b92 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Fri, 21 May 2021 13:20:41 -0600 Subject: [PATCH 14/23] rl-client: update cs2 overlay opcodes --- .../src/main/scripts/BankSearchLayout.rs2asm | 2 +- .../main/scripts/BankpinButtonSetup.rs2asm | 8 ++-- .../src/main/scripts/ChatBuilder.rs2asm | 42 ++++++++--------- .../src/main/scripts/ChatboxInput.rs2asm | 2 +- .../src/main/scripts/CommandScript.rs2asm | 14 +++--- .../src/main/scripts/DestroyOnOpKey.rs2asm | 2 +- .../src/main/scripts/GELayout.rs2asm | 46 +++++++++---------- .../scripts/NewOptionsPanelZoomSlider.rs2asm | 8 ++-- .../scripts/ScrollWheelZoomHandler.rs2asm | 4 +- .../scripts/ToplevelChatboxBackground.rs2asm | 2 +- .../src/main/scripts/ToplevelCompassOp.rs2asm | 12 ++--- 11 files changed, 71 insertions(+), 71 deletions(-) diff --git a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm index 70ed2a945d..d68db90bae 100644 --- a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm @@ -765,7 +765,7 @@ LABEL681: jump LABEL726 LABEL685: get_varc_string 359 ; Skip truncating of varcstr 22 by not calling 280 - lowercase ; instead get the var directly and lowercase it + lowercase ; instead get the var directly and lowercase it sstore 0 sload 0 string_length diff --git a/runelite-client/src/main/scripts/BankpinButtonSetup.rs2asm b/runelite-client/src/main/scripts/BankpinButtonSetup.rs2asm index 4f783cfe53..f245aa98df 100644 --- a/runelite-client/src/main/scripts/BankpinButtonSetup.rs2asm +++ b/runelite-client/src/main/scripts/BankpinButtonSetup.rs2asm @@ -111,11 +111,11 @@ iload 19 iload 20 sconst "iiiIIIIIIIIIIIIIIIII" - cc_setonop - iload 0 ; button component id - iload 1 ; 0-9 + cc_setonop + iload 0 ; button component id + iload 1 ; 0-9 sconst "bankpinButtonSetup" - runelite_callback + runelite_callback pop_int ; 0-9 pop_int ; button component id return diff --git a/runelite-client/src/main/scripts/ChatBuilder.rs2asm b/runelite-client/src/main/scripts/ChatBuilder.rs2asm index 9f8b32d874..d6d3c097b2 100644 --- a/runelite-client/src/main/scripts/ChatBuilder.rs2asm +++ b/runelite-client/src/main/scripts/ChatBuilder.rs2asm @@ -208,19 +208,19 @@ LABEL165: iconst 126 istore 20 iconst 0 - 3801 + activeclansettings_find_affined iconst 1 if_icmpeq LABEL202 jump LABEL222 LABEL202: iconst 0 - 3851 + activeclanchannel_find_affined iconst 1 if_icmpeq LABEL207 jump LABEL222 LABEL207: sload 0 - 3860 + activeclanchannel_getuserslot istore 17 iload 17 iconst -1 @@ -228,10 +228,10 @@ LABEL207: jump LABEL217 LABEL214: iload 17 - 3857 + activeclanchannel_getuserrank istore 18 LABEL217: - 3853 + activeclanchannel_getrankkick iconst 2956 invoke 4456 istore 20 @@ -562,20 +562,20 @@ LABEL432: jump LABEL942 LABEL458: iconst 0 - 3801 + activeclansettings_find_affined iconst 1 if_icmpeq LABEL463 jump LABEL583 LABEL463: iconst 0 - 3851 + activeclanchannel_find_affined iconst 1 if_icmpeq LABEL468 jump LABEL583 LABEL468: sload 12 removetags - 3860 + activeclanchannel_getuserslot istore 17 iload 17 iconst -1 @@ -583,7 +583,7 @@ LABEL468: jump LABEL549 LABEL476: iload 17 - 3857 + activeclanchannel_getuserrank invoke 4302 istore 16 sstore 16 @@ -732,19 +732,19 @@ LABEL583: LABEL612: jump LABEL942 LABEL613: - 3800 + activeclansettings_find_listened iconst 1 if_icmpeq LABEL617 jump LABEL736 LABEL617: - 3850 + activeclanchannel_find_listened iconst 1 if_icmpeq LABEL621 jump LABEL736 LABEL621: sload 12 removetags - 3860 + activeclanchannel_getuserslot istore 17 iload 17 iconst -1 @@ -752,7 +752,7 @@ LABEL621: jump LABEL702 LABEL629: iload 17 - 3857 + activeclanchannel_getuserrank invoke 4302 istore 16 sstore 16 @@ -897,14 +897,14 @@ LABEL765: jump LABEL942 LABEL766: iconst 0 - 3851 + activeclanchannel_find_affined iconst 1 if_icmpeq LABEL771 jump LABEL796 LABEL771: sconst "[" sload 7 - 3852 + activeclanchannel_getclanname sconst "" sconst "]" join_string 5 @@ -950,14 +950,14 @@ LABEL796: LABEL815: jump LABEL942 LABEL816: - 3850 + activeclanchannel_find_listened iconst 1 if_icmpeq LABEL820 jump LABEL845 LABEL820: sconst "[" sload 7 - 3852 + activeclanchannel_getclanname sconst "" sconst "]" join_string 5 @@ -1080,7 +1080,7 @@ LABEL928: iload 10 ; The id of the messageNode of the message being built sconst "" sconst "addTimestamp" - runelite_callback + runelite_callback pop_int ; pop message id sload 14 join_string 2 ; prepend the timestamp @@ -1207,20 +1207,20 @@ LABEL1017: jump LABEL1050 LABEL1021: iconst 0 - 3851 + activeclanchannel_find_affined iconst 1 if_icmpeq LABEL1026 jump LABEL1050 LABEL1026: sload 12 removetags - 3860 + activeclanchannel_getuserslot istore 17 iload 17 iconst -1 if_icmpeq LABEL1038 iload 17 - 3857 + activeclanchannel_getuserrank iconst -1 if_icmple LABEL1038 jump LABEL1050 diff --git a/runelite-client/src/main/scripts/ChatboxInput.rs2asm b/runelite-client/src/main/scripts/ChatboxInput.rs2asm index f2321db0ac..8dc98f75cc 100644 --- a/runelite-client/src/main/scripts/ChatboxInput.rs2asm +++ b/runelite-client/src/main/scripts/ChatboxInput.rs2asm @@ -53,7 +53,7 @@ LABEL31: sload 0 iload 0 iconst 0 - 5010 + chat_sendclan jump LABEL39 LABEL36: sload 0 diff --git a/runelite-client/src/main/scripts/CommandScript.rs2asm b/runelite-client/src/main/scripts/CommandScript.rs2asm index 010bb90d02..53f510b945 100644 --- a/runelite-client/src/main/scripts/CommandScript.rs2asm +++ b/runelite-client/src/main/scripts/CommandScript.rs2asm @@ -275,12 +275,12 @@ LABEL226: if_icmpeq LABEL230 jump LABEL260 LABEL230: - 3800 + activeclansettings_find_listened iconst 1 if_icmpeq LABEL234 jump LABEL257 LABEL234: - 3850 + activeclanchannel_find_listened iconst 1 if_icmpeq LABEL238 jump LABEL257 @@ -292,7 +292,7 @@ LABEL238: LABEL242: return LABEL243: - 3803 + activeclansettings_getallowunaffined iconst 1 if_icmpeq LABEL247 jump LABEL254 @@ -321,7 +321,7 @@ LABEL260: jump LABEL307 LABEL264: iconst 0 - 3851 + activeclanchannel_find_affined iconst 1 if_icmpeq LABEL269 jump LABEL304 @@ -340,7 +340,7 @@ LABEL277: LABEL278: chat_playername removetags - 3860 + activeclanchannel_getuserslot istore 7 iload 7 iconst -1 @@ -348,8 +348,8 @@ LABEL278: jump LABEL298 LABEL286: iload 7 - 3857 - 3854 + activeclanchannel_getuserrank + activeclanchannel_getranktalk if_icmpge LABEL291 jump LABEL298 LABEL291: diff --git a/runelite-client/src/main/scripts/DestroyOnOpKey.rs2asm b/runelite-client/src/main/scripts/DestroyOnOpKey.rs2asm index 854c1c8c69..077437137c 100644 --- a/runelite-client/src/main/scripts/DestroyOnOpKey.rs2asm +++ b/runelite-client/src/main/scripts/DestroyOnOpKey.rs2asm @@ -35,7 +35,7 @@ LABEL24: iload 3 sconst "destroyOnOpKey" ; load event name runelite_callback ; invoke callback - pop_int + pop_int iconst 2266 iconst 1 iconst 0 diff --git a/runelite-client/src/main/scripts/GELayout.rs2asm b/runelite-client/src/main/scripts/GELayout.rs2asm index 5a75b20ffc..b60bb6537b 100644 --- a/runelite-client/src/main/scripts/GELayout.rs2asm +++ b/runelite-client/src/main/scripts/GELayout.rs2asm @@ -7,13 +7,13 @@ invoke 41 get_varbit 4439 iconst 1 - sub + sub istore 7 iconst 105 iconst 118 iconst 150 iload 7 - enum + enum istore 8 iload 8 iconst -1 @@ -22,19 +22,19 @@ LABEL16: iconst 1 iload 2 - if_sethide + if_sethide iconst 0 iload 3 - if_sethide + if_sethide iconst 1 iload 4 - if_sethide + if_sethide iconst 1 iload 5 - if_sethide + if_sethide iload 0 iload 1 - cc_find + cc_find iconst 1 if_icmpeq LABEL34 jump LABEL36 @@ -42,16 +42,16 @@ LABEL34: sconst "Grand Exchange" sconst "setGETitle" ; runelite_callback ; - cc_settext + cc_settext LABEL36: - return + return LABEL37: iconst 0 iload 2 - if_sethide + if_sethide iconst 0 iload 2 - if_settrans + if_settrans iload 7 stockmarket_isofferempty iconst 1 @@ -60,42 +60,42 @@ LABEL37: LABEL48: iconst 1 iload 3 - if_sethide + if_sethide iconst 1 iload 4 - if_sethide + if_sethide iconst 0 iload 5 - if_sethide + if_sethide iload 0 iload 1 - cc_find + cc_find iconst 1 if_icmpeq LABEL63 jump LABEL65 LABEL63: sconst "Grand Exchange: Set up offer" - cc_settext + cc_settext LABEL65: - return + return LABEL66: iconst 1 iload 3 - if_sethide + if_sethide iconst 0 iload 4 - if_sethide + if_sethide iconst 1 iload 5 - if_sethide + if_sethide iload 0 iload 1 - cc_find + cc_find iconst 1 if_icmpeq LABEL81 jump LABEL83 LABEL81: sconst "Grand Exchange: Offer status" - cc_settext + cc_settext LABEL83: - return + return diff --git a/runelite-client/src/main/scripts/NewOptionsPanelZoomSlider.rs2asm b/runelite-client/src/main/scripts/NewOptionsPanelZoomSlider.rs2asm index 84406d0edc..4b82899ab4 100644 --- a/runelite-client/src/main/scripts/NewOptionsPanelZoomSlider.rs2asm +++ b/runelite-client/src/main/scripts/NewOptionsPanelZoomSlider.rs2asm @@ -5,7 +5,7 @@ .string_var_count 0 iconst 896 sconst "innerZoomLimit" - runelite_callback + runelite_callback iconst 128 sconst "outerZoomLimit" runelite_callback @@ -13,7 +13,7 @@ istore 5 iconst 896 sconst "innerZoomLimit" - runelite_callback + runelite_callback iconst 128 sconst "outerZoomLimit" runelite_callback @@ -40,7 +40,7 @@ LABEL25: get_varc_int 74 iconst 128 sconst "outerZoomLimit" - runelite_callback + runelite_callback sub iload 7 multiply @@ -52,7 +52,7 @@ LABEL34: get_varc_int 73 iconst 128 sconst "outerZoomLimit" - runelite_callback + runelite_callback sub iload 7 multiply diff --git a/runelite-client/src/main/scripts/ScrollWheelZoomHandler.rs2asm b/runelite-client/src/main/scripts/ScrollWheelZoomHandler.rs2asm index 618f50abf9..b4cb3c20c9 100644 --- a/runelite-client/src/main/scripts/ScrollWheelZoomHandler.rs2asm +++ b/runelite-client/src/main/scripts/ScrollWheelZoomHandler.rs2asm @@ -11,8 +11,8 @@ iconst 0 iload 0 iconst 25 - sconst "scrollWheelZoomIncrement" - runelite_callback + sconst "scrollWheelZoomIncrement" + runelite_callback multiply sub istore 1 diff --git a/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm b/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm index c2c74f11c5..9b5c1d580a 100644 --- a/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm +++ b/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm @@ -212,7 +212,7 @@ LABEL177: if_setnoclickthrough iconst 1 iconst 10616867 - 2006 + if_setnoscrollthrough LABEL183: iconst 0 istore 4 diff --git a/runelite-client/src/main/scripts/ToplevelCompassOp.rs2asm b/runelite-client/src/main/scripts/ToplevelCompassOp.rs2asm index cd3eabe7f1..630b1bfdbc 100644 --- a/runelite-client/src/main/scripts/ToplevelCompassOp.rs2asm +++ b/runelite-client/src/main/scripts/ToplevelCompassOp.rs2asm @@ -18,13 +18,13 @@ LABEL10: return LABEL11: ; switch on op index - iload 0 - switch + iload 0 + switch 1: LOOK_NORTH 2: LOOK_SOUTH 3: LOOK_EAST 4: LOOK_WEST - jump LABEL10 + jump LABEL10 LOOK_NORTH: iconst 0 istore 1 @@ -48,10 +48,10 @@ LOOK: sound_synth iconst 225 sconst "lookPreservePitch" - runelite_callback + runelite_callback iconst 5 randominc - add + add iload 1 ; load target angle - cam_forceangle + cam_forceangle return From 939852f135610c78ec7d5a169c1d4798435d959c Mon Sep 17 00:00:00 2001 From: Max Weber Date: Sat, 22 May 2021 10:30:59 -0600 Subject: [PATCH 15/23] rl-client: cleanup cs2 overlays --- .../client/plugins/friendnotes/FriendNotesPlugin.java | 6 ++---- runelite-client/src/main/scripts/ChatboxInput.rs2asm | 4 ++-- runelite-client/src/main/scripts/FriendUpdate.rs2asm | 8 ++++---- .../src/main/scripts/FriendsChatSendKick.rs2asm | 6 +++--- runelite-client/src/main/scripts/IgnoreUpdate.rs2asm | 8 ++++---- .../src/main/scripts/LayoutResizableStones.rs2asm | 3 ++- runelite-client/src/main/scripts/TriggerBankLayout.rs2asm | 6 +++--- 7 files changed, 20 insertions(+), 21 deletions(-) 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 55183e9dff..1a274d664c 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 @@ -342,8 +342,7 @@ public class FriendNotesPlugin extends Plugin switch (event.getEventName()) { - case "friend_cc_settext": - case "ignore_cc_settext": + case "friendsChatSetText": String[] stringStack = client.getStringStack(); int stringStackSize = client.getStringStackSize(); final String rsn = stringStack[stringStackSize - 1]; @@ -354,8 +353,7 @@ public class FriendNotesPlugin extends Plugin stringStack[stringStackSize - 1] = rsn + " "; } break; - case "friend_cc_setposition": - case "ignore_cc_setposition": + case "friendsChatSetPosition": if (currentlyLayouting == null || getFriendNote(currentlyLayouting) == null) { return; diff --git a/runelite-client/src/main/scripts/ChatboxInput.rs2asm b/runelite-client/src/main/scripts/ChatboxInput.rs2asm index 8dc98f75cc..293cb8d4ad 100644 --- a/runelite-client/src/main/scripts/ChatboxInput.rs2asm +++ b/runelite-client/src/main/scripts/ChatboxInput.rs2asm @@ -10,9 +10,9 @@ pop_int ; pop chat type string_length ; get string length of chat message iconst 0 ; load 0 - if_icmpne LABEL100 ; if length is not 0, continue + if_icmpne CONTINUE ; if length is not 0, continue return -LABEL100: +CONTINUE: get_varbit 4394 iconst 1 if_icmpeq LABEL4 diff --git a/runelite-client/src/main/scripts/FriendUpdate.rs2asm b/runelite-client/src/main/scripts/FriendUpdate.rs2asm index f2c0c75634..d9a5ac3180 100644 --- a/runelite-client/src/main/scripts/FriendUpdate.rs2asm +++ b/runelite-client/src/main/scripts/FriendUpdate.rs2asm @@ -3,10 +3,10 @@ .string_stack_count 0 .int_var_count 16 .string_var_count 2 -; callback "friend_cc_settext" +; callback "friendsChatSetText" ; Fired just before the client pops the name off the stack ; Modified by the friendnotes plugin to show the icon -; callback "friend_cc_setposition" +; callback "friendsChatSetPosition" ; Fired just before the client sets the position of "friend changed their name" icon ; Modified by the friendnotes plugin to offset the name changed icon iload 1 @@ -300,7 +300,7 @@ LABEL234: add istore 10 sload 0 - sconst "friend_cc_settext" + sconst "friendsChatSetText" runelite_callback cc_settext iconst 0 @@ -382,7 +382,7 @@ LABEL293: add iconst 0 iconst 0 - sconst "friend_cc_setposition" + sconst "friendsChatSetPosition" runelite_callback cc_setposition 1 iconst 1093 diff --git a/runelite-client/src/main/scripts/FriendsChatSendKick.rs2asm b/runelite-client/src/main/scripts/FriendsChatSendKick.rs2asm index c0b56b46a4..cffc56f643 100644 --- a/runelite-client/src/main/scripts/FriendsChatSendKick.rs2asm +++ b/runelite-client/src/main/scripts/FriendsChatSendKick.rs2asm @@ -10,6 +10,7 @@ iconst 1 if_icmpeq LABEL4 jump CONFIRM_KICK ; Jump to our new label instead + jump LABEL7 LABEL4: sconst "You can't kick players from your team during Wilderness Wars." mes @@ -20,8 +21,7 @@ LABEL7: invoke 96 sload 0 clan_kickuser - jump LABEL73 -LABEL73: +RETURN: return CONFIRM_KICK: sload 0 ; Username we are trying to kick @@ -30,5 +30,5 @@ CONFIRM_KICK: runelite_callback pop_string ; Pop username iconst 0 ; Compare against zero - if_icmpgt LABEL73 ; Early return for chatbox panel confirmation + if_icmpgt RETURN ; Early return for chatbox panel confirmation jump LABEL7 diff --git a/runelite-client/src/main/scripts/IgnoreUpdate.rs2asm b/runelite-client/src/main/scripts/IgnoreUpdate.rs2asm index ddb5ed62f7..b6ad617f29 100644 --- a/runelite-client/src/main/scripts/IgnoreUpdate.rs2asm +++ b/runelite-client/src/main/scripts/IgnoreUpdate.rs2asm @@ -3,10 +3,10 @@ .string_stack_count 0 .int_var_count 13 .string_var_count 2 -; callback "ignore_cc_settext" +; callback "friendsChatSetText" ; Fired just before the client pops the name off the stack ; Modified by the friendnotes plugin to show the icon -; callback "ignore_cc_setposition" +; callback "friendsChatSetPosition" ; Fired just before the client sets the position of "ignored person changed their name" icon ; Modified by the friendnotes plugin to offset the name changed icon iload 1 @@ -157,7 +157,7 @@ LABEL117: add istore 8 sload 0 - sconst "ignore_cc_settext" + sconst "friendsChatSetText" runelite_callback cc_settext iconst 0 @@ -216,7 +216,7 @@ LABEL117: add iconst 0 iconst 0 - sconst "ignore_cc_setposition" + sconst "friendsChatSetPosition" runelite_callback cc_setposition 1 iconst 1093 diff --git a/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm b/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm index f3cb81e957..e9368bc8d8 100644 --- a/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm +++ b/runelite-client/src/main/scripts/LayoutResizableStones.rs2asm @@ -43,7 +43,8 @@ LABEL9: sconst "forceStackStones" ; push event name runelite_callback ; invoke callback iconst 0 ; if 0 is returned, continue normal layout - if_icmpeq LABEL49 + if_icmpne LABEL29 + jump LABEL49 LABEL29: iconst 0 iload 3 diff --git a/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm b/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm index 8fa0ed58a8..e72a736b69 100644 --- a/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm +++ b/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm @@ -9,12 +9,12 @@ iconst 0 ; load active boolean sconst "getSearchingTagTab" ; push event name runelite_callback ; invoke callback - if_icmpne LABEL2 + if_icmpne RELAYOUT ; Let layout continue if current bank tab is 0 get_varbit 4150 iconst 0 - if_icmpeq LABEL2 + if_icmpeq RELAYOUT ; Reset the current bank tab to 0 otherwise iconst 0 @@ -24,7 +24,7 @@ sconst "debug" runelite_callback -LABEL2: +RELAYOUT: iload 0 iload 1 iload 2 From adabb68ff17c883d6772ed502c5f1617d3dfc59e Mon Sep 17 00:00:00 2001 From: Max Weber Date: Tue, 25 May 2021 13:14:21 -0600 Subject: [PATCH 16/23] ChatboxPanelManager: use ScriptPreFired --- .../game/chatbox/ChatboxPanelManager.java | 6 +- .../src/main/scripts/ResetChatboxInput.hash | 1 - .../src/main/scripts/ResetChatboxInput.rs2asm | 269 ------------------ 3 files changed, 3 insertions(+), 273 deletions(-) delete mode 100644 runelite-client/src/main/scripts/ResetChatboxInput.hash delete mode 100644 runelite-client/src/main/scripts/ResetChatboxInput.rs2asm diff --git a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxPanelManager.java b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxPanelManager.java index 9fb70abd9e..dee0846aac 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxPanelManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/chatbox/ChatboxPanelManager.java @@ -34,7 +34,7 @@ import net.runelite.api.GameState; import net.runelite.api.ScriptID; import net.runelite.api.VarClientInt; import net.runelite.api.events.GameStateChanged; -import net.runelite.api.events.ScriptCallbackEvent; +import net.runelite.api.events.ScriptPreFired; import net.runelite.api.vars.InputType; import net.runelite.api.widgets.JavaScriptCallback; import net.runelite.api.widgets.Widget; @@ -153,9 +153,9 @@ public class ChatboxPanelManager } @Subscribe - public void onScriptCallbackEvent(ScriptCallbackEvent ev) + public void onScriptPreFired(ScriptPreFired ev) { - if (currentInput != null && "resetChatboxInput".equals(ev.getEventName())) + if (currentInput != null && ev.getScriptId() == ScriptID.MESSAGE_LAYER_CLOSE) { killCurrentPanel(); } diff --git a/runelite-client/src/main/scripts/ResetChatboxInput.hash b/runelite-client/src/main/scripts/ResetChatboxInput.hash deleted file mode 100644 index 88a7f5569b..0000000000 --- a/runelite-client/src/main/scripts/ResetChatboxInput.hash +++ /dev/null @@ -1 +0,0 @@ -FDFF71BAC7D5E10C1E88F445D60100552D0C5B14A66F8648FFEC39573ECFBE8E \ No newline at end of file diff --git a/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm b/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm deleted file mode 100644 index 1455a92161..0000000000 --- a/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm +++ /dev/null @@ -1,269 +0,0 @@ -.id 299 -.int_stack_count 2 -.string_stack_count 0 -.int_var_count 3 -.string_var_count 0 - sconst "resetChatboxInput" - runelite_callback - iconst 1 - iconst 10616869 - if_sethide - iconst 0 - iconst 10616885 - if_sethide - invoke 923 - iconst 0 - istore 2 - iload 1 - iconst 1 - if_icmpeq LABEL13 - jump LABEL27 -LABEL13: - invoke 553 - istore 2 - iload 2 - invoke 84 - iload 2 - invoke 89 - invoke 223 - iconst 1 - invoke 927 - invoke 1972 - iconst 1 - if_icmpeq LABEL26 - jump LABEL27 -LABEL26: - invoke 1984 -LABEL27: - invoke 1972 - iconst 1 - if_icmpeq LABEL31 - jump LABEL32 -LABEL31: - invoke 2581 -LABEL32: - get_varc_int 5 - switch - 19: LABEL35 - 20: LABEL41 - 21: LABEL41 - 7: LABEL35 - 8: LABEL38 - 9: LABEL41 - 15: LABEL41 - jump LABEL43 -LABEL35: - sconst "0" - resume_countdialog - jump LABEL43 -LABEL38: - sconst "" - resume_namedialog - jump LABEL43 -LABEL41: - sconst "" - resume_stringdialog -LABEL43: - iconst 0 - set_varc_int 5 - iload 0 - iconst 1 - if_icmpeq LABEL49 - jump LABEL51 -LABEL49: - sconst "" - set_varc_string 359 -LABEL51: - iconst 0 - iconst -8 - iconst 1 - iconst 1 - iconst 10616873 - if_setposition - iconst 0 - iconst 40 - iconst 1 - iconst 0 - iconst 10616873 - if_setsize - iconst 0 - iconst 22 - iconst 1 - iconst 1 - iconst 10616874 - if_setposition - iconst 0 - iconst 20 - iconst 1 - iconst 0 - iconst 10616874 - if_setsize - iconst 0 - iconst 10616873 - if_sethide - iconst 0 - iconst 10616874 - if_sethide - iconst 1 - iconst 10616878 - if_sethide - iconst 1 - iconst 10616884 - if_sethide - iconst 0 - iconst 0 - iconst 10616882 - if_setscrollpos - iconst 10616882 - cc_deleteall - iconst 10616883 - cc_deleteall - iconst 0 - iconst -8 - iconst 1 - iconst 1 - iconst 10616873 - if_setposition - iconst 0 - iconst 40 - iconst 1 - iconst 0 - iconst 10616873 - if_setsize - iconst 1 - iconst 1 - iconst 0 - iconst 10616873 - if_settextalign - iconst 496 - iconst 10616873 - if_settextfont - iconst 496 - iconst 10616874 - if_settextfont - iconst 128 - iconst 10616874 - if_setcolour - iconst -1 - sconst "" - iconst 10616874 - if_setonmouseover - iconst -1 - sconst "" - iconst 10616874 - if_setonmouseleave - sconst "" - iconst 10616874 - if_settext - iconst 0 - iconst 22 - iconst 1 - iconst 1 - iconst 10616874 - if_setposition - iconst -1 - sconst "" - iconst 10616869 - if_setonclick - iconst -1 - sconst "" - iconst 10616874 - if_setonclick - iconst -1 - sconst "" - iconst 10616874 - if_setonkey - iconst 1 - iconst 10616871 - if_sethide - iconst -1 - sconst "" - iconst 10616869 - if_setonclick - iconst -1 - sconst "" - iconst 10616869 - if_setontimer - iconst 10616869 - cc_deleteall - iconst 10616875 - cc_deleteall - iconst 10616876 - cc_deleteall - iconst 10616877 - cc_deleteall - iconst 1 - iconst 10616875 - if_sethide - iconst 1 - iconst 10616876 - if_sethide - iconst 1 - iconst 10616877 - if_sethide - iconst -1 - sconst "" - iconst 10616875 - if_setonmouserepeat - iconst -1 - sconst "" - iconst 10616876 - if_setonmouserepeat - iconst -1 - sconst "" - iconst 10616877 - if_setonmouserepeat - iconst -1 - sconst "" - iconst 10616875 - if_setonmouseleave - iconst -1 - sconst "" - iconst 10616876 - if_setonmouseleave - iconst -1 - sconst "" - iconst 10616877 - if_setonmouseleave - iconst -1 - sconst "" - iconst 10616875 - if_setontimer - iconst -1 - sconst "" - iconst 10616876 - if_setontimer - iconst -1 - sconst "" - iconst 10616877 - if_setontimer - iconst -1 - sconst "" - iconst 10616875 - if_setonclick - iconst -1 - sconst "" - iconst 10616876 - if_setonclick - iconst -1 - sconst "" - iconst 10616877 - if_setonclick - get_varc_int 41 - iconst 1337 - if_icmpeq LABEL230 - jump LABEL234 -LABEL230: - invoke 2526 - pop_int - clientclock - set_varc_int 384 -LABEL234: - invoke 1972 - iconst 1 - if_icmpeq LABEL238 - jump LABEL239 -LABEL238: - invoke 2581 -LABEL239: - return From 58e351dca61d8e7a8a2c25f4aad75b8c2643373a Mon Sep 17 00:00:00 2001 From: Max Weber Date: Tue, 25 May 2021 17:08:29 -0600 Subject: [PATCH 17/23] timestamp: use less callbacks in script overlays all of these separate callbacks are error prone to update and hard to test --- .../main/java/net/runelite/api/ScriptID.java | 19 +++++ .../client/chat/ChatMessageManager.java | 25 ++++-- .../plugins/timestamp/TimestampPlugin.java | 55 ++++++++++--- .../src/main/scripts/ChatBuilder.rs2asm | 80 ++++--------------- .../src/main/scripts/ChatSplitBuilder.rs2asm | 35 +++----- 5 files changed, 107 insertions(+), 107 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index 5d294709b8..d106d6cab1 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -332,4 +332,23 @@ public final class ScriptID */ @ScriptArguments(integer = 4) public static final int WIKI_ICON_UPDATE = 3306; + + /** + * Builds a line in the chatbox when there is no username: prefix, such as + * a game or system message + */ + @ScriptArguments(integer = 11, string = 1) + public static final int CHATBOX_BUILD_LINE_WITHOUT_USER = 199; + + /** + * Builds a line in the chatbox when there is a username: prefix + */ + @ScriptArguments(integer = 11, string = 2) + public static final int CHATBOX_BUILD_LINE_WITH_USER = 203; + + /** + * Builds a line in the chatbox when it from a clan + */ + @ScriptArguments(integer = 14, string = 3) + public static final int CHATBOX_BUILD_LINE_WITH_CLAN = 4483; } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java b/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java index 855b69f4cb..17502740ed 100644 --- a/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java +++ b/runelite-client/src/main/java/net/runelite/client/chat/ChatMessageManager.java @@ -196,12 +196,14 @@ public class ChatMessageManager { final String eventName = scriptCallbackEvent.getEventName(); + boolean wrap; switch (eventName) { - case "privateChatFrom": - case "privateChatTo": - case "privateChatSplitFrom": - case "privateChatSplitTo": + case "splitPrivChatUsernameColor": + wrap = false; + break; + case "privChatUsername": + wrap = true; break; default: return; @@ -216,10 +218,17 @@ public class ChatMessageManager final String[] stringStack = client.getStringStack(); final int stringStackSize = client.getStringStackSize(); - - // Stack is: To/From playername : - String toFrom = stringStack[stringStackSize - 3]; - stringStack[stringStackSize - 3] = ColorUtil.prependColorTag(toFrom, usernameColor); + + String fromToUsername = stringStack[stringStackSize - 1]; + if (wrap) + { + fromToUsername = ColorUtil.wrapWithColorTag(fromToUsername, usernameColor); + } + else + { + fromToUsername = ColorUtil.colorTag(usernameColor); + } + stringStack[stringStackSize - 1] = fromToUsername; } private static Color getDefaultColor(ChatMessageType type, boolean transparent) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timestamp/TimestampPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timestamp/TimestampPlugin.java index f49a4be15f..1ab3510d7e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timestamp/TimestampPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timestamp/TimestampPlugin.java @@ -36,7 +36,9 @@ import javax.inject.Inject; import lombok.Getter; import net.runelite.api.Client; import net.runelite.api.MessageNode; +import net.runelite.api.ScriptID; import net.runelite.api.Varbits; +import net.runelite.api.events.ScriptPreFired; import net.runelite.client.events.ConfigChanged; import net.runelite.api.events.ScriptCallbackEvent; import net.runelite.client.config.ConfigManager; @@ -62,6 +64,8 @@ public class TimestampPlugin extends Plugin @Getter private SimpleDateFormat formatter; + private MessageNode currentlyBuildingMessage = null; + @Provides public TimestampConfig provideConfig(final ConfigManager configManager) { @@ -90,32 +94,59 @@ public class TimestampPlugin extends Plugin } @Subscribe - public void onScriptCallbackEvent(ScriptCallbackEvent event) + private void onScriptCallbackEvent(ScriptCallbackEvent event) { - if (!event.getEventName().equals("addTimestamp")) + if (!"chatMessageBuilding".equals(event.getEventName())) { return; } - int[] intStack = client.getIntStack(); - int intStackSize = client.getIntStackSize(); + int uid = client.getIntStack()[client.getIntStackSize() - 1]; + currentlyBuildingMessage = client.getMessages().get(uid); + } + + @Subscribe + private void onScriptPreFired(ScriptPreFired ev) + { + int numStringArgs; + int messagePrefixArg = 0; + switch (ev.getScriptId()) + { + case ScriptID.CHATBOX_BUILD_LINE_WITHOUT_USER: + numStringArgs = 1; + break; + case ScriptID.CHATBOX_BUILD_LINE_WITH_USER: + numStringArgs = 2; + break; + case ScriptID.CHATBOX_BUILD_LINE_WITH_CLAN: + numStringArgs = 3; + break; + default: + return; + } + + if (currentlyBuildingMessage == null) + { + return; + } + + MessageNode messageNode = currentlyBuildingMessage; + currentlyBuildingMessage = null; String[] stringStack = client.getStringStack(); - int stringStackSize = client.getStringStackSize(); - - int messageId = intStack[intStackSize - 1]; - - MessageNode messageNode = client.getMessages().get(messageId); + int stringArgStart = client.getStringStackSize() - numStringArgs; String timestamp = generateTimestamp(messageNode.getTimestamp(), ZoneId.systemDefault()) + " "; - + Color timestampColour = getTimestampColour(); if (timestampColour != null) { timestamp = ColorUtil.wrapWithColorTag(timestamp, timestampColour); } - - stringStack[stringStackSize - 1] = timestamp; + + String segment = stringStack[stringArgStart + messagePrefixArg]; + segment = timestamp + segment; + stringStack[stringArgStart + messagePrefixArg] = segment; } private Color getTimestampColour() diff --git a/runelite-client/src/main/scripts/ChatBuilder.rs2asm b/runelite-client/src/main/scripts/ChatBuilder.rs2asm index d6d3c097b2..e2c2c23fd3 100644 --- a/runelite-client/src/main/scripts/ChatBuilder.rs2asm +++ b/runelite-client/src/main/scripts/ChatBuilder.rs2asm @@ -288,6 +288,10 @@ LABEL245: if_icmpeq LABEL256 jump LABEL1266 LABEL256: + iload 10 ; message uid + sconst "chatMessageBuilding" + runelite_callback + pop_int ; pop uid iload 11 switch 1: LABEL259 @@ -312,14 +316,9 @@ LABEL256: 91: LABEL280 jump LABEL928 LABEL259: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 12 sconst ":" - join_string 3 ; + 1 for timestamp + join_string 2 sload 1 sload 14 sconst "" @@ -339,14 +338,9 @@ LABEL259: istore 7 jump LABEL942 LABEL280: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 12 sconst ":" - join_string 3 ; + 1 for timestamp + join_string 2 sload 3 sload 14 sconst "" @@ -366,17 +360,12 @@ LABEL280: istore 7 jump LABEL942 LABEL301: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sconst "From " sload 12 sconst ":" - sconst "privateChatFrom" - runelite_callback ; for prepending color tags - join_string 4 ; + 1 for timestamp + join_string 3 + sconst "privChatUsername" + runelite_callback sload 2 sload 14 sconst "" @@ -396,15 +385,10 @@ LABEL301: istore 7 jump LABEL942 LABEL323: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 9 sload 14 sconst "" - join_string 4 ; + 1 for timestamp + join_string 3 iload 8 iload 9 iconst 10616888 @@ -420,15 +404,10 @@ LABEL323: istore 7 jump LABEL942 LABEL341: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 2 sload 14 sconst "" - join_string 4 ; + 1 for timestamp + join_string 3 iload 8 iload 9 iconst 10616888 @@ -461,17 +440,12 @@ LABEL362: LABEL373: jump LABEL942 LABEL374: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sconst "To " sload 12 sconst ":" - sconst "privateChatTo" - runelite_callback ; for chat recolors - join_string 4 ; + 1 for timestamp + join_string 3 + sconst "privChatUsername" + runelite_callback sload 2 sload 14 sconst "" @@ -529,11 +503,6 @@ LABEL414: istore 7 jump LABEL942 LABEL432: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sconst "[" sload 5 sload 13 @@ -541,7 +510,7 @@ LABEL432: sconst "] " sload 12 sconst ":" - join_string 8 ; + 1 for time stamp + join_string 7 sload 6 sload 14 sconst "" @@ -623,17 +592,12 @@ LABEL485: istore 7 jump LABEL548 LABEL515: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sconst "[" sload 7 sload 13 sconst "" sconst "]" - join_string 6 ; + 1 for timestamp + join_string 5 iconst -1 iconst 0 iconst 0 @@ -1003,13 +967,7 @@ LABEL845: LABEL864: jump LABEL942 LABEL865: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 14 - join_string 2 invoke 2066 istore 13 sstore 15 @@ -1077,13 +1035,7 @@ LABEL913: LABEL927: jump LABEL942 LABEL928: - iload 10 ; The id of the messageNode of the message being built - sconst "" - sconst "addTimestamp" - runelite_callback - pop_int ; pop message id sload 14 - join_string 2 ; prepend the timestamp iload 8 iload 9 iconst 10616888 diff --git a/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm b/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm index 96519f314c..6a13c2d8af 100644 --- a/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm +++ b/runelite-client/src/main/scripts/ChatSplitBuilder.rs2asm @@ -400,6 +400,10 @@ CHAT_FILTER: if_icmpeq LABEL356 ; Check if we are building this message jump LABEL530 LABEL356: + iload 12 ; message uid + sconst "chatMessageBuilding" + runelite_callback + pop_int iload 17 switch 3: LABEL359 @@ -409,19 +413,14 @@ LABEL356: jump LABEL446 LABEL359: iload 7 - iload 12 ; Load the id of the messageNode - sconst "" ; Push a container for the timestamp - sconst "addTimestamp" ; Push event name - runelite_callback ; Invoke callback - pop_int ; Pop the id of the messageNode sload 4 + sconst "splitPrivChatUsernameColor" + runelite_callback sconst "From " sload 1 sconst ":" - sconst "privateChatSplitFrom" - runelite_callback sconst "" - join_string 6 ; Add the timestamp to the message + join_string 5 sload 4 sload 0 sconst "" @@ -443,19 +442,14 @@ LABEL359: jump LABEL462 LABEL385: iload 7 - iload 12 ; Load the id of the messageNode - sconst "" ; Push container for the timestamp - sconst "addTimestamp" ; Push event name - runelite_callback ; Invoke callback - pop_int ; Pop the id of the messageNode sload 4 + sconst "splitPrivChatUsernameColor" + runelite_callback sconst "To " sload 1 sconst ":" - sconst "privateChatSplitTo" - runelite_callback sconst "" - join_string 6 ; Add the timestamp to the message + join_string 5 sload 4 sload 0 sconst "" @@ -477,15 +471,10 @@ LABEL385: jump LABEL462 LABEL411: iload 7 - iload 12 ; Load the id of the messageNode - sconst "" ; Push a container for the timestamp - sconst "addTimestamp" ; Push event name - runelite_callback ; Invoke callback - pop_int ; Pop the id of the messageNode - sload 4 ; Load the log in/out message + sload 4 sload 0 sconst "" - join_string 4 + join_string 3 iload 9 iload 10 iconst 10682368 From 46935154e4137943011f4d74c51ce53cd9b79af4 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 27 May 2021 14:27:03 -0400 Subject: [PATCH 18/23] runelite-api: add clan member join and leave events --- .../runelite/api/events/ClanMemberJoined.java | 39 +++++++++++++++++++ .../runelite/api/events/ClanMemberLeft.java | 39 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 runelite-api/src/main/java/net/runelite/api/events/ClanMemberJoined.java create mode 100644 runelite-api/src/main/java/net/runelite/api/events/ClanMemberLeft.java diff --git a/runelite-api/src/main/java/net/runelite/api/events/ClanMemberJoined.java b/runelite-api/src/main/java/net/runelite/api/events/ClanMemberJoined.java new file mode 100644 index 0000000000..bc90c354a9 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/events/ClanMemberJoined.java @@ -0,0 +1,39 @@ +/* + * 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.api.events; + +import lombok.Value; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanChannelMember; + +/** + * An event when a clan member joins a clan channel. + */ +@Value +public class ClanMemberJoined +{ + private final ClanChannel clanChannel; + private final ClanChannelMember clanMember; +} diff --git a/runelite-api/src/main/java/net/runelite/api/events/ClanMemberLeft.java b/runelite-api/src/main/java/net/runelite/api/events/ClanMemberLeft.java new file mode 100644 index 0000000000..c4e339408f --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/events/ClanMemberLeft.java @@ -0,0 +1,39 @@ +/* + * 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.api.events; + +import lombok.Value; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanChannelMember; + +/** + * An event when a clan member leaves a channel. + */ +@Value +public class ClanMemberLeft +{ + private final ClanChannel clanChannel; + private final ClanChannelMember clanMember; +} From e7a5b604feeb1b0dc8696bcaa23d1a86283a3dd5 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 27 May 2021 18:19:37 -0400 Subject: [PATCH 19/23] friends chat: rename to chatchannel This makes the friends chat plugin applicable to all chat channels, and adds join/leave notifications for clan chats --- .../net/runelite/api/clan/ClanSettings.java | 1 + .../ActivityType.java | 2 +- .../ChatChannelConfig.java} | 106 +++++++--- .../ChatChannelPlugin.java} | 185 +++++++++++++++--- .../MemberActivity.java | 14 +- .../MemberJoinMessage.java | 2 +- .../MembersIndicator.java | 6 +- 7 files changed, 253 insertions(+), 63 deletions(-) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat => chatchannel}/ActivityType.java (96%) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat/FriendsChatConfig.java => chatchannel/ChatChannelConfig.java} (70%) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat/FriendsChatPlugin.java => chatchannel/ChatChannelPlugin.java} (77%) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat => chatchannel}/MemberActivity.java (88%) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat => chatchannel}/MemberJoinMessage.java (96%) rename runelite-client/src/main/java/net/runelite/client/plugins/{friendschat => chatchannel}/MembersIndicator.java (92%) diff --git a/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java b/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java index c24f6ec23f..5594f88700 100644 --- a/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java +++ b/runelite-api/src/main/java/net/runelite/api/clan/ClanSettings.java @@ -58,5 +58,6 @@ public interface ClanSettings * @see ClanRank * @return */ + @Nullable ClanTitle titleForRank(ClanRank clanRank); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/ActivityType.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ActivityType.java similarity index 96% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/ActivityType.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ActivityType.java index 242090392f..9e0a2ca204 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/ActivityType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ActivityType.java @@ -22,7 +22,7 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; enum ActivityType { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelConfig.java similarity index 70% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatConfig.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelConfig.java index 0ff8362664..d8b4fede63 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelConfig.java @@ -22,22 +22,58 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; import java.awt.Color; import net.runelite.api.FriendsChatRank; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; -@ConfigGroup("clanchat") // group name from the old plugin -public interface FriendsChatConfig extends Config +@ConfigGroup(ChatChannelConfig.GROUP) +public interface ChatChannelConfig extends Config { + String GROUP = "clanchat"; // group name from the old plugin + + @ConfigSection( + name = "Friends Chat", + description = "Configuration for friends chat", + position = 10 + ) + String friendsChatSection = "friendsChat"; + + @ConfigSection( + name = "Clan Chat", + description = "Configuration for clan chat", + position = 20 + ) + String clanChatSection = "clanChat"; + + @ConfigSection( + name = "Guest Clan Chat", + description = "Configuration for guest clan chat", + position = 30 + ) + String guestClanChatSection = "guestClanChat"; + + @ConfigItem( + keyName = "joinLeaveTimeout", + name = "Join/Leave timeout", + description = "Set the timeout duration of join/leave messages. A value of 0 will make the messages permanent.", + position = 0 + ) + default int joinLeaveTimeout() + { + return 20; + } + @ConfigItem( keyName = "clanChatIcons", name = "Chat Icons", description = "Show rank icons next to friends chat members.", - position = 1 + position = 1, + section = friendsChatSection ) default boolean chatIcons() { @@ -48,7 +84,8 @@ public interface FriendsChatConfig extends Config keyName = "recentChats", name = "Recent Chats", description = "Show recent friends chats.", - position = 2 + position = 2, + section = friendsChatSection ) default boolean recentChats() { @@ -59,7 +96,8 @@ public interface FriendsChatConfig extends Config keyName = "clanCounter", name = "Members Counter", description = "Show the amount of friends chat members near you.", - position = 3 + position = 3, + section = friendsChatSection ) default boolean showCounter() { @@ -88,7 +126,8 @@ public interface FriendsChatConfig extends Config keyName = "showJoinLeave", name = "Show Join/Leave", description = "Adds a temporary message notifying when a member joins or leaves.", - position = 4 + position = 4, + section = friendsChatSection ) default boolean showJoinLeave() { @@ -99,29 +138,20 @@ public interface FriendsChatConfig extends Config keyName = "joinLeaveRank", name = "Join/Leave rank", description = "Only show join/leave messages for members at or above this rank.", - position = 5 + position = 5, + section = friendsChatSection ) default FriendsChatRank joinLeaveRank() { return FriendsChatRank.UNRANKED; } - @ConfigItem( - keyName = "joinLeaveTimeout", - name = "Join/Leave timeout", - description = "Set the timeout duration of join/leave messages. A value of 0 will make the messages permanent.", - position = 6 - ) - default int joinLeaveTimeout() - { - return 20; - } - @ConfigItem( keyName = "privateMessageIcons", name = "Private Message Icons", description = "Add rank icons to private messages received from members.", - position = 7 + position = 7, + section = friendsChatSection ) default boolean privateMessageIcons() { @@ -132,7 +162,8 @@ public interface FriendsChatConfig extends Config keyName = "publicChatIcons", name = "Public Chat Icons", description = "Add rank icons to public chat messages from members.", - position = 8 + position = 8, + section = friendsChatSection ) default boolean publicChatIcons() { @@ -143,7 +174,8 @@ public interface FriendsChatConfig extends Config keyName = "confirmKicks", name = "Confirm Kicks", description = "Shows a chat prompt to confirm kicks", - position = 10 + position = 10, + section = friendsChatSection ) default boolean confirmKicks() { @@ -154,7 +186,8 @@ public interface FriendsChatConfig extends Config keyName = "showIgnores", name = "Recolor ignored players", description = "Recolor members who are on your ignore list", - position = 11 + position = 11, + section = friendsChatSection ) default boolean showIgnores() { @@ -165,10 +198,35 @@ public interface FriendsChatConfig extends Config keyName = "showIgnoresColor", name = "Ignored color", description = "Allows you to change the color of the ignored players in your friends chat", - position = 12 + position = 12, + section = friendsChatSection ) default Color showIgnoresColor() { return Color.RED; } + + @ConfigItem( + keyName = "clanChatShowJoinLeave", + name = "Show Join/Leave", + description = "Adds a temporary message notifying when a member joins or leaves.", + position = 0, + section = clanChatSection + ) + default boolean clanChatShowJoinLeave() + { + return false; + } + + @ConfigItem( + keyName = "guestClanChatShowJoinLeave", + name = "Show Join/Leave", + description = "Adds a temporary message notifying when a member joins or leaves.", + position = 0, + section = guestClanChatSection + ) + default boolean guestClanChatShowJoinLeave() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java similarity index 77% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatPlugin.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java index c7dc727b33..4d80810db8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/FriendsChatPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java @@ -24,7 +24,7 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; import com.google.common.base.MoreObjects; import com.google.common.base.Strings; @@ -36,13 +36,14 @@ import java.awt.image.BufferedImage; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; -import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import net.runelite.api.ChatLineBuffer; import net.runelite.api.ChatMessageType; +import net.runelite.api.ChatPlayer; import net.runelite.api.Client; import net.runelite.api.FriendsChatManager; import net.runelite.api.FriendsChatMember; @@ -56,7 +57,14 @@ import net.runelite.api.ScriptID; import net.runelite.api.SpriteID; import net.runelite.api.VarClientStr; import net.runelite.api.Varbits; +import net.runelite.api.clan.ClanChannel; +import net.runelite.api.clan.ClanChannelMember; +import net.runelite.api.clan.ClanRank; +import net.runelite.api.clan.ClanSettings; +import net.runelite.api.clan.ClanTitle; import net.runelite.api.events.ChatMessage; +import net.runelite.api.events.ClanMemberJoined; +import net.runelite.api.events.ClanMemberLeft; import net.runelite.api.events.FriendsChatChanged; import net.runelite.api.events.FriendsChatMemberJoined; import net.runelite.api.events.FriendsChatMemberLeft; @@ -89,11 +97,11 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager; import net.runelite.client.util.Text; @PluginDescriptor( - name = "Friends Chat", - description = "Add rank icons to users talking in friends chat", - tags = {"icons", "rank", "recent", "clan"} + name = "Chat Channels", + description = "Improvements for friends chat and clan chat.", + tags = {"icons", "rank", "recent", "clan", "friend", "channel"} ) -public class FriendsChatPlugin extends Plugin +public class ChatChannelPlugin extends Plugin { private static final int MAX_CHATS = 10; private static final String RECENT_TITLE = "Recent FCs"; @@ -106,7 +114,7 @@ public class FriendsChatPlugin extends Plugin private ChatIconManager chatIconManager; @Inject - private FriendsChatConfig config; + private ChatChannelConfig config; @Inject private InfoBoxManager infoBoxManager; @@ -123,22 +131,22 @@ public class FriendsChatPlugin extends Plugin @Inject private ChatColorConfig chatColorConfig; - private List chats = new ArrayList<>(); + private List chats; private final List members = new ArrayList<>(); private MembersIndicator membersIndicator; /** * queue of temporary messages added to the client */ private final Deque joinMessages = new ArrayDeque<>(); - private final Map activityBuffer = new HashMap<>(); + private final Map activityBuffer = new LinkedHashMap<>(); private int joinedTick; private boolean kickConfirmed = false; @Provides - FriendsChatConfig getConfig(ConfigManager configManager) + ChatChannelConfig getConfig(ConfigManager configManager) { - return configManager.getConfig(FriendsChatConfig.class); + return configManager.getConfig(ChatChannelConfig.class); } @Override @@ -155,6 +163,7 @@ public class FriendsChatPlugin extends Plugin @Override public void shutDown() { + chats = null; clientThread.invoke(() -> colorIgnoredPlayers(Color.WHITE)); members.clear(); resetCounter(); @@ -164,7 +173,7 @@ public class FriendsChatPlugin extends Plugin @Subscribe public void onConfigChanged(ConfigChanged configChanged) { - if (configChanged.getGroup().equals("clanchat")) + if (configChanged.getGroup().equals(ChatChannelConfig.GROUP)) { if (!config.recentChats()) { @@ -219,16 +228,7 @@ public class FriendsChatPlugin extends Plugin } // attempt to filter out world hopping joins - if (!activityBuffer.containsKey(member.getName())) - { - MemberActivity joinActivity = new MemberActivity(ActivityType.JOINED, - member, client.getTickCount()); - activityBuffer.put(member.getName(), joinActivity); - } - else - { - activityBuffer.remove(member.getName()); - } + queueJoin(member, MemberActivity.ChatType.FRIENDS_CHAT); } @Subscribe @@ -263,15 +263,75 @@ public class FriendsChatPlugin extends Plugin return; } - if (!activityBuffer.containsKey(member.getName())) + queueLeave(member, MemberActivity.ChatType.FRIENDS_CHAT); + } + + @Subscribe + public void onClanMemberJoined(ClanMemberJoined clanMemberJoined) + { + MemberActivity.ChatType chatType = clanChannelToChatType(clanMemberJoined.getClanChannel()); + if (chatType != null && clanChannelJoinLeaveEnabled(chatType)) { - MemberActivity leaveActivity = new MemberActivity(ActivityType.LEFT, + queueJoin(clanMemberJoined.getClanMember(), chatType); + } + } + + @Subscribe + public void onClanMemberLeft(ClanMemberLeft clanMemberLeft) + { + MemberActivity.ChatType chatType = clanChannelToChatType(clanMemberLeft.getClanChannel()); + if (chatType != null && clanChannelJoinLeaveEnabled(chatType)) + { + queueLeave(clanMemberLeft.getClanMember(), chatType); + } + } + + private MemberActivity.ChatType clanChannelToChatType(ClanChannel clanChannel) + { + return clanChannel == client.getClanChannel() ? MemberActivity.ChatType.CLAN_CHAT : + clanChannel == client.getGuestClanChannel() ? MemberActivity.ChatType.GUEST_CHAT : + null; + } + + private boolean clanChannelJoinLeaveEnabled(MemberActivity.ChatType chatType) + { + switch (chatType) + { + case CLAN_CHAT: + return config.clanChatShowJoinLeave(); + case GUEST_CHAT: + return config.guestClanChatShowJoinLeave(); + default: + return false; + } + } + + private void queueJoin(ChatPlayer member, MemberActivity.ChatType chatType) + { + // attempt to filter out world hopping joins + if (!activityBuffer.containsKey(member)) + { + MemberActivity joinActivity = new MemberActivity(ActivityType.JOINED, chatType, member, client.getTickCount()); - activityBuffer.put(member.getName(), leaveActivity); + activityBuffer.put(member, joinActivity); } else { - activityBuffer.remove(member.getName()); + activityBuffer.remove(member); + } + } + + private void queueLeave(ChatPlayer member, MemberActivity.ChatType chatType) + { + if (!activityBuffer.containsKey(member)) + { + MemberActivity leaveActivity = new MemberActivity(ActivityType.LEFT, chatType, + member, client.getTickCount()); + activityBuffer.put(member, leaveActivity); + } + else + { + activityBuffer.remove(member); } } @@ -334,7 +394,7 @@ public class FriendsChatPlugin extends Plugin // If this message has been reused since, it will get a different id if (joinMessage.getGetMessageId() == messageNode.getId()) { - ChatLineBuffer ccInfoBuffer = client.getChatLineMap().get(ChatMessageType.FRIENDSCHATNOTIFICATION.getType()); + ChatLineBuffer ccInfoBuffer = client.getChatLineMap().get(messageNode.getType().getType()); if (ccInfoBuffer != null) { ccInfoBuffer.removeMessageNode(messageNode); @@ -357,8 +417,7 @@ public class FriendsChatPlugin extends Plugin private void addActivityMessages() { - FriendsChatManager friendsChatManager = client.getFriendsChatManager(); - if (friendsChatManager == null || activityBuffer.isEmpty()) + if (activityBuffer.isEmpty()) { return; } @@ -372,13 +431,28 @@ public class FriendsChatPlugin extends Plugin if (activity.getTick() < client.getTickCount() - MESSAGE_DELAY) { activityIt.remove(); - addActivityMessage(friendsChatManager, activity.getMember(), activity.getActivityType()); + switch (activity.getChatType()) + { + case FRIENDS_CHAT: + addActivityMessage((FriendsChatMember) activity.getMember(), activity.getActivityType()); + break; + case CLAN_CHAT: + case GUEST_CHAT: + addClanActivityMessage((ClanChannelMember) activity.getMember(), activity.getActivityType(), activity.getChatType()); + break; + } } } } - private void addActivityMessage(FriendsChatManager friendsChatManager, FriendsChatMember member, ActivityType activityType) + private void addActivityMessage(FriendsChatMember member, ActivityType activityType) { + final FriendsChatManager friendsChatManager = client.getFriendsChatManager(); + if (friendsChatManager == null) + { + return; + } + final String activityMessage = activityType == ActivityType.JOINED ? " has joined." : " has left."; final FriendsChatRank rank = member.getRank(); final Color textColor, channelColor; @@ -421,6 +495,55 @@ public class FriendsChatPlugin extends Plugin joinMessages.addLast(joinMessage); } + private void addClanActivityMessage(ClanChannelMember member, ActivityType activityType, MemberActivity.ChatType chatType) + { + ClanSettings clanSettings = chatType == MemberActivity.ChatType.CLAN_CHAT ? client.getClanSettings() : client.getGuestClanSettings(); + ClanRank rank = member.getRank(); + + if (rank == null || clanSettings == null) + { + return; + } + + ClanTitle clanTitle = clanSettings.titleForRank(rank); + int rankIcon = -1; + if (clanTitle != null) + { + // Clan ranks are always included in chat messages, so we'll just always include it in join messages. + rankIcon = chatIconManager.getIconNumber(clanTitle); + } + + final Color textColor; + // Use configured clan chat info colors if set, otherwise default to the jagex text and fc name colors + if (client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1) + { + textColor = MoreObjects.firstNonNull( + chatType == MemberActivity.ChatType.CLAN_CHAT ? chatColorConfig.transparentClanChatInfo() : chatColorConfig.transparentClanChatGuestInfo(), + CHAT_FC_TEXT_TRANSPARENT_BACKGROUND); + } + else + { + textColor = MoreObjects.firstNonNull( + chatType == MemberActivity.ChatType.CLAN_CHAT ? chatColorConfig.opaqueClanChatInfo() : chatColorConfig.opaqueClanChatGuestInfo(), + CHAT_FC_TEXT_OPAQUE_BACKGROUND); + } + + ChatMessageBuilder message = new ChatMessageBuilder(); + if (rankIcon > -1) + { + message.img(rankIcon); + } + message.append(textColor, member.getName() + (activityType == ActivityType.JOINED ? " has joined." : " has left.")); + + final String messageString = message.build(); + final MessageNode line = client.addChatMessage( + chatType == MemberActivity.ChatType.CLAN_CHAT ? ChatMessageType.CLAN_MESSAGE : ChatMessageType.CLAN_GUEST_MESSAGE, + "", messageString, ""); + + MemberJoinMessage joinMessage = new MemberJoinMessage(line, line.getId(), client.getTickCount()); + joinMessages.addLast(joinMessage); + } + @Subscribe public void onVarClientStrChanged(VarClientStrChanged strChanged) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberActivity.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberActivity.java similarity index 88% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberActivity.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberActivity.java index 8e3135b99d..c71dce99f3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberActivity.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberActivity.java @@ -22,17 +22,25 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; import lombok.AllArgsConstructor; import lombok.Value; -import net.runelite.api.FriendsChatMember; +import net.runelite.api.ChatPlayer; @Value @AllArgsConstructor class MemberActivity { + enum ChatType + { + FRIENDS_CHAT, + CLAN_CHAT, + GUEST_CHAT + } + private ActivityType activityType; - private FriendsChatMember member; + private ChatType chatType; + private ChatPlayer member; private Integer tick; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberJoinMessage.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberJoinMessage.java similarity index 96% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberJoinMessage.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberJoinMessage.java index e90905d15c..adb7849593 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MemberJoinMessage.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MemberJoinMessage.java @@ -22,7 +22,7 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; import lombok.Value; import net.runelite.api.MessageNode; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MembersIndicator.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MembersIndicator.java similarity index 92% rename from runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MembersIndicator.java rename to runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MembersIndicator.java index 99b488fd90..a8d2b87775 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/friendschat/MembersIndicator.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/MembersIndicator.java @@ -22,7 +22,7 @@ * (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.friendschat; +package net.runelite.client.plugins.chatchannel; import java.awt.Color; import java.awt.image.BufferedImage; @@ -30,9 +30,9 @@ import net.runelite.client.ui.overlay.infobox.Counter; class MembersIndicator extends Counter { - private final FriendsChatPlugin plugin; + private final ChatChannelPlugin plugin; - MembersIndicator(BufferedImage image, FriendsChatPlugin plugin) + MembersIndicator(BufferedImage image, ChatChannelPlugin plugin) { super(image, plugin, plugin.getMembersSize()); this.plugin = plugin; From 1ae01335b42fc6881348bcface414c32d4033627 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 27 May 2021 21:59:16 -0400 Subject: [PATCH 20/23] chat channel: add typing modes This allows changing the target of typed messages via /f, /c, /g, and /p. All further messages go to the given target until a new target is specified. --- .../chatchannel/ChatChannelPlugin.java | 83 +++++++++++++++++++ .../src/main/scripts/CommandScript.rs2asm | 10 +++ 2 files changed, 93 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java index 4d80810db8..ed9613da66 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatchannel/ChatChannelPlugin.java @@ -41,6 +41,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; +import lombok.AllArgsConstructor; import net.runelite.api.ChatLineBuffer; import net.runelite.api.ChatMessageType; import net.runelite.api.ChatPlayer; @@ -80,6 +81,8 @@ import net.runelite.api.widgets.WidgetInfo; import net.runelite.api.widgets.WidgetType; import net.runelite.client.callback.ClientThread; import net.runelite.client.chat.ChatMessageBuilder; +import net.runelite.client.chat.ChatMessageManager; +import net.runelite.client.chat.QueuedMessage; import net.runelite.client.config.ChatColorConfig; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; @@ -131,6 +134,9 @@ public class ChatChannelPlugin extends Plugin @Inject private ChatColorConfig chatColorConfig; + @Inject + private ChatMessageManager chatMessageManager; + private List chats; private final List members = new ArrayList<>(); private MembersIndicator membersIndicator; @@ -143,6 +149,21 @@ public class ChatChannelPlugin extends Plugin private boolean kickConfirmed = false; + private boolean inputWarning; + + @AllArgsConstructor + private enum InputMode + { + FRIEND("Friends Chat", ChatMessageType.FRIENDSCHAT), + CLAN("Clan Chat", ChatMessageType.CLAN_CHAT), + GUEST("Guest Clan Chat", ChatMessageType.CLAN_GUEST_CHAT); + + private final String prompt; + private final ChatMessageType chatMessageType; + } + + private InputMode inputMode; + @Provides ChatChannelConfig getConfig(ConfigManager configManager) { @@ -168,6 +189,7 @@ public class ChatChannelPlugin extends Plugin members.clear(); resetCounter(); rebuildFriendsChat(); + inputMode = null; } @Subscribe @@ -674,6 +696,67 @@ public class ChatChannelPlugin extends Plugin clientThread.invokeLater(() -> confirmKickPlayer(kickPlayerName)); break; } + case "preChatSendpublic": + { + final String chatboxInput = client.getVar(VarClientStr.CHATBOX_TYPED_TEXT); + switch (chatboxInput) + { + case "/p": + switchTypingMode(null); + break; + case "/f": + switchTypingMode(InputMode.FRIEND); + break; + case "/c": + switchTypingMode(InputMode.CLAN); + break; + case "/g": + switchTypingMode(InputMode.GUEST); + break; + default: + if (inputMode != null) + { + final int[] intStack = client.getIntStack(); + final int intStackSize = client.getIntStackSize(); + intStack[intStackSize - 1] = inputMode.chatMessageType.getType(); // chat message type + intStack[intStackSize - 2] = 0; // prefix length + } + break; + } + break; + } + case "setChatboxInput": + { + Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT); + if (chatboxInput != null && inputMode != null) + { + String text = chatboxInput.getText(); + int idx = text.indexOf(": "); + if (idx != -1) + { + String newText = inputMode.prompt + ": " + text.substring(idx + 2); + chatboxInput.setText(newText); + } + } + break; + } + } + } + + private void switchTypingMode(InputMode mode) + { + inputMode = mode; + client.setVar(VarClientStr.CHATBOX_TYPED_TEXT, ""); + + if (mode != null && !inputWarning) + { + inputWarning = true; + + chatMessageManager.queue(QueuedMessage.builder() + .type(ChatMessageType.CONSOLE) + .runeLiteFormattedMessage("You've entered " + inputMode.prompt + " typing mode. All typed messages will be sent to your " + + inputMode.prompt.toLowerCase() + ". Use /p to reset to public chat.") + .build()); } } diff --git a/runelite-client/src/main/scripts/CommandScript.rs2asm b/runelite-client/src/main/scripts/CommandScript.rs2asm index 53f510b945..cb21384884 100644 --- a/runelite-client/src/main/scripts/CommandScript.rs2asm +++ b/runelite-client/src/main/scripts/CommandScript.rs2asm @@ -270,6 +270,16 @@ LABEL222: istore 5 istore 6 LABEL226: + iload 6 ; prefix length + iload 5 ; chat type + sconst "preChatSendpublic" + runelite_callback + istore 5 ; chat type + istore 6 ; prefix length + get_varc_string 335 ; load input string + string_length ; get length + iconst 0 ; load 0 + if_icmpeq LABEL420 ; if (%varcstring355 == 0) jump to script223 call iload 5 iconst 44 if_icmpeq LABEL230 From 9c255494afb4ac2bb3d64e8985cdbc69de36f916 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Fri, 28 May 2021 17:00:05 +0000 Subject: [PATCH 21/23] Update 196.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 086443a859..1a534e632d 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ true - 196 + 196.2 From 484c764a264c9402f8c3822e4c3fbbb0d2b3d29f Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Fri, 28 May 2021 17:09:09 +0000 Subject: [PATCH 22/23] Release 1.7.10 --- 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 ba47aca07f..64079212ca 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 41dd73f90b..12be3c24fc 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 4cdb0ae997..e492f3fa28 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 29c668e5ec..19855d9670 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index 8e0d60797d..afe3c29ef2 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 Web Service diff --git a/pom.xml b/pom.xml index 1a534e632d..b9367b9146 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 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.10 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index a6822da11e..aa8e742260 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 22ad275e52..bc6d4bc837 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index eaf8a233fc..7c81836d7c 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.10-SNAPSHOT + 1.7.10 jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 7dc305d863..9e490a7564 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.10-SNAPSHOT + 1.7.10 script-assembler-plugin From 04dc76bbfde38f72da25a63866d8e1dac09cfedc Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Fri, 28 May 2021 17:09:14 +0000 Subject: [PATCH 23/23] Bump for 1.7.11-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 64079212ca..d1c17e278f 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 12be3c24fc..7c6ee28718 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index e492f3fa28..62201e708f 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 19855d9670..2a1cd8d4f0 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index afe3c29ef2..0b1d32a5b1 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index b9367b9146..4738faf82b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-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.10 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index aa8e742260..8f59375850 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index bc6d4bc837..0f06b3ad7c 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 7c81836d7c..8afe0d31e5 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.10 + 1.7.11-SNAPSHOT jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 9e490a7564..531ae57463 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.10 + 1.7.11-SNAPSHOT script-assembler-plugin