Merge remote-tracking branch 'upstream/master' into 2310-merge

This commit is contained in:
Owain van Brakel
2019-10-28 09:44:51 +01:00
108 changed files with 5789 additions and 2073 deletions

View File

@@ -64,8 +64,11 @@ public interface Actor extends Entity, Locatable
* </ul>
*
* @return the actor, null if no interaction is occurring
*
* (getRSInteracting returns the npc/player index, useful for menus)
*/
Actor getInteracting();
int getRSInteracting();
/**
* Gets the health ratio of the actor.

View File

@@ -98,6 +98,15 @@ public final class AnimationID
public static final int FISHING_DRAGON_HARPOON = 7401;
public static final int FISHING_INFERNAL_HARPOON = 7402;
public static final int FISHING_CRYSTAL_HARPOON = 8336;
public static final int CRYSTALLINE_RAT_DEATH = 8334;
public static final int CRYSTALLINE_BAT_DEATH = 4917;
public static final int CRYSTALLINE_WOLF_DEATH = 8335;
public static final int CRYSTALLINE_SPIDER_DEATH = 8338;
public static final int CRYSTALLINE_UNICORN_DEATH = 6377;
public static final int CRYSTALLINE_DRAGON_DEATH = 92;
public static final int CRYSTALLINE_BEAR_DEATH = 4929;
public static final int CRYSTALLINE_DARK_BEAST_DEATH = 2733;
public static final int CORRUPTED_SCORPION_DEATH = 6256;
public static final int FISHING_OILY_ROD = 622;
public static final int FISHING_KARAMBWAN = 1193;
public static final int FISHING_CRUSHING_INFERNAL_EELS = 7553;
@@ -273,6 +282,7 @@ public final class AnimationID
// INFERNO animations
public static final int JAL_NIB = 7574;
public static final int JAL_MEJRAH = 7578;
public static final int JAL_MEJRAH_STAND = 7577;
public static final int JAL_AK_RANGE_ATTACK = 7581;
public static final int JAL_AK_MELEE_ATTACK = 7582;
public static final int JAL_AK_MAGIC_ATTACK = 7583;

View File

@@ -341,9 +341,12 @@ public interface Client extends GameShell
* Gets the logged in player instance.
*
* @return the logged in player
*
* (getLocalPlayerIndex returns the local index, useful for menus/interacting)
*/
@Nullable
Player getLocalPlayer();
int getLocalPlayerIndex();
/**
* Gets the item composition corresponding to an items ID.

View File

@@ -12,6 +12,11 @@ public interface ItemDefinition
*/
String getName();
/**
* Sets the items name.
*/
void setName(String name);
/**
* Gets the items ID.
*
@@ -86,6 +91,7 @@ public interface ItemDefinition
* Returns whether or not the item can be sold on the grand exchange.
*/
boolean isTradeable();
void setTradeable(boolean yes);
/**
* Gets an array of possible right-click menu actions the item
@@ -114,4 +120,11 @@ public interface ItemDefinition
* default value.
*/
void resetShiftClickActionIndex();
/**
* With this you can make certain (ground) items look like different ones.
*
* @param id The itemID of the item with desired model
*/
void setModelOverride(int id);
}

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.api;
import net.runelite.api.coords.WorldPoint;
/**
* Represents the entire 3D scene
*/
@@ -36,6 +38,16 @@ public interface Scene
*/
Tile[][][] getTiles();
/**
* Adds an item to the scene
*/
void addItem(int id, int quantity, WorldPoint point);
/**
* Removes an item from the scene
*/
void removeItem(int id, int quantity, WorldPoint point);
int getDrawDistance();
void setDrawDistance(int drawDistance);
}

View File

@@ -24,6 +24,7 @@
*/
package net.runelite.api.events;
import java.util.Iterator;
import lombok.AccessLevel;
import lombok.Setter;
import net.runelite.api.MenuEntry;
@@ -33,7 +34,7 @@ import lombok.Data;
* An event where a menu has been opened.
*/
@Data
public class MenuOpened implements Event
public class MenuOpened implements Event, Iterable<MenuEntry>
{
/**
* This should be set to true if anything about the menu
@@ -70,4 +71,25 @@ public class MenuOpened implements Event
{
this.modified = true;
}
@Override
public Iterator<MenuEntry> iterator()
{
return new Iterator<MenuEntry>()
{
int index = 0;
@Override
public boolean hasNext()
{
return index < menuEntries.length;
}
@Override
public MenuEntry next()
{
return menuEntries[index++];
}
};
}
}