Merge remote-tracking branch 'runelite/master'
@@ -179,7 +179,7 @@ public final class AnimationID
|
|||||||
public static final int MAGIC_ENCHANTING_BOLTS = 4462;
|
public static final int MAGIC_ENCHANTING_BOLTS = 4462;
|
||||||
public static final int BURYING_BONES = 827;
|
public static final int BURYING_BONES = 827;
|
||||||
public static final int USING_GILDED_ALTAR = 3705;
|
public static final int USING_GILDED_ALTAR = 3705;
|
||||||
public static final int LOOKING_INTO = 832;
|
public static final int LOOKING_INTO = 832; // Generic animation used for filling water vessels, Shades of Mort'ton, etc.
|
||||||
public static final int DIG = 830;
|
public static final int DIG = 830;
|
||||||
public static final int DEMONIC_GORILLA_MAGIC_ATTACK = 7225;
|
public static final int DEMONIC_GORILLA_MAGIC_ATTACK = 7225;
|
||||||
public static final int DEMONIC_GORILLA_MELEE_ATTACK = 7226;
|
public static final int DEMONIC_GORILLA_MELEE_ATTACK = 7226;
|
||||||
|
|||||||
@@ -1300,10 +1300,10 @@ public final class SpriteID
|
|||||||
public static final int UNKNOWN_WHITE_REFRESH_ARROWS = 1412;
|
public static final int UNKNOWN_WHITE_REFRESH_ARROWS = 1412;
|
||||||
public static final int TAB_QUESTS_PURPLE_KOUREND_UNUSED = 1413;
|
public static final int TAB_QUESTS_PURPLE_KOUREND_UNUSED = 1413;
|
||||||
public static final int TAB_QUESTS_PURPLE_KOUREND = 1414;
|
public static final int TAB_QUESTS_PURPLE_KOUREND = 1414;
|
||||||
public static final int UNKNOWN_GREEN_BAR = 1415;
|
public static final int HEALTHBAR_COX_GREEN = 1415;
|
||||||
public static final int UNKNOWN_BLUE_BAR = 1416;
|
public static final int HEALTHBAR_COX_BLUE = 1416;
|
||||||
public static final int UNKNOWN_YELLOW_BAR = 1417;
|
public static final int HEALTHBAR_COX_YELLOW = 1417;
|
||||||
public static final int UNKNOWN_RED_BAR = 1418;
|
public static final int HEALTHBAR_COX_RED = 1418;
|
||||||
/* Unmapped: 1419 */
|
/* Unmapped: 1419 */
|
||||||
public static final int PRAYER_RIGOUR = 1420;
|
public static final int PRAYER_RIGOUR = 1420;
|
||||||
public static final int PRAYER_AUGURY = 1421;
|
public static final int PRAYER_AUGURY = 1421;
|
||||||
@@ -1530,9 +1530,69 @@ public final class SpriteID
|
|||||||
public static final int HEALTHBAR_DEFAULT_BACK_140PX = 2189;
|
public static final int HEALTHBAR_DEFAULT_BACK_140PX = 2189;
|
||||||
public static final int HEALTHBAR_DEFAULT_FRONT_160PX = 2190;
|
public static final int HEALTHBAR_DEFAULT_FRONT_160PX = 2190;
|
||||||
public static final int HEALTHBAR_DEFAULT_BACK_160PX = 2191;
|
public static final int HEALTHBAR_DEFAULT_BACK_160PX = 2191;
|
||||||
|
/* Unmapped: 2192~2306 */
|
||||||
public static final int TAB_CLAN_CHAT = 2307;
|
public static final int TAB_CLAN_CHAT = 2307;
|
||||||
|
/* Unmapped: 2308~2419 */
|
||||||
public static final int WIKI_DESELECTED = 2420;
|
public static final int WIKI_DESELECTED = 2420;
|
||||||
public static final int WIKI_SELECTED = 2421;
|
public static final int WIKI_SELECTED = 2421;
|
||||||
|
/* Unmapped: 2422~2430 */
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_40PX = 2431;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_40PX = 2432;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_30PX = 2433;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_30PX = 2434;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_40PX = 2435;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_40PX = 2436;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_50PX = 2437;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_50PX = 2438;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_60PX = 2439;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_60PX = 2440;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_80PX = 2441;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_80PX = 2442;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_100PX = 2443;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_100PX = 2444;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_120PX = 2445;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_120PX = 2446;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_140PX = 2447;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_140PX = 2448;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_160PX = 2449;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_160PX = 2450;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_30PX = 2451;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_30PX = 2452;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_40PX = 2453;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_40PX = 2454;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_50PX = 2455;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_50PX = 2456;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_60PX = 2457;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_60PX = 2458;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_80PX = 2459;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_80PX = 2460;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_100PX = 2461;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_100PX = 2462;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_120PX = 2463;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_120PX = 2464;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_140PX = 2465;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_140PX = 2466;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_160PX = 2467;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_160PX = 2468;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_30PX = 2469;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_30PX = 2470;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_40PX = 2471;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_40PX = 2472;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_50PX = 2473;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_50PX = 2474;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_60PX = 2475;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_60PX = 2476;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_80PX = 2477;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_80PX = 2478;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_100PX = 2479;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_100PX = 2480;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_120PX = 2481;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_120PX = 2482;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_140PX = 2483;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_140PX = 2484;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_160PX = 2485;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_160PX = 2486;
|
||||||
|
/* Unmapped: 2487~2824 */
|
||||||
public static final int FRIENDS_CHAT_RANK_SMILEY_FRIEND = 2825;
|
public static final int FRIENDS_CHAT_RANK_SMILEY_FRIEND = 2825;
|
||||||
public static final int FRIENDS_CHAT_RANK_CROWN_JAGEX_MODERATOR = 2826;
|
public static final int FRIENDS_CHAT_RANK_CROWN_JAGEX_MODERATOR = 2826;
|
||||||
public static final int FRIENDS_CHAT_RANK_KEY_CHANNEL_OWNER = 2827;
|
public static final int FRIENDS_CHAT_RANK_KEY_CHANNEL_OWNER = 2827;
|
||||||
@@ -1546,7 +1606,19 @@ public final class SpriteID
|
|||||||
public static final int SETTINGS_SLIDER_HANDLE_BLUE = 2858;
|
public static final int SETTINGS_SLIDER_HANDLE_BLUE = 2858;
|
||||||
public static final int SETTINGS_SLIDER_HANDLE_RED = 2859;
|
public static final int SETTINGS_SLIDER_HANDLE_RED = 2859;
|
||||||
public static final int SETTINGS_SLIDER_HANDLE_GREEN = 2860;
|
public static final int SETTINGS_SLIDER_HANDLE_GREEN = 2860;
|
||||||
/* Unmapped: 2861~2980 */
|
/* Unmapped: 2861~2966 */
|
||||||
|
public static final int HEALTHBAR_BLUE_FRONT_50PX = 2967;
|
||||||
|
public static final int HEALTHBAR_BLUE_BACK_50PX = 2968;
|
||||||
|
/* Unmapped: 2968~2970 */
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_70PX = 2971;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_70PX = 2972;
|
||||||
|
public static final int HEALTHBAR_CYAN_FRONT_70PX = 2973;
|
||||||
|
public static final int HEALTHBAR_CYAN_BACK_70PX = 2974;
|
||||||
|
public static final int HEALTHBAR_ORANGE_FRONT_70PX = 2975;
|
||||||
|
public static final int HEALTHBAR_ORANGE_BACK_70PX = 2976;
|
||||||
|
public static final int HEALTHBAR_YELLOW_FRONT_70PX = 2977;
|
||||||
|
public static final int HEALTHBAR_YELLOW_BACK_70PX = 2978;
|
||||||
|
/* Unmapped: 2979, 2980 */
|
||||||
public static final int SPELL_RESURRECT_SUPERIOR_SKELETON = 2981;
|
public static final int SPELL_RESURRECT_SUPERIOR_SKELETON = 2981;
|
||||||
/* Unmapped: 2982~2986 */
|
/* Unmapped: 2982~2986 */
|
||||||
public static final int SPELL_RESURRECT_SUPERIOR_SKELETON_DISABLED = 2987;
|
public static final int SPELL_RESURRECT_SUPERIOR_SKELETON_DISABLED = 2987;
|
||||||
|
|||||||
@@ -182,6 +182,8 @@ public class WidgetID
|
|||||||
public static final int TEMPOROSS_GROUP_ID = 437;
|
public static final int TEMPOROSS_GROUP_ID = 437;
|
||||||
public static final int CLAN_GROUP_ID = 701;
|
public static final int CLAN_GROUP_ID = 701;
|
||||||
public static final int CLAN_GUEST_GROUP_ID = 702;
|
public static final int CLAN_GUEST_GROUP_ID = 702;
|
||||||
|
public static final int GRAVESTONE_GROUP_ID = 672;
|
||||||
|
public static final int POH_TREASURE_CHEST_INVENTORY_GROUP_ID = 674;
|
||||||
|
|
||||||
static class WorldMap
|
static class WorldMap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -928,6 +928,8 @@ public enum WidgetInfo
|
|||||||
GAUNTLET_MAP(WidgetID.GAUNTLET_MAP_GROUP_ID, WidgetID.GauntletMap.CONTAINER),
|
GAUNTLET_MAP(WidgetID.GAUNTLET_MAP_GROUP_ID, WidgetID.GauntletMap.CONTAINER),
|
||||||
|
|
||||||
SHOP_ITEMS_CONTAINER(WidgetID.SHOP_GROUP_ID, WidgetID.Shop.ITEMS_CONTAINER),
|
SHOP_ITEMS_CONTAINER(WidgetID.SHOP_GROUP_ID, WidgetID.Shop.ITEMS_CONTAINER),
|
||||||
|
|
||||||
|
POH_TREASURE_CHEST_INVENTORY_CONTAINER(WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID, 0),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final int groupId;
|
private final int groupId;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class KaramjaDiaryRequirement extends GenericDiaryRequirement
|
|||||||
new SkillRequirement(Skill.THIEVING, 50),
|
new SkillRequirement(Skill.THIEVING, 50),
|
||||||
new SkillRequirement(Skill.MINING, 52),
|
new SkillRequirement(Skill.MINING, 52),
|
||||||
new QuestRequirement(Quest.LEGENDS_QUEST));
|
new QuestRequirement(Quest.LEGENDS_QUEST));
|
||||||
add("Use the crossbow short cut south of the volcano.",
|
add("Use the crossbow shortcut south of the volcano.",
|
||||||
new SkillRequirement(Skill.AGILITY, 53),
|
new SkillRequirement(Skill.AGILITY, 53),
|
||||||
new SkillRequirement(Skill.RANGED, 42),
|
new SkillRequirement(Skill.RANGED, 42),
|
||||||
new SkillRequirement(Skill.STRENGTH, 21));
|
new SkillRequirement(Skill.STRENGTH, 21));
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ import net.runelite.client.ui.overlay.OverlayPosition;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
import net.runelite.client.ui.overlay.components.TextComponent;
|
import net.runelite.client.ui.overlay.components.TextComponent;
|
||||||
|
import static net.runelite.client.plugins.cannon.CannonPlugin.MAX_OVERLAY_DISTANCE;
|
||||||
|
|
||||||
class CannonOverlay extends Overlay
|
class CannonOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int MAX_DISTANCE = 2500;
|
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final CannonConfig config;
|
private final CannonConfig config;
|
||||||
private final CannonPlugin plugin;
|
private final CannonPlugin plugin;
|
||||||
@@ -76,7 +75,7 @@ class CannonOverlay extends Overlay
|
|||||||
|
|
||||||
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
||||||
|
|
||||||
if (localLocation.distanceTo(cannonPoint) <= MAX_DISTANCE)
|
if (localLocation.distanceTo(cannonPoint) <= MAX_OVERLAY_DISTANCE)
|
||||||
{
|
{
|
||||||
Point cannonLoc = Perspective.getCanvasTextLocation(client,
|
Point cannonLoc = Perspective.getCanvasTextLocation(client,
|
||||||
graphics,
|
graphics,
|
||||||
|
|||||||
@@ -41,17 +41,21 @@ import net.runelite.api.InventoryID;
|
|||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemContainer;
|
import net.runelite.api.ItemContainer;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.MenuAction;
|
||||||
|
import net.runelite.api.ObjectID;
|
||||||
import static net.runelite.api.ObjectID.CANNON_BASE;
|
import static net.runelite.api.ObjectID.CANNON_BASE;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Projectile;
|
import net.runelite.api.Projectile;
|
||||||
import static net.runelite.api.ProjectileID.CANNONBALL;
|
import static net.runelite.api.ProjectileID.CANNONBALL;
|
||||||
import static net.runelite.api.ProjectileID.GRANITE_CANNONBALL;
|
import static net.runelite.api.ProjectileID.GRANITE_CANNONBALL;
|
||||||
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.api.events.GameObjectSpawned;
|
import net.runelite.api.events.GameObjectSpawned;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
import net.runelite.api.events.ItemContainerChanged;
|
import net.runelite.api.events.ItemContainerChanged;
|
||||||
|
import net.runelite.api.events.MenuOptionClicked;
|
||||||
import net.runelite.api.events.ProjectileMoved;
|
import net.runelite.api.events.ProjectileMoved;
|
||||||
import net.runelite.client.Notifier;
|
import net.runelite.client.Notifier;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
@@ -72,11 +76,14 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
|||||||
public class CannonPlugin extends Plugin
|
public class CannonPlugin extends Plugin
|
||||||
{
|
{
|
||||||
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
||||||
|
static final int MAX_OVERLAY_DISTANCE = 4100;
|
||||||
static final int MAX_CBALLS = 30;
|
static final int MAX_CBALLS = 30;
|
||||||
|
|
||||||
private CannonCounter counter;
|
private CannonCounter counter;
|
||||||
private boolean skipProjectileCheckThisTick;
|
private boolean skipProjectileCheckThisTick;
|
||||||
private boolean cannonBallNotificationSent;
|
private boolean cannonBallNotificationSent;
|
||||||
|
private WorldPoint clickedCannonLocation;
|
||||||
|
private boolean firstCannonLoad;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private int cballsLeft;
|
private int cballsLeft;
|
||||||
@@ -257,6 +264,39 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||||
|
{
|
||||||
|
if (cannonPosition != null || event.getId() != ObjectID.DWARF_MULTICANNON)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if cannonballs are being used on the cannon
|
||||||
|
if (event.getMenuAction() == MenuAction.ITEM_USE_ON_GAME_OBJECT)
|
||||||
|
{
|
||||||
|
final int idx = event.getSelectedItemIndex();
|
||||||
|
final ItemContainer items = client.getItemContainer(InventoryID.INVENTORY);
|
||||||
|
if (items == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final Item item = items.getItem(idx);
|
||||||
|
if (item == null || (item.getId() != ItemID.CANNONBALL && item.getId() != ItemID.GRANITE_CANNONBALL))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Check for the Fire option being selected on the cannon.
|
||||||
|
else if (event.getMenuAction() != MenuAction.GAME_OBJECT_FIRST_OPTION)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the click location as a WorldPoint to avoid issues with scene loads
|
||||||
|
clickedCannonLocation = WorldPoint.fromScene(client, event.getParam0(), event.getParam1(), client.getPlane());
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onProjectileMoved(ProjectileMoved event)
|
public void onProjectileMoved(ProjectileMoved event)
|
||||||
@@ -302,6 +342,7 @@ public class CannonPlugin extends Plugin
|
|||||||
cannonPlaced = true;
|
cannonPlaced = true;
|
||||||
addCounter();
|
addCounter();
|
||||||
cballsLeft = 0;
|
cballsLeft = 0;
|
||||||
|
firstCannonLoad = true;
|
||||||
|
|
||||||
final ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY);
|
final ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY);
|
||||||
if (inventory != null)
|
if (inventory != null)
|
||||||
@@ -320,18 +361,45 @@ public class CannonPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().contains("You pick up the cannon")
|
||||||
if (event.getMessage().contains("You pick up the cannon")
|
|
||||||
|| event.getMessage().contains("Your cannon has decayed. Speak to Nulodion to get a new one!")
|
|| event.getMessage().contains("Your cannon has decayed. Speak to Nulodion to get a new one!")
|
||||||
|| event.getMessage().contains("Your cannon has been destroyed!"))
|
|| event.getMessage().contains("Your cannon has been destroyed!"))
|
||||||
{
|
{
|
||||||
cannonPlaced = false;
|
cannonPlaced = false;
|
||||||
cballsLeft = 0;
|
cballsLeft = 0;
|
||||||
removeCounter();
|
removeCounter();
|
||||||
|
cannonPosition = null;
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().startsWith("You load the cannon with"))
|
||||||
if (event.getMessage().startsWith("You load the cannon with"))
|
|
||||||
{
|
{
|
||||||
|
// Set the cannon's position and object if the player's animation was interrupted during setup
|
||||||
|
if (cannonPosition == null && clickedCannonLocation != null)
|
||||||
|
{
|
||||||
|
// There is a window of 1 tick where the player can add the furnace, click on another cannon, and then
|
||||||
|
// the initial cannon load message arrives. This can cause the client to confuse the other cannon with
|
||||||
|
// the player's, so ignore that first message when deciding the cannon's location.
|
||||||
|
if (firstCannonLoad)
|
||||||
|
{
|
||||||
|
firstCannonLoad = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LocalPoint lp = LocalPoint.fromWorld(client, clickedCannonLocation);
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
GameObject[] objects = client.getScene().getTiles()[client.getPlane()][lp.getSceneX()][lp.getSceneY()].getGameObjects();
|
||||||
|
if (objects.length > 0 && client.getLocalPlayer().getWorldLocation().distanceTo(objects[0].getWorldLocation()) <= 2)
|
||||||
|
{
|
||||||
|
cannonPlaced = true;
|
||||||
|
cannonWorld = client.getWorld();
|
||||||
|
cannon = objects[0];
|
||||||
|
cannonPosition = cannon.getWorldLocation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
clickedCannonLocation = null;
|
||||||
|
}
|
||||||
|
|
||||||
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
||||||
if (m.find())
|
if (m.find())
|
||||||
{
|
{
|
||||||
@@ -368,8 +436,7 @@ public class CannonPlugin extends Plugin
|
|||||||
|
|
||||||
cannonBallNotificationSent = false;
|
cannonBallNotificationSent = false;
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().contains("Your cannon is out of ammo!"))
|
||||||
if (event.getMessage().contains("Your cannon is out of ammo!"))
|
|
||||||
{
|
{
|
||||||
skipProjectileCheckThisTick = true;
|
skipProjectileCheckThisTick = true;
|
||||||
|
|
||||||
@@ -383,8 +450,7 @@ public class CannonPlugin extends Plugin
|
|||||||
notifier.notify("Your cannon is out of ammo!");
|
notifier.notify("Your cannon is out of ammo!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().startsWith("Your cannon contains"))
|
||||||
if (event.getMessage().startsWith("Your cannon contains"))
|
|
||||||
{
|
{
|
||||||
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
||||||
if (m.find())
|
if (m.find())
|
||||||
@@ -392,14 +458,17 @@ public class CannonPlugin extends Plugin
|
|||||||
cballsLeft = Integer.parseInt(m.group());
|
cballsLeft = Integer.parseInt(m.group());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().startsWith("You unload your cannon and receive Cannonball")
|
||||||
if (event.getMessage().startsWith("You unload your cannon and receive Cannonball")
|
|
||||||
|| event.getMessage().startsWith("You unload your cannon and receive Granite cannonball"))
|
|| event.getMessage().startsWith("You unload your cannon and receive Granite cannonball"))
|
||||||
{
|
{
|
||||||
skipProjectileCheckThisTick = true;
|
skipProjectileCheckThisTick = true;
|
||||||
|
|
||||||
cballsLeft = 0;
|
cballsLeft = 0;
|
||||||
}
|
}
|
||||||
|
else if (event.getMessage().equals("This isn't your cannon!") || event.getMessage().equals("This is not your cannon."))
|
||||||
|
{
|
||||||
|
clickedCannonLocation = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|||||||
@@ -43,11 +43,10 @@ import net.runelite.client.game.ItemManager;
|
|||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
import static net.runelite.client.plugins.cannon.CannonPlugin.MAX_OVERLAY_DISTANCE;
|
||||||
|
|
||||||
class CannonSpotOverlay extends Overlay
|
class CannonSpotOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int MAX_DISTANCE = 2350;
|
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final CannonPlugin plugin;
|
private final CannonPlugin plugin;
|
||||||
private final CannonConfig config;
|
private final CannonConfig config;
|
||||||
@@ -87,7 +86,7 @@ class CannonSpotOverlay extends Overlay
|
|||||||
LocalPoint spotPoint = LocalPoint.fromWorld(client, spot);
|
LocalPoint spotPoint = LocalPoint.fromWorld(client, spot);
|
||||||
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
||||||
|
|
||||||
if (spotPoint != null && localLocation.distanceTo(spotPoint) <= MAX_DISTANCE)
|
if (spotPoint != null && localLocation.distanceTo(spotPoint) <= MAX_OVERLAY_DISTANCE)
|
||||||
{
|
{
|
||||||
renderCannonSpot(graphics, client, spotPoint, itemManager.getImage(CANNONBALL), Color.RED);
|
renderCannonSpot(graphics, client, spotPoint, itemManager.getImage(CANNONBALL), Color.RED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ enum CannonSpots
|
|||||||
BLUE_DRAGON(new WorldPoint(1933, 8973, 1)),
|
BLUE_DRAGON(new WorldPoint(1933, 8973, 1)),
|
||||||
BRINE_RAT(new WorldPoint(2707, 10132, 0)),
|
BRINE_RAT(new WorldPoint(2707, 10132, 0)),
|
||||||
CAVE_HORROR(new WorldPoint(3785, 9460, 0)),
|
CAVE_HORROR(new WorldPoint(3785, 9460, 0)),
|
||||||
DAGGANOTH(new WorldPoint(2524, 10020, 0)),
|
DAGGANOTH(new WorldPoint(2524, 10020, 0), new WorldPoint(2478, 10443, 0), new WorldPoint(2420, 10425, 0)),
|
||||||
DARK_BEAST(new WorldPoint(1992, 4655, 0)),
|
DARK_BEAST(new WorldPoint(1992, 4655, 0)),
|
||||||
DARK_WARRIOR(new WorldPoint(3030, 3632, 0)),
|
DARK_WARRIOR(new WorldPoint(3030, 3632, 0)),
|
||||||
DUST_DEVIL(new WorldPoint(3218, 9366, 0)),
|
DUST_DEVIL(new WorldPoint(3218, 9366, 0)),
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ class PluginToggleButton extends JToggleButton
|
|||||||
{
|
{
|
||||||
if (conflicts != null && !conflicts.isEmpty())
|
if (conflicts != null && !conflicts.isEmpty())
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder("<br>Conflicts with ");
|
StringBuilder sb = new StringBuilder("<br>Plugin conflicts: ");
|
||||||
for (int i = 0; i < conflicts.size() - 2; i++)
|
for (int i = 0; i < conflicts.size() - 2; i++)
|
||||||
{
|
{
|
||||||
sb.append(conflicts.get(i));
|
sb.append(conflicts.get(i));
|
||||||
sb.append(", ");
|
sb.append(", ");
|
||||||
}
|
}
|
||||||
if (conflicts.size() > 2)
|
if (conflicts.size() >= 2)
|
||||||
{
|
{
|
||||||
sb.append(conflicts.get(conflicts.size() - 2));
|
sb.append(conflicts.get(conflicts.size() - 2));
|
||||||
sb.append(" and ");
|
sb.append(" and ");
|
||||||
|
|||||||
@@ -254,7 +254,8 @@ public class ExaminePlugin extends Plugin
|
|||||||
|| WidgetID.SEED_VAULT_INVENTORY_GROUP_ID == widgetGroup
|
|| WidgetID.SEED_VAULT_INVENTORY_GROUP_ID == widgetGroup
|
||||||
|| WidgetID.SEED_BOX_GROUP_ID == widgetGroup
|
|| WidgetID.SEED_BOX_GROUP_ID == widgetGroup
|
||||||
|| WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID == widgetGroup
|
|| WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID == widgetGroup
|
||||||
|| WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID == widgetGroup)
|
|| WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID == widgetGroup
|
||||||
|
|| WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID == widgetGroup)
|
||||||
{
|
{
|
||||||
Widget widgetItem = widget.getChild(actionParam);
|
Widget widgetItem = widget.getChild(actionParam);
|
||||||
if (widgetItem != null)
|
if (widgetItem != null)
|
||||||
|
|||||||
@@ -98,4 +98,14 @@ public interface GroundMarkerConfig extends Config
|
|||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "fillOpacity",
|
||||||
|
name = "Fill Opacity",
|
||||||
|
description = "Opacity of the tile fill color"
|
||||||
|
)
|
||||||
|
default int fillOpacity()
|
||||||
|
{
|
||||||
|
return 50;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class GroundMarkerOverlay extends Overlay
|
|||||||
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
||||||
if (poly != null)
|
if (poly != null)
|
||||||
{
|
{
|
||||||
OverlayUtil.renderPolygon(graphics, poly, color, borderStroke);
|
OverlayUtil.renderPolygon(graphics, poly, color, new Color(0, 0, 0, config.fillOpacity()), borderStroke);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Strings.isNullOrEmpty(label))
|
if (!Strings.isNullOrEmpty(label))
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
case PISCARILIUS_CRANE_REPAIR:
|
case PISCARILIUS_CRANE_REPAIR:
|
||||||
case HOME_MAKE_TABLET:
|
case HOME_MAKE_TABLET:
|
||||||
case SAND_COLLECTION:
|
case SAND_COLLECTION:
|
||||||
|
case LOOKING_INTO:
|
||||||
resetTimers();
|
resetTimers();
|
||||||
lastAnimation = animation;
|
lastAnimation = animation;
|
||||||
lastAnimating = Instant.now();
|
lastAnimating = Instant.now();
|
||||||
|
|||||||
@@ -34,23 +34,103 @@ import net.runelite.client.game.SpriteOverride;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
enum HealthbarOverride implements SpriteOverride
|
enum HealthbarOverride implements SpriteOverride
|
||||||
{
|
{
|
||||||
BACK_30PX(HEALTHBAR_DEFAULT_BACK_30PX, "back_30px.png"),
|
// Reusing the 40px image for the 30px bars is intentional,
|
||||||
BACK_50PX(HEALTHBAR_DEFAULT_BACK_50PX, "back_30px.png"),
|
// as a 30px HD bar is way too small and looks very wrong
|
||||||
BACK_60PX(HEALTHBAR_DEFAULT_BACK_60PX, "back_30px.png"),
|
DEFAULT_FRONT_30PX(HEALTHBAR_DEFAULT_FRONT_30PX, "default_front_40px.png"),
|
||||||
BACK_80PX(HEALTHBAR_DEFAULT_BACK_80PX, "back_90px.png"),
|
DEFAULT_FRONT_40PX(HEALTHBAR_DEFAULT_FRONT_40PX, "default_front_40px.png"),
|
||||||
BACK_100PX(HEALTHBAR_DEFAULT_BACK_100PX, "back_90px.png"),
|
DEFAULT_FRONT_50PX(HEALTHBAR_DEFAULT_FRONT_50PX, "default_front_50px.png"),
|
||||||
BACK_120PX(HEALTHBAR_DEFAULT_BACK_120PX, "back_90px.png"),
|
DEFAULT_FRONT_60PX(HEALTHBAR_DEFAULT_FRONT_60PX, "default_front_60px.png"),
|
||||||
BACK_140PX(HEALTHBAR_DEFAULT_BACK_140PX, "back_90px.png"),
|
DEFAULT_FRONT_70PX(HEALTHBAR_DEFAULT_FRONT_70PX, "default_front_70px.png"),
|
||||||
BACK_160PX(HEALTHBAR_DEFAULT_BACK_160PX, "back_90px.png"),
|
DEFAULT_FRONT_80PX(HEALTHBAR_DEFAULT_FRONT_80PX, "default_front_80px.png"),
|
||||||
|
DEFAULT_FRONT_100PX(HEALTHBAR_DEFAULT_FRONT_100PX, "default_front_100px.png"),
|
||||||
|
DEFAULT_FRONT_120PX(HEALTHBAR_DEFAULT_FRONT_120PX, "default_front_120px.png"),
|
||||||
|
DEFAULT_FRONT_140PX(HEALTHBAR_DEFAULT_FRONT_140PX, "default_front_140px.png"),
|
||||||
|
DEFAULT_FRONT_160PX(HEALTHBAR_DEFAULT_FRONT_160PX, "default_front_160px.png"),
|
||||||
|
|
||||||
FRONT_30PX(HEALTHBAR_DEFAULT_FRONT_30PX, "front_30px.png"),
|
DEFAULT_BACK_30PX(HEALTHBAR_DEFAULT_BACK_30PX, "default_back_40px.png"),
|
||||||
FRONT_50PX(HEALTHBAR_DEFAULT_FRONT_50PX, "front_30px.png"),
|
DEFAULT_BACK_40PX(HEALTHBAR_DEFAULT_BACK_40PX, "default_back_40px.png"),
|
||||||
FRONT_60PX(HEALTHBAR_DEFAULT_FRONT_60PX, "front_30px.png"),
|
DEFAULT_BACK_50PX(HEALTHBAR_DEFAULT_BACK_50PX, "default_back_50px.png"),
|
||||||
FRONT_80PX(HEALTHBAR_DEFAULT_FRONT_80PX, "front_90px.png"),
|
DEFAULT_BACK_60PX(HEALTHBAR_DEFAULT_BACK_60PX, "default_back_60px.png"),
|
||||||
FRONT_100PX(HEALTHBAR_DEFAULT_FRONT_100PX, "front_90px.png"),
|
DEFAULT_BACK_70PX(HEALTHBAR_DEFAULT_BACK_70PX, "default_back_70px.png"),
|
||||||
FRONT_120PX(HEALTHBAR_DEFAULT_FRONT_120PX, "front_90px.png"),
|
DEFAULT_BACK_80PX(HEALTHBAR_DEFAULT_BACK_80PX, "default_back_80px.png"),
|
||||||
FRONT_140PX(HEALTHBAR_DEFAULT_FRONT_140PX, "front_90px.png"),
|
DEFAULT_BACK_100PX(HEALTHBAR_DEFAULT_BACK_100PX, "default_back_100px.png"),
|
||||||
FRONT_160PX(HEALTHBAR_DEFAULT_FRONT_160PX, "front_90px.png");
|
DEFAULT_BACK_120PX(HEALTHBAR_DEFAULT_BACK_120PX, "default_back_120px.png"),
|
||||||
|
DEFAULT_BACK_140PX(HEALTHBAR_DEFAULT_BACK_140PX, "default_back_140px.png"),
|
||||||
|
DEFAULT_BACK_160PX(HEALTHBAR_DEFAULT_BACK_160PX, "default_back_160px.png"),
|
||||||
|
|
||||||
|
CYAN_FRONT_30PX(HEALTHBAR_CYAN_FRONT_30PX, "cyan_front_40px.png"),
|
||||||
|
CYAN_FRONT_40PX(HEALTHBAR_CYAN_FRONT_40PX, "cyan_front_40px.png"),
|
||||||
|
CYAN_FRONT_50PX(HEALTHBAR_CYAN_FRONT_50PX, "cyan_front_50px.png"),
|
||||||
|
CYAN_FRONT_60PX(HEALTHBAR_CYAN_FRONT_60PX, "cyan_front_60px.png"),
|
||||||
|
CYAN_FRONT_70PX(HEALTHBAR_CYAN_FRONT_70PX, "cyan_front_70px.png"),
|
||||||
|
CYAN_FRONT_80PX(HEALTHBAR_CYAN_FRONT_80PX, "cyan_front_80px.png"),
|
||||||
|
CYAN_FRONT_100PX(HEALTHBAR_CYAN_FRONT_100PX, "cyan_front_100px.png"),
|
||||||
|
CYAN_FRONT_120PX(HEALTHBAR_CYAN_FRONT_120PX, "cyan_front_120px.png"),
|
||||||
|
CYAN_FRONT_140PX(HEALTHBAR_CYAN_FRONT_140PX, "cyan_front_140px.png"),
|
||||||
|
CYAN_FRONT_160PX(HEALTHBAR_CYAN_FRONT_160PX, "cyan_front_160px.png"),
|
||||||
|
|
||||||
|
CYAN_BACK_30PX(HEALTHBAR_CYAN_BACK_30PX, "cyan_back_40px.png"),
|
||||||
|
CYAN_BACK_40PX(HEALTHBAR_CYAN_BACK_40PX, "cyan_back_40px.png"),
|
||||||
|
CYAN_BACK_50PX(HEALTHBAR_CYAN_BACK_50PX, "cyan_back_50px.png"),
|
||||||
|
CYAN_BACK_60PX(HEALTHBAR_CYAN_BACK_60PX, "cyan_back_60px.png"),
|
||||||
|
CYAN_BACK_70PX(HEALTHBAR_CYAN_BACK_70PX, "cyan_back_70px.png"),
|
||||||
|
CYAN_BACK_80PX(HEALTHBAR_CYAN_BACK_80PX, "cyan_back_80px.png"),
|
||||||
|
CYAN_BACK_100PX(HEALTHBAR_CYAN_BACK_100PX, "cyan_back_100px.png"),
|
||||||
|
CYAN_BACK_120PX(HEALTHBAR_CYAN_BACK_120PX, "cyan_back_120px.png"),
|
||||||
|
CYAN_BACK_140PX(HEALTHBAR_CYAN_BACK_140PX, "cyan_back_140px.png"),
|
||||||
|
CYAN_BACK_160PX(HEALTHBAR_CYAN_BACK_160PX, "cyan_back_160px.png"),
|
||||||
|
|
||||||
|
ORANGE_FRONT_30PX(HEALTHBAR_ORANGE_FRONT_30PX, "orange_front_40px.png"),
|
||||||
|
ORANGE_FRONT_40PX(HEALTHBAR_ORANGE_FRONT_40PX, "orange_front_40px.png"),
|
||||||
|
ORANGE_FRONT_50PX(HEALTHBAR_ORANGE_FRONT_50PX, "orange_front_50px.png"),
|
||||||
|
ORANGE_FRONT_60PX(HEALTHBAR_ORANGE_FRONT_60PX, "orange_front_60px.png"),
|
||||||
|
ORANGE_FRONT_70PX(HEALTHBAR_ORANGE_FRONT_70PX, "orange_front_70px.png"),
|
||||||
|
ORANGE_FRONT_80PX(HEALTHBAR_ORANGE_FRONT_80PX, "orange_front_80px.png"),
|
||||||
|
ORANGE_FRONT_100PX(HEALTHBAR_ORANGE_FRONT_100PX, "orange_front_100px.png"),
|
||||||
|
ORANGE_FRONT_120PX(HEALTHBAR_ORANGE_FRONT_120PX, "orange_front_120px.png"),
|
||||||
|
ORANGE_FRONT_140PX(HEALTHBAR_ORANGE_FRONT_140PX, "orange_front_140px.png"),
|
||||||
|
ORANGE_FRONT_160PX(HEALTHBAR_ORANGE_FRONT_160PX, "orange_front_160px.png"),
|
||||||
|
|
||||||
|
ORANGE_BACK_30PX(HEALTHBAR_ORANGE_BACK_30PX, "orange_back_40px.png"),
|
||||||
|
ORANGE_BACK_40PX(HEALTHBAR_ORANGE_BACK_40PX, "orange_back_40px.png"),
|
||||||
|
ORANGE_BACK_50PX(HEALTHBAR_ORANGE_BACK_50PX, "orange_back_50px.png"),
|
||||||
|
ORANGE_BACK_60PX(HEALTHBAR_ORANGE_BACK_60PX, "orange_back_60px.png"),
|
||||||
|
ORANGE_BACK_70PX(HEALTHBAR_ORANGE_BACK_70PX, "orange_back_70px.png"),
|
||||||
|
ORANGE_BACK_80PX(HEALTHBAR_ORANGE_BACK_80PX, "orange_back_80px.png"),
|
||||||
|
ORANGE_BACK_100PX(HEALTHBAR_ORANGE_BACK_100PX, "orange_back_100px.png"),
|
||||||
|
ORANGE_BACK_120PX(HEALTHBAR_ORANGE_BACK_120PX, "orange_back_120px.png"),
|
||||||
|
ORANGE_BACK_140PX(HEALTHBAR_ORANGE_BACK_140PX, "orange_back_140px.png"),
|
||||||
|
ORANGE_BACK_160PX(HEALTHBAR_ORANGE_BACK_160PX, "orange_back_160px.png"),
|
||||||
|
|
||||||
|
YELLOW_FRONT_30PX(HEALTHBAR_YELLOW_FRONT_30PX, "yellow_front_40px.png"),
|
||||||
|
YELLOW_FRONT_40PX(HEALTHBAR_YELLOW_FRONT_40PX, "yellow_front_40px.png"),
|
||||||
|
YELLOW_FRONT_50PX(HEALTHBAR_YELLOW_FRONT_50PX, "yellow_front_50px.png"),
|
||||||
|
YELLOW_FRONT_60PX(HEALTHBAR_YELLOW_FRONT_60PX, "yellow_front_60px.png"),
|
||||||
|
YELLOW_FRONT_70PX(HEALTHBAR_YELLOW_FRONT_70PX, "yellow_front_70px.png"),
|
||||||
|
YELLOW_FRONT_80PX(HEALTHBAR_YELLOW_FRONT_80PX, "yellow_front_80px.png"),
|
||||||
|
YELLOW_FRONT_100PX(HEALTHBAR_YELLOW_FRONT_100PX, "yellow_front_100px.png"),
|
||||||
|
YELLOW_FRONT_120PX(HEALTHBAR_YELLOW_FRONT_120PX, "yellow_front_120px.png"),
|
||||||
|
YELLOW_FRONT_140PX(HEALTHBAR_YELLOW_FRONT_140PX, "yellow_front_140px.png"),
|
||||||
|
YELLOW_FRONT_160PX(HEALTHBAR_YELLOW_FRONT_160PX, "yellow_front_160px.png"),
|
||||||
|
|
||||||
|
YELLOW_BACK_30PX(HEALTHBAR_YELLOW_BACK_30PX, "yellow_back_40px.png"),
|
||||||
|
YELLOW_BACK_40PX(HEALTHBAR_YELLOW_BACK_40PX, "yellow_back_40px.png"),
|
||||||
|
YELLOW_BACK_50PX(HEALTHBAR_YELLOW_BACK_50PX, "yellow_back_50px.png"),
|
||||||
|
YELLOW_BACK_60PX(HEALTHBAR_YELLOW_BACK_60PX, "yellow_back_60px.png"),
|
||||||
|
YELLOW_BACK_70PX(HEALTHBAR_YELLOW_BACK_70PX, "yellow_back_70px.png"),
|
||||||
|
YELLOW_BACK_80PX(HEALTHBAR_YELLOW_BACK_80PX, "yellow_back_80px.png"),
|
||||||
|
YELLOW_BACK_100PX(HEALTHBAR_YELLOW_BACK_100PX, "yellow_back_100px.png"),
|
||||||
|
YELLOW_BACK_120PX(HEALTHBAR_YELLOW_BACK_120PX, "yellow_back_120px.png"),
|
||||||
|
YELLOW_BACK_140PX(HEALTHBAR_YELLOW_BACK_140PX, "yellow_back_140px.png"),
|
||||||
|
YELLOW_BACK_160PX(HEALTHBAR_YELLOW_BACK_160PX, "yellow_back_160px.png"),
|
||||||
|
|
||||||
|
BLUE_FRONT_50PX(HEALTHBAR_BLUE_FRONT_50PX, "blue_front_50px.png"),
|
||||||
|
BLUE_BACK_50PX(HEALTHBAR_BLUE_BACK_50PX, "blue_back_50px.png"),
|
||||||
|
|
||||||
|
COX_GREEN(HEALTHBAR_COX_GREEN, "cox_green.png"),
|
||||||
|
COX_BLUE(HEALTHBAR_COX_BLUE, "cox_blue.png"),
|
||||||
|
COX_YELLOW(HEALTHBAR_COX_YELLOW, "cox_yellow.png"),
|
||||||
|
COX_RED(HEALTHBAR_COX_RED, "cox_red.png");
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final int spriteId;
|
private final int spriteId;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import java.awt.Image;
|
|||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import static net.runelite.api.widgets.WidgetID.GRAVESTONE_GROUP_ID;
|
||||||
import net.runelite.api.widgets.WidgetItem;
|
import net.runelite.api.widgets.WidgetItem;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.ui.overlay.WidgetItemOverlay;
|
import net.runelite.client.ui.overlay.WidgetItemOverlay;
|
||||||
@@ -53,6 +54,7 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
|
|||||||
this.config = config;
|
this.config = config;
|
||||||
showOnEquipment();
|
showOnEquipment();
|
||||||
showOnInventory();
|
showOnInventory();
|
||||||
|
showOnInterfaces(GRAVESTONE_GROUP_ID);
|
||||||
fillCache = CacheBuilder.newBuilder()
|
fillCache = CacheBuilder.newBuilder()
|
||||||
.concurrencyLevel(1)
|
.concurrencyLevel(1)
|
||||||
.maximumSize(32)
|
.maximumSize(32)
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class ItemPricesOverlay extends Overlay
|
|||||||
private static final int EXPLORERS_RING_ITEM_WIDGETID = WidgetInfo.EXPLORERS_RING_ALCH_INVENTORY.getPackedId();
|
private static final int EXPLORERS_RING_ITEM_WIDGETID = WidgetInfo.EXPLORERS_RING_ALCH_INVENTORY.getPackedId();
|
||||||
private static final int SEED_VAULT_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_ITEM_CONTAINER.getPackedId();
|
private static final int SEED_VAULT_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_ITEM_CONTAINER.getPackedId();
|
||||||
private static final int SEED_VAULT_INVENTORY_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_INVENTORY_ITEMS_CONTAINER.getPackedId();
|
private static final int SEED_VAULT_INVENTORY_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_INVENTORY_ITEMS_CONTAINER.getPackedId();
|
||||||
|
private static final int POH_TREASURE_CHEST_INVENTORY_ITEM_WIDGETID = WidgetInfo.POH_TREASURE_CHEST_INVENTORY_CONTAINER.getPackedId();
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final ItemPricesConfig config;
|
private final ItemPricesConfig config;
|
||||||
@@ -118,6 +119,7 @@ class ItemPricesOverlay extends Overlay
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
case WidgetID.INVENTORY_GROUP_ID:
|
case WidgetID.INVENTORY_GROUP_ID:
|
||||||
|
case WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID:
|
||||||
if (config.hideInventory() && !(config.showWhileAlching() && isAlching))
|
if (config.hideInventory() && !(config.showWhileAlching() && isAlching))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -155,7 +157,8 @@ class ItemPricesOverlay extends Overlay
|
|||||||
if (widgetId == INVENTORY_ITEM_WIDGETID ||
|
if (widgetId == INVENTORY_ITEM_WIDGETID ||
|
||||||
widgetId == BANK_INVENTORY_ITEM_WIDGETID ||
|
widgetId == BANK_INVENTORY_ITEM_WIDGETID ||
|
||||||
widgetId == EXPLORERS_RING_ITEM_WIDGETID ||
|
widgetId == EXPLORERS_RING_ITEM_WIDGETID ||
|
||||||
widgetId == SEED_VAULT_INVENTORY_ITEM_WIDGETID)
|
widgetId == SEED_VAULT_INVENTORY_ITEM_WIDGETID ||
|
||||||
|
widgetId == POH_TREASURE_CHEST_INVENTORY_ITEM_WIDGETID)
|
||||||
{
|
{
|
||||||
container = client.getItemContainer(InventoryID.INVENTORY);
|
container = client.getItemContainer(InventoryID.INVENTORY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,12 +54,17 @@ public class OverlayUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void renderPolygon(Graphics2D graphics, Shape poly, Color color, Stroke borderStroke)
|
public static void renderPolygon(Graphics2D graphics, Shape poly, Color color, Stroke borderStroke)
|
||||||
|
{
|
||||||
|
renderPolygon(graphics, poly, color, new Color(0, 0, 0, 50), borderStroke);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void renderPolygon(Graphics2D graphics, Shape poly, Color color, Color fillColor, Stroke borderStroke)
|
||||||
{
|
{
|
||||||
graphics.setColor(color);
|
graphics.setColor(color);
|
||||||
final Stroke originalStroke = graphics.getStroke();
|
final Stroke originalStroke = graphics.getStroke();
|
||||||
graphics.setStroke(borderStroke);
|
graphics.setStroke(borderStroke);
|
||||||
graphics.draw(poly);
|
graphics.draw(poly);
|
||||||
graphics.setColor(new Color(0, 0, 0, 50));
|
graphics.setColor(fillColor);
|
||||||
graphics.fill(poly);
|
graphics.fill(poly);
|
||||||
graphics.setStroke(originalStroke);
|
graphics.setStroke(originalStroke);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import static net.runelite.api.widgets.WidgetID.GUIDE_PRICES_INVENTORY_GROUP_ID;
|
|||||||
import static net.runelite.api.widgets.WidgetID.INVENTORY_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.INVENTORY_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID;
|
||||||
|
import static net.runelite.api.widgets.WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.SEED_VAULT_INVENTORY_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.SEED_VAULT_INVENTORY_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.SHOP_INVENTORY_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.SHOP_INVENTORY_GROUP_ID;
|
||||||
import net.runelite.api.widgets.WidgetInfo;
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
@@ -127,7 +128,8 @@ public abstract class WidgetItemOverlay extends Overlay
|
|||||||
DUEL_INVENTORY_GROUP_ID,
|
DUEL_INVENTORY_GROUP_ID,
|
||||||
DUEL_INVENTORY_OTHER_GROUP_ID,
|
DUEL_INVENTORY_OTHER_GROUP_ID,
|
||||||
PLAYER_TRADE_SCREEN_GROUP_ID,
|
PLAYER_TRADE_SCREEN_GROUP_ID,
|
||||||
PLAYER_TRADE_INVENTORY_GROUP_ID);
|
PLAYER_TRADE_INVENTORY_GROUP_ID,
|
||||||
|
POH_TREASURE_CHEST_INVENTORY_GROUP_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void showOnBank()
|
protected void showOnBank()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 717 B |
|
After Width: | Height: | Size: 774 B |
|
After Width: | Height: | Size: 768 B |
|
After Width: | Height: | Size: 830 B |
|
After Width: | Height: | Size: 791 B |
|
After Width: | Height: | Size: 769 B |
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 849 B |
|
After Width: | Height: | Size: 663 B |
|
After Width: | Height: | Size: 694 B |
|
After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 759 B |
|
After Width: | Height: | Size: 802 B |
|
After Width: | Height: | Size: 817 B |
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 864 B |
|
After Width: | Height: | Size: 687 B |
|
After Width: | Height: | Size: 702 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 750 B |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 769 B |
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 695 B |
|
After Width: | Height: | Size: 670 B |
|
After Width: | Height: | Size: 705 B |
|
After Width: | Height: | Size: 709 B |
|
After Width: | Height: | Size: 768 B |
|
After Width: | Height: | Size: 803 B |
|
After Width: | Height: | Size: 842 B |
|
After Width: | Height: | Size: 843 B |
|
After Width: | Height: | Size: 683 B |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 710 B |
|
After Width: | Height: | Size: 755 B |
|
After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 799 B |
|
After Width: | Height: | Size: 823 B |
|
After Width: | Height: | Size: 848 B |
|
After Width: | Height: | Size: 871 B |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 731 B |
|
After Width: | Height: | Size: 724 B |
|
After Width: | Height: | Size: 766 B |
|
After Width: | Height: | Size: 781 B |
|
After Width: | Height: | Size: 818 B |
|
After Width: | Height: | Size: 831 B |
|
After Width: | Height: | Size: 868 B |
|
After Width: | Height: | Size: 886 B |
|
After Width: | Height: | Size: 706 B |
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 745 B |
|
After Width: | Height: | Size: 764 B |
|
After Width: | Height: | Size: 790 B |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 768 B |
|
After Width: | Height: | Size: 810 B |
|
After Width: | Height: | Size: 824 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 682 B |
|
After Width: | Height: | Size: 724 B |
|
After Width: | Height: | Size: 749 B |
|
After Width: | Height: | Size: 791 B |
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 846 B |
|
After Width: | Height: | Size: 686 B |
|
After Width: | Height: | Size: 698 B |
|
After Width: | Height: | Size: 712 B |
|
After Width: | Height: | Size: 751 B |