Add granite cannonball support to plugin

This commit is contained in:
Kamiel
2018-01-27 13:19:18 +01:00
parent fdbd4237b9
commit 7c2d64d76b
2 changed files with 3 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ package net.runelite.api;
public class ProjectileID
{
public static final int CANNONBALL = 53;
public static final int GRANITE_CANNONBALL = 1443;
public static final int LIZARDMAN_SHAMAN_AOE = 1293;
public static final int CRAZY_ARCHAEOLOGIST_AOE = 1260;

View File

@@ -39,6 +39,7 @@ import net.runelite.api.Perspective;
import net.runelite.api.Player;
import net.runelite.api.Projectile;
import static net.runelite.api.ProjectileID.CANNONBALL;
import static net.runelite.api.ProjectileID.GRANITE_CANNONBALL;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.GameObjectsChanged;
import net.runelite.api.events.ProjectileMoved;
@@ -113,7 +114,7 @@ public class CannonPlugin extends Plugin
{
Projectile projectile = event.getProjectile();
if (projectile.getId() == CANNONBALL && myCannon != null)
if ((projectile.getId() == CANNONBALL || projectile.getId() == GRANITE_CANNONBALL) && myCannon != null)
{
net.runelite.api.Point projectileLoc = Perspective.localToWorld(client, new net.runelite.api.Point(projectile.getX1(), projectile.getY1()));