Cannon tracking and Box rework by Owain

This commit is contained in:
Dyldozer
2019-12-19 01:59:09 -06:00
parent 49811653a6
commit c95e40d598
10 changed files with 1064 additions and 308 deletions

View File

@@ -340,6 +340,7 @@ public final class AnimationID
public static final int BARRAGE_ANIMATION = 1979;
public static final int BLITZ_ANIMATION = 1978;
public static final int CHIN_ANIMATION = 7618;
public static final int SCYTHE_OF_VITUR_ANIMATION = 8056;
// Gauntlet Hunleff
public static final int HUNLEFF_TRAMPLE = 8420;

View File

@@ -24,15 +24,23 @@
*/
package net.runelite.api.events;
import javax.annotation.Nullable;
import lombok.Value;
/**
* an event posted when a cannonball is fired
*/
public class CannonballFired implements Event
@Value
public class CannonChanged implements Event
{
public static final CannonballFired INSTANCE = new CannonballFired();
/**
* The projectile id.
*/
@Nullable
private final Integer cannonballId;
private CannonballFired()
{
// noop
}
/**
* The amount of cannonballs left.
*/
private final int cannonballs;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2019, Davis Cook <https://github.com/daviscook477>
* 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 javax.annotation.Nullable;
import lombok.Value;
import net.runelite.api.GameObject;
import net.runelite.api.coords.WorldPoint;
/**
* an event posted when a cannonball is fired
*/
@Value
public class CannonPlaced implements Event
{
/**
* Cannon placed or picked up.
*/
private final boolean placed;
/**
* The location of the cannon.
*/
@Nullable
private final WorldPoint cannonLocation;
/**
* The cannon object.
*/
@Nullable
private final GameObject cannon;
}