Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -1246,6 +1246,17 @@ public interface Client extends OAuthApi, GameEngine
|
||||
*/
|
||||
void setMusicVolume(int volume);
|
||||
|
||||
/**
|
||||
* @return true if the current {@link #getMusicCurrentTrackId()} is a Jingle, otherwise its a Track
|
||||
*/
|
||||
boolean isPlayingJingle();
|
||||
|
||||
/**
|
||||
* @return Currently playing music/jingle id, or -1 if not playing
|
||||
* @see #isPlayingJingle()
|
||||
*/
|
||||
int getMusicCurrentTrackId();
|
||||
|
||||
/**
|
||||
* Play a sound effect at the player's current location. This is how UI,
|
||||
* and player-generated (e.g. mining, woodcutting) sound effects are
|
||||
@@ -2111,6 +2122,12 @@ public interface Client extends OAuthApi, GameEngine
|
||||
*/
|
||||
NodeCache getItemCompositionCache();
|
||||
|
||||
/**
|
||||
* Returns client object composition cache
|
||||
* @return
|
||||
*/
|
||||
NodeCache getObjectCompositionCache();
|
||||
|
||||
/**
|
||||
* Returns the array of cross sprites that appear and animate when left-clicking
|
||||
*/
|
||||
|
||||
@@ -56,12 +56,26 @@ public interface ObjectComposition extends ParamHolder
|
||||
*/
|
||||
int getMapSceneId();
|
||||
|
||||
/**
|
||||
* Set the map scene index into the {@link Client#getMapScene()}
|
||||
* array, or -1 if it has no map scene icon
|
||||
* @param mapSceneId
|
||||
*/
|
||||
void setMapSceneId(int mapSceneId);
|
||||
|
||||
/**
|
||||
* Gets the index of this object in the {@link Client#getMapIcons()}
|
||||
* array, or -1 if it has no full map icon
|
||||
*/
|
||||
int getMapIconId();
|
||||
|
||||
/**
|
||||
* Set the index of the object in the {@link Client#getMapIcons()}
|
||||
* array, or -1 if it has no map icon
|
||||
* @param mapIconId
|
||||
*/
|
||||
void setMapIconId(int mapIconId);
|
||||
|
||||
/**
|
||||
* Get the {@link ObjectID}s of objects this can transform into, depending
|
||||
* on a {@link Varbits} or {@link VarPlayer}
|
||||
|
||||
@@ -747,19 +747,13 @@ public class Perspective
|
||||
|
||||
private static SimplePolygon calculateAABB(Client client, Model m, int jauOrient, int x, int y, int z)
|
||||
{
|
||||
int ex = m.getExtremeX();
|
||||
if (ex == -1)
|
||||
{
|
||||
// dynamic models don't get stored when they render where this normally happens
|
||||
m.calculateBoundsCylinder();
|
||||
m.calculateExtreme(0);
|
||||
ex = m.getExtremeX();
|
||||
}
|
||||
m.calculateExtreme(jauOrient);
|
||||
|
||||
int x1 = m.getCenterX();
|
||||
int y1 = m.getCenterZ();
|
||||
int z1 = m.getCenterY();
|
||||
|
||||
int ex = m.getExtremeX();
|
||||
int ey = m.getExtremeZ();
|
||||
int ez = m.getExtremeY();
|
||||
|
||||
@@ -787,7 +781,7 @@ public class Perspective
|
||||
int[] x2d = new int[8];
|
||||
int[] y2d = new int[8];
|
||||
|
||||
modelToCanvas(client, 8, x, y, z, jauOrient, xa, ya, za, x2d, y2d);
|
||||
modelToCanvasCpu(client, 8, x, y, z, 0, xa, ya, za, x2d, y2d);
|
||||
|
||||
return Jarvis.convexHull(x2d, y2d);
|
||||
}
|
||||
@@ -798,7 +792,7 @@ public class Perspective
|
||||
int[] y2d = new int[m.getVerticesCount()];
|
||||
final int[] faceColors3 = m.getFaceColors3();
|
||||
|
||||
Perspective.modelToCanvas(client,
|
||||
Perspective.modelToCanvasCpu(client,
|
||||
m.getVerticesCount(),
|
||||
x, y, z,
|
||||
jauOrient,
|
||||
|
||||
@@ -89,7 +89,7 @@ public final class SpriteID
|
||||
public static final int SPELL_ENFEEBLE = 57;
|
||||
public static final int SPELL_STUN = 58;
|
||||
public static final int SPELL_FLAMES_OF_ZAMORAK = 59;
|
||||
public static final int SPELL_CLAWS_OF_GUTHIC = 60;
|
||||
public static final int SPELL_CLAWS_OF_GUTHIX = 60;
|
||||
public static final int SPELL_SARADOMIN_STRIKE = 61;
|
||||
public static final int UNUSED_SPELL_CALL_ANIMAL = 62;
|
||||
public static final int UNUSED_SPELL_RAISE_SKELETON = 63;
|
||||
@@ -139,7 +139,7 @@ public final class SpriteID
|
||||
public static final int SPELL_ENFEEBLE_DISABLED = 107;
|
||||
public static final int SPELL_STUN_DISABLED = 108;
|
||||
public static final int SPELL_FLAMES_OF_ZAMORAK_DISABLED = 109;
|
||||
public static final int SPELL_CLAWS_OF_GUTHIC_DISABLED = 110;
|
||||
public static final int SPELL_CLAWS_OF_GUTHIX_DISABLED = 110;
|
||||
public static final int SPELL_SARADOMIN_STRIKE_DISABLED = 111;
|
||||
public static final int UNUSED_SPELL_CALL_ANIMAL_DISABLED = 112;
|
||||
public static final int UNUSED_SPELL_RAISE_SKELETON_DISABLED = 113;
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Value;
|
||||
import net.runelite.api.ItemComposition;
|
||||
|
||||
/**
|
||||
* An event called after a new {@link ItemComposition} is created and
|
||||
* its data is initialized.
|
||||
*/
|
||||
@Data
|
||||
@Value
|
||||
public class PostItemComposition
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2022, Adam <Adam@sigterm.info>
|
||||
* 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.ObjectComposition;
|
||||
|
||||
/**
|
||||
* An event called after a new {@link ObjectComposition} is created and
|
||||
* its data is initialized.
|
||||
*/
|
||||
@Value
|
||||
public class PostObjectComposition
|
||||
{
|
||||
/**
|
||||
* The newly created object
|
||||
*/
|
||||
ObjectComposition objectComposition;
|
||||
}
|
||||
@@ -856,6 +856,7 @@ public final class WidgetID
|
||||
static class LunarSpellBook
|
||||
{
|
||||
static final int LUNAR_HOME_TELEPORT = 101;
|
||||
static final int FERTILE_SOIL = 126;
|
||||
}
|
||||
|
||||
static class ArceuusSpellBook
|
||||
|
||||
@@ -507,6 +507,7 @@ public enum WidgetInfo
|
||||
SPELL_ARCEUUS_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.ArceuusSpellBook.ARCEUUS_HOME_TELEPORT),
|
||||
SPELL_KOUREND_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.StandardSpellBook.KOUREND_HOME_TELEPORT),
|
||||
SPELL_CATHERBY_HOME_TELEPORT(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.StandardSpellBook.CATHERBY_HOME_TELEPORT),
|
||||
SPELL_LUNAR_FERTILE_SOIL(WidgetID.SPELLBOOK_GROUP_ID, WidgetID.LunarSpellBook.FERTILE_SOIL),
|
||||
|
||||
PVP_WILDERNESS_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.WILDERNESS_SKULL_CONTAINER),
|
||||
PVP_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL_CONTAINER),
|
||||
|
||||
Reference in New Issue
Block a user