Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -204,6 +204,7 @@ public final class AnimationID
|
||||
public static final int LEAGUE_HOME_TELEPORT_4 = 8803;
|
||||
public static final int LEAGUE_HOME_TELEPORT_5 = 8805;
|
||||
public static final int LEAGUE_HOME_TELEPORT_6 = 8807;
|
||||
public static final int RAID_LIGHT_ANIMATION = 3101;
|
||||
|
||||
public static final int CONSTRUCTION = 3676;
|
||||
public static final int CONSTRUCTION_IMCANDO = 8912;
|
||||
|
||||
@@ -1078,6 +1078,35 @@ public interface Client extends GameEngine
|
||||
*/
|
||||
List<GraphicsObject> getGraphicsObjects();
|
||||
|
||||
/**
|
||||
* Creates a RuneLiteObject, which is a modified {@link GraphicsObject}
|
||||
*/
|
||||
RuneLiteObject createRuneLiteObject();
|
||||
|
||||
/**
|
||||
* Loads a model from the cache
|
||||
*
|
||||
* @param id the ID of the model
|
||||
*/
|
||||
Model loadModel(int id);
|
||||
|
||||
/**
|
||||
* Loads a model from the cache and also recolors it
|
||||
*
|
||||
* @param id the ID of the model
|
||||
* @param colorToFind array of hsl color values to find in the model to replace
|
||||
* @param colorToReplace array of hsl color values to replace in the model
|
||||
*/
|
||||
Model loadModel(int id, short[] colorToFind, short[] colorToReplace);
|
||||
|
||||
/**
|
||||
* Loads an animation from the cache
|
||||
*
|
||||
* @param id the ID of the animation. Any int is allowed, but implementations in the client
|
||||
* should be defined in {@link AnimationID}
|
||||
*/
|
||||
Sequence loadAnimation(int id);
|
||||
|
||||
/**
|
||||
* Gets the music volume
|
||||
* @return volume 0-255 inclusive
|
||||
|
||||
@@ -11988,5 +11988,39 @@ public final class ItemID
|
||||
public static final int BOW_OF_FAERDHINEN_C_25892 = 25892;
|
||||
public static final int BOW_OF_FAERDHINEN_C_25894 = 25894;
|
||||
public static final int BOW_OF_FAERDHINEN_C_25896 = 25896;
|
||||
public static final int TZTOK_SLAYER_HELMET = 25898;
|
||||
public static final int TZTOK_SLAYER_HELMET_I = 25900;
|
||||
public static final int TZTOK_SLAYER_HELMET_I_25902 = 25902;
|
||||
public static final int VAMPYRIC_SLAYER_HELMET = 25904;
|
||||
public static final int VAMPYRIC_SLAYER_HELMET_I = 25906;
|
||||
public static final int VAMPYRIC_SLAYER_HELMET_I_25908 = 25908;
|
||||
public static final int TZKAL_SLAYER_HELMET = 25910;
|
||||
public static final int TZKAL_SLAYER_HELMET_I = 25912;
|
||||
public static final int TZKAL_SLAYER_HELMET_I_25914 = 25914;
|
||||
public static final int DRAGON_HUNTER_CROSSBOW_T = 25916;
|
||||
public static final int DRAGON_HUNTER_CROSSBOW_B = 25918;
|
||||
public static final int ANTIQUE_LAMP_25920 = 25920;
|
||||
public static final int ANTIQUE_LAMP_25921 = 25921;
|
||||
public static final int ANTIQUE_LAMP_25922 = 25922;
|
||||
public static final int ANTIQUE_LAMP_25923 = 25923;
|
||||
public static final int ANTIQUE_LAMP_25924 = 25924;
|
||||
public static final int ANTIQUE_LAMP_25925 = 25925;
|
||||
public static final int GHOMMALS_HILT_1 = 25926;
|
||||
public static final int GHOMMALS_HILT_2 = 25928;
|
||||
public static final int GHOMMALS_HILT_3 = 25930;
|
||||
public static final int GHOMMALS_HILT_4 = 25932;
|
||||
public static final int GHOMMALS_HILT_5 = 25934;
|
||||
public static final int GHOMMALS_HILT_6 = 25936;
|
||||
public static final int ANIM_OFFHAND = 25938;
|
||||
public static final int ANIM_OFFHAND_25941 = 25941;
|
||||
public static final int ANIM_OFFHAND_25944 = 25944;
|
||||
public static final int ANIM_OFFHAND_25947 = 25947;
|
||||
public static final int ANIM_OFFHAND_25950 = 25950;
|
||||
public static final int ANIM_OFFHAND_25953 = 25953;
|
||||
public static final int COMBAT_ACHIEVEMENTS = 25956;
|
||||
public static final int CORRUPTED_PADDLEFISH = 25958;
|
||||
public static final int CORRUPTED_ESCAPE_CRYSTAL = 25959;
|
||||
public static final int CRYSTAL_PADDLEFISH = 25960;
|
||||
public static final int ESCAPE_CRYSTAL = 25961;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Abex
|
||||
* 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;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
public final class JagexColor
|
||||
{
|
||||
public static short packHSL(int hue, int saturation, int luminance)
|
||||
{
|
||||
return (short) ((short) (hue & 63) << 10
|
||||
| (short) (saturation & 7) << 7
|
||||
| (short) (luminance & 127));
|
||||
}
|
||||
|
||||
public static short rgbToHSL(int rgb, double brightness)
|
||||
{
|
||||
if (rgb == 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
brightness = 1.D / brightness;
|
||||
|
||||
double r = (double) (rgb >> 16 & 255) / 256.0D;
|
||||
double g = (double) (rgb >> 8 & 255) / 256.0D;
|
||||
double b = (double) (rgb & 255) / 256.0D;
|
||||
|
||||
r = Math.pow(r, brightness);
|
||||
g = Math.pow(g, brightness);
|
||||
b = Math.pow(b, brightness);
|
||||
|
||||
float[] hsv = Color.RGBtoHSB((int) (r * 256.D), (int) (g * 256.D), (int) (b * 256.D), null);
|
||||
double hue = hsv[0];
|
||||
double luminance = hsv[2] - ((hsv[2] * hsv[1]) / 2.F);
|
||||
double saturation = (hsv[2] - luminance) / Math.min(luminance, 1 - luminance);
|
||||
|
||||
return packHSL((int) (Math.ceil(hue * 64.D) % 63.D),
|
||||
(int) Math.ceil(saturation * 7.D),
|
||||
(int) Math.ceil(luminance * 127.D));
|
||||
}
|
||||
}
|
||||
@@ -9425,5 +9425,6 @@ public final class NpcID
|
||||
public static final int SRARACHA_11158 = 11158;
|
||||
public static final int SRARACHA_11159 = 11159;
|
||||
public static final int SRARACHA_11160 = 11160;
|
||||
public static final int DUSTY_ALIV = 11161;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -13699,5 +13699,35 @@ public final class NullItemID
|
||||
public static final int NULL_25893 = 25893;
|
||||
public static final int NULL_25895 = 25895;
|
||||
public static final int NULL_25897 = 25897;
|
||||
public static final int NULL_25899 = 25899;
|
||||
public static final int NULL_25901 = 25901;
|
||||
public static final int NULL_25903 = 25903;
|
||||
public static final int NULL_25905 = 25905;
|
||||
public static final int NULL_25907 = 25907;
|
||||
public static final int NULL_25909 = 25909;
|
||||
public static final int NULL_25911 = 25911;
|
||||
public static final int NULL_25913 = 25913;
|
||||
public static final int NULL_25915 = 25915;
|
||||
public static final int NULL_25917 = 25917;
|
||||
public static final int NULL_25919 = 25919;
|
||||
public static final int NULL_25927 = 25927;
|
||||
public static final int NULL_25929 = 25929;
|
||||
public static final int NULL_25931 = 25931;
|
||||
public static final int NULL_25933 = 25933;
|
||||
public static final int NULL_25935 = 25935;
|
||||
public static final int NULL_25937 = 25937;
|
||||
public static final int NULL_25939 = 25939;
|
||||
public static final int NULL_25940 = 25940;
|
||||
public static final int NULL_25942 = 25942;
|
||||
public static final int NULL_25943 = 25943;
|
||||
public static final int NULL_25945 = 25945;
|
||||
public static final int NULL_25946 = 25946;
|
||||
public static final int NULL_25948 = 25948;
|
||||
public static final int NULL_25949 = 25949;
|
||||
public static final int NULL_25951 = 25951;
|
||||
public static final int NULL_25952 = 25952;
|
||||
public static final int NULL_25954 = 25954;
|
||||
public static final int NULL_25955 = 25955;
|
||||
public static final int NULL_25957 = 25957;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -20726,5 +20726,24 @@ public final class NullObjectID
|
||||
public static final int NULL_42484 = 42484;
|
||||
public static final int NULL_42485 = 42485;
|
||||
public static final int NULL_42486 = 42486;
|
||||
public static final int NULL_42488 = 42488;
|
||||
public static final int NULL_42489 = 42489;
|
||||
public static final int NULL_42490 = 42490;
|
||||
public static final int NULL_42491 = 42491;
|
||||
public static final int NULL_42492 = 42492;
|
||||
public static final int NULL_42493 = 42493;
|
||||
public static final int NULL_42494 = 42494;
|
||||
public static final int NULL_42495 = 42495;
|
||||
public static final int NULL_42496 = 42496;
|
||||
public static final int NULL_42497 = 42497;
|
||||
public static final int NULL_42498 = 42498;
|
||||
public static final int NULL_42499 = 42499;
|
||||
public static final int NULL_42500 = 42500;
|
||||
public static final int NULL_42501 = 42501;
|
||||
public static final int NULL_42502 = 42502;
|
||||
public static final int NULL_42503 = 42503;
|
||||
public static final int NULL_42504 = 42504;
|
||||
public static final int NULL_42505 = 42505;
|
||||
public static final int NULL_42514 = 42514;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -21747,5 +21747,13 @@ public final class ObjectID
|
||||
public static final int YEW_42427 = 42427;
|
||||
public static final int GRANDFATHER_CLOCK_42428 = 42428;
|
||||
public static final int LADDER_42487 = 42487;
|
||||
public static final int TUNNEL_42506 = 42506;
|
||||
public static final int TUNNEL_42507 = 42507;
|
||||
public static final int ROCKS_42508 = 42508;
|
||||
public static final int ROCKS_42509 = 42509;
|
||||
public static final int ROCKS_42510 = 42510;
|
||||
public static final int ROCKS_42511 = 42511;
|
||||
public static final int ROCKS_42512 = 42512;
|
||||
public static final int ROCKS_42513 = 42513;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Trevor <https://github.com/Trevor159>
|
||||
* Copyright (c) 2021 Abex
|
||||
* 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;
|
||||
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
|
||||
/**
|
||||
* Represents a modified {@link GraphicsObject}
|
||||
*/
|
||||
public interface RuneLiteObject extends GraphicsObject
|
||||
{
|
||||
/**
|
||||
* Sets the model of the RuneLiteObject
|
||||
*/
|
||||
void setModel(Model model);
|
||||
|
||||
/**
|
||||
* Sets the animation of the RuneLiteObject
|
||||
* If animation is null model will be static
|
||||
*/
|
||||
void setAnimation(Sequence animation);
|
||||
|
||||
/**
|
||||
* Sets whether the animation of the RuneLiteObject should loop when the animation ends.
|
||||
* If this is false the object will despawn when the animation ends.
|
||||
* Does nothing if the animation is null.
|
||||
*/
|
||||
void setShouldLoop(boolean shouldLoop);
|
||||
|
||||
/**
|
||||
* Sets the location in the scene for the RuneLiteObject
|
||||
*/
|
||||
void setLocation(LocalPoint point, int plane);
|
||||
|
||||
/**
|
||||
* Sets the state of the RuneLiteObject
|
||||
* Set to true to spawn the object
|
||||
* Set to false to despawn the object
|
||||
*/
|
||||
void setActive(boolean active);
|
||||
|
||||
/**
|
||||
* Gets the state of the RuneLiteObject
|
||||
*
|
||||
* @return true if the RuneLiteObject is added to the scene
|
||||
*/
|
||||
boolean isActive();
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Trevor <https://github.com/Trevor159>
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Represents an animation of a renderable
|
||||
*/
|
||||
public interface Sequence
|
||||
{
|
||||
}
|
||||
@@ -324,7 +324,7 @@ public enum Varbits
|
||||
*/
|
||||
FIRE_PIT_GIANT_MOLE(6532),
|
||||
FIRE_PIT_LUMBRIDGE_SWAMP(6533),
|
||||
FIRE_PIT_MOS_LE_HARMLESS(6544),
|
||||
FIRE_PIT_MOS_LE_HARMLESS(6534),
|
||||
|
||||
/**
|
||||
* Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating
|
||||
|
||||
@@ -153,6 +153,7 @@ public class WidgetID
|
||||
public static final int LMS_GROUP_ID = 333;
|
||||
public static final int LMS_INGAME_GROUP_ID = 328;
|
||||
public static final int ADVENTURE_LOG_ID = 187;
|
||||
public static final int COLLECTION_LOG_ID = 621;
|
||||
public static final int GENERIC_SCROLL_GROUP_ID = 625;
|
||||
public static final int GAUNTLET_TIMER_GROUP_ID = 637;
|
||||
public static final int HALLOWED_SEPULCHRE_TIMER_GROUP_ID = 668;
|
||||
@@ -958,6 +959,15 @@ public class WidgetID
|
||||
static final int CONTAINER = 0;
|
||||
}
|
||||
|
||||
static class CollectionLog
|
||||
{
|
||||
static final int CONTAINER = 0;
|
||||
static final int TABS = 3;
|
||||
static final int ENTRY = 17;
|
||||
static final int ENTRY_HEADER = 19;
|
||||
static final int ENTRY_ITEMS = 36;
|
||||
}
|
||||
|
||||
static class GenericScroll
|
||||
{
|
||||
static final int TEXT = 7;
|
||||
|
||||
@@ -482,6 +482,13 @@ public enum WidgetInfo
|
||||
|
||||
ADVENTURE_LOG(WidgetID.ADVENTURE_LOG_ID, WidgetID.AdventureLog.CONTAINER),
|
||||
|
||||
COLLECTION_LOG(WidgetID.COLLECTION_LOG_ID, WidgetID.CollectionLog.CONTAINER),
|
||||
|
||||
COLLECTION_LOG_TABS(WidgetID.COLLECTION_LOG_ID, WidgetID.CollectionLog.TABS),
|
||||
COLLECTION_LOG_ENTRY(WidgetID.COLLECTION_LOG_ID, WidgetID.CollectionLog.ENTRY),
|
||||
COLLECTION_LOG_ENTRY_HEADER(WidgetID.COLLECTION_LOG_ID, WidgetID.CollectionLog.ENTRY_HEADER),
|
||||
COLLECTION_LOG_ENTRY_ITEMS(WidgetID.COLLECTION_LOG_ID, WidgetID.CollectionLog.ENTRY_ITEMS),
|
||||
|
||||
GENERIC_SCROLL_TEXT(WidgetID.GENERIC_SCROLL_GROUP_ID, WidgetID.GenericScroll.TEXT),
|
||||
|
||||
WORLD_SWITCHER_LIST(WidgetID.WORLD_SWITCHER_GROUP_ID, WidgetID.WorldSwitcher.WORLD_LIST),
|
||||
|
||||
Reference in New Issue
Block a user