Merge remote-tracking branch 'runelite/master'

This commit is contained in:
Owain van Brakel
2022-05-11 13:32:19 +02:00
17 changed files with 89 additions and 137 deletions
@@ -37,12 +37,20 @@ public class NpcDefinition
public int[] models;
public int[] chatheadModels;
public int standingAnimation = -1;
public int rotateLeftAnimation = -1;
public int rotateRightAnimation = -1;
public int idleRotateLeftAnimation = -1;
public int idleRotateRightAnimation = -1;
public int walkingAnimation = -1;
public int rotate180Animation = -1;
public int rotate90RightAnimation = -1;
public int rotate90LeftAnimation = -1;
public int rotateLeftAnimation = -1;
public int rotateRightAnimation = -1;
public int runAnimation = -1;
public int runRotate180Animation = -1;
public int runRotateLeftAnimation = -1;
public int runRotateRightAnimation = -1;
public int crawlAnimation = -1;
public int crawlRotate180Animation = -1;
public int crawlRotateLeftAnimation = -1;
public int crawlRotateRightAnimation = -1;
public short[] recolorToFind;
public short[] recolorToReplace;
public short[] retextureToFind;
@@ -85,18 +85,18 @@ public class NpcLoader
}
else if (opcode == 15)
{
def.rotateLeftAnimation = stream.readUnsignedShort();
def.idleRotateLeftAnimation = stream.readUnsignedShort();
}
else if (opcode == 16)
{
def.rotateRightAnimation = stream.readUnsignedShort();
def.idleRotateRightAnimation = stream.readUnsignedShort();
}
else if (opcode == 17)
{
def.walkingAnimation = stream.readUnsignedShort();
def.rotate180Animation = stream.readUnsignedShort();
def.rotate90RightAnimation = stream.readUnsignedShort();
def.rotate90LeftAnimation = stream.readUnsignedShort();
def.rotateLeftAnimation = stream.readUnsignedShort();
def.rotateRightAnimation = stream.readUnsignedShort();
}
else if (opcode == 18)
{
@@ -224,6 +224,28 @@ public class NpcLoader
{
def.isPet = true;
}
else if (opcode == 114)
{
def.runAnimation = stream.readUnsignedShort();
}
else if (opcode == 115)
{
def.runAnimation = stream.readUnsignedShort();
def.runRotate180Animation = stream.readUnsignedShort();
def.runRotateLeftAnimation = stream.readUnsignedShort();
def.runRotateRightAnimation = stream.readUnsignedShort();
}
else if (opcode == 116)
{
def.crawlAnimation = stream.readUnsignedShort();
}
else if (opcode == 117)
{
def.crawlAnimation = stream.readUnsignedShort();
def.crawlRotate180Animation = stream.readUnsignedShort();
def.crawlRotateLeftAnimation = stream.readUnsignedShort();
def.crawlRotateRightAnimation = stream.readUnsignedShort();
}
else if (opcode == 118)
{
def.varbitId = stream.readUnsignedShort();
@@ -62,23 +62,23 @@ public class NpcSaver
out.writeByte(14);
out.writeShort(npc.walkingAnimation);
}
if (npc.rotateLeftAnimation != -1)
if (npc.idleRotateLeftAnimation != -1)
{
out.writeByte(15);
out.writeShort(npc.rotateLeftAnimation);
out.writeShort(npc.idleRotateLeftAnimation);
}
if (npc.rotateRightAnimation != -1)
if (npc.idleRotateRightAnimation != -1)
{
out.writeByte(16);
out.writeShort(npc.rotateRightAnimation);
out.writeShort(npc.idleRotateRightAnimation);
}
if (npc.rotate180Animation != -1 || npc.rotate90LeftAnimation != -1 || npc.rotate90RightAnimation != -1)
if (npc.rotate180Animation != -1 || npc.rotateLeftAnimation != -1 || npc.rotateRightAnimation != -1)
{
out.writeByte(17);
out.writeShort(npc.walkingAnimation);
out.writeShort(npc.rotate180Animation);
out.writeShort(npc.rotate90RightAnimation);
out.writeShort(npc.rotate90LeftAnimation);
out.writeShort(npc.rotateLeftAnimation);
out.writeShort(npc.rotateRightAnimation);
}
for (int i = 0; i < 5; ++i)
{
@@ -26,10 +26,6 @@ package com.jagex.oldscape.pub;
public interface OAuthApi
{
boolean isOnLoginScreen();
void setOtlTokenRequester(OtlTokenRequester otlTokenRequester);
/**
* Gets a unique per-RuneScape-Account identifier or {@code -1} if the client has not logged in yet
*/
@@ -1,33 +0,0 @@
/*
* 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 com.jagex.oldscape.pub;
import java.net.URL;
import java.util.concurrent.Future;
public interface OtlTokenRequester
{
Future<OtlTokenResponse> request(URL url);
}
@@ -1,32 +0,0 @@
/*
* 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 com.jagex.oldscape.pub;
public interface OtlTokenResponse
{
boolean isSuccess();
String getToken();
}
@@ -12659,6 +12659,11 @@ public final class ItemID
public static final int CABBAGE_26975 = 26975;
public static final int CABBAGE_26977 = 26977;
public static final int CABBAGE_26979 = 26979;
public static final int LION_HELM = 26981;
public static final int LOST_BAG_26984 = 26984;
public static final int LOST_BAG_26986 = 26986;
public static final int LOST_BAG_26988 = 26988;
public static final int AMULET_OF_THE_EYE_26990 = 26990;
public static final int AMULET_OF_THE_EYE_26992 = 26992;
public static final int AMULET_OF_THE_EYE_26994 = 26994;
/* This file is automatically generated. Do not edit. */
}
@@ -9647,14 +9647,7 @@ public final class NpcID
public static final int ABYSSAL_WALKER_11454 = 11454;
public static final int THE_GREAT_GUARDIAN_11455 = 11455;
public static final int THE_GREAT_GUARDIAN_11456 = 11456;
public static final int SUSPICIOUS_CRATE = 11462;
public static final int SUSPICIOUS_CRATE_11463 = 11463;
public static final int PHOEBE_KAY = 11464;
public static final int XI_PLZPETDOGZ_XIX = 11465;
public static final int XI_PLZPETDOGZ_XIX_11466 = 11466;
public static final int CAMARST_11467 = 11467;
public static final int EASTER_BUNNY = 11468;
public static final int EASTER_BUNNY_11470 = 11470;
public static final int MENAPHITE_SHADOW = 11462;
public static final int TARIK_11473 = 11473;
public static final int MAISA_11474 = 11474;
public static final int MAISA_11475 = 11475;
@@ -9675,7 +9668,6 @@ public final class NpcID
public static final int MENAPHITE_AKH_11491 = 11491;
public static final int MENAPHITE_AKH_11492 = 11492;
public static final int MENAPHITE_AKH_11493 = 11493;
public static final int MENAPHITE_SHADOW = 11494;
public static final int MENAPHITE_AKH_11495 = 11495;
public static final int MENAPHITE_AKH_11496 = 11496;
public static final int MENAPHITE_AKH_11497 = 11497;
@@ -9739,7 +9731,6 @@ public final class NpcID
public static final int CITIZEN_11556 = 11556;
public static final int CITIZEN_11557 = 11557;
public static final int CITIZEN_11558 = 11558;
public static final int SCABARAS = 11560;
public static final int SELIM_11561 = 11561;
public static final int JEX_11562 = 11562;
public static final int JEX_11563 = 11563;
@@ -14111,7 +14111,14 @@ public final class NullItemID
public static final int NULL_26976 = 26976;
public static final int NULL_26978 = 26978;
public static final int NULL_26980 = 26980;
public static final int NULL_26981 = 26981;
public static final int NULL_26982 = 26982;
public static final int NULL_26983 = 26983;
public static final int NULL_26985 = 26985;
public static final int NULL_26987 = 26987;
public static final int NULL_26989 = 26989;
public static final int NULL_26991 = 26991;
public static final int NULL_26993 = 26993;
public static final int NULL_26995 = 26995;
/* This file is automatically generated. Do not edit. */
}
@@ -1798,9 +1798,7 @@ public final class NullNpcID
public static final int NULL_11459 = 11459;
public static final int NULL_11460 = 11460;
public static final int NULL_11461 = 11461;
public static final int NULL_11469 = 11469;
public static final int NULL_11471 = 11471;
public static final int NULL_11472 = 11472;
public static final int NULL_11488 = 11488;
public static final int NULL_11512 = 11512;
public static final int NULL_11559 = 11559;
@@ -21640,8 +21640,6 @@ public final class NullObjectID
public static final int NULL_43847 = 43847;
public static final int NULL_43848 = 43848;
public static final int NULL_43850 = 43850;
public static final int NULL_43855 = 43855;
public static final int NULL_43866 = 43866;
public static final int NULL_43871 = 43871;
public static final int NULL_43872 = 43872;
public static final int NULL_43874 = 43874;
@@ -22197,20 +22197,6 @@ public final class ObjectID
public static final int BLOOD_RIFT_43825 = 43825;
public static final int PLANT_43827 = 43827;
public static final int BARRIER_43849 = 43849;
public static final int CRATE_43851 = 43851;
public static final int DIRTY_GROUND = 43852;
public static final int DIRTY_GROUND_43853 = 43853;
public static final int DIRTY_GROUND_43854 = 43854;
public static final int PILE_OF_JUNK = 43856;
public static final int PILE_OF_JUNK_43857 = 43857;
public static final int PILE_OF_JUNK_43858 = 43858;
public static final int PILE_OF_JUNK_43859 = 43859;
public static final int PILE_OF_JUNK_43860 = 43860;
public static final int PILE_OF_JUNK_43861 = 43861;
public static final int FROZEN_CHURNING_MACHINE = 43862;
public static final int FROZEN_CHURNING_MACHINE_43863 = 43863;
public static final int FROZEN_CHURNING_MACHINE_43864 = 43864;
public static final int FROZEN_CHURNING_MACHINE_43865 = 43865;
public static final int RUBBLE_43867 = 43867;
public static final int STAIRS_43868 = 43868;
public static final int SCIMITAR = 43869;
@@ -527,6 +527,8 @@ public final class WidgetID
static final int MAGIC_ICON = 71;
static final int INTERFACE_CONTAINER = 72;
static final int INVENTORY_CONTAINER = 78;
static final int CHATBOX_PARENT = 94;
static final int INVENTORY_PARENT = 95;
}
static class ResizableViewportBottomLine
@@ -554,6 +556,10 @@ public final class WidgetID
static final int MAGIC_ICON = 64;
static final int INTERFACE_CONTAINER = 69;
static final int INVENTORY_CONTAINER = 75;
static final int CHATBOX_PARENT = 91;
static final int TABS1 = 92;
static final int TABS2 = 93;
static final int INVENTORY_PARENT = 94;
}
static class Chatbox
@@ -265,6 +265,8 @@ public enum WidgetInfo
RESIZABLE_VIEWPORT_MUSIC_ICON(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.MUSIC_ICON),
RESIZABLE_VIEWPORT_INTERFACE_CONTAINER(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.INTERFACE_CONTAINER),
RESIZABLE_VIEWPORT_INVENTORY_CONTAINER(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.INVENTORY_CONTAINER),
RESIZABLE_VIEWPORT_CHATBOX_PARENT(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.CHATBOX_PARENT),
RESIZABLE_VIEWPORT_INVENTORY_PARENT(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.INVENTORY_PARENT),
RESIZABLE_MINIMAP_WIDGET(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.MINIMAP),
RESIZABLE_MINIMAP_DRAW_AREA(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.MINIMAP_DRAW_AREA),
@@ -289,6 +291,10 @@ public enum WidgetInfo
RESIZABLE_VIEWPORT_BOTTOM_LINE_MUSIC_ICON(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.MUSIC_ICON),
RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_CONTAINER(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.INVENTORY_CONTAINER),
RESIZABLE_VIEWPORT_BOTTOM_LINE_INTERFACE_CONTAINER(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.INTERFACE_CONTAINER),
RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.CHATBOX_PARENT),
RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.TABS1),
RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.TABS2),
RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.INVENTORY_PARENT),
PRAYER_THICK_SKIN(WidgetID.PRAYER_GROUP_ID, WidgetID.Prayer.THICK_SKIN),
PRAYER_BURST_OF_STRENGTH(WidgetID.PRAYER_GROUP_ID, WidgetID.Prayer.BURST_OF_STRENGTH),
@@ -27,11 +27,9 @@ package net.runelite.client;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.jagex.oldscape.pub.OAuthApi;
import com.openosrs.client.OpenOSRS;
import com.openosrs.client.game.PlayerManager;
import com.openosrs.client.ui.OpenOSRSSplashScreen;
@@ -374,11 +372,6 @@ public class RuneLite
}
applet.start();
if (applet instanceof OAuthApi)
{
setupJxAuth((OAuthApi) applet);
}
}
SplashScreen.stage(.57, null, "Loading configuration");
@@ -675,21 +668,4 @@ public class RuneLite
System.setProperty(key, value);
}
}
private void setupJxAuth(OAuthApi oAuthApi)
{
String accessToken = System.getenv("JX_ACCESS_TOKEN");
if (Strings.isNullOrEmpty(accessToken))
{
return;
}
try
{
}
catch (LinkageError ex)
{
log.error("error setting up OTL requester", ex);
}
}
}
@@ -42,6 +42,12 @@ public class WidgetOverlay extends Overlay
public static Collection<WidgetOverlay> createOverlays(final OverlayManager overlayManager, final Client client)
{
return Arrays.asList(
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_CHATBOX_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
// The client forces the oxygen bar below the xp tracker, so set its priority lower
@@ -10650,6 +10650,18 @@
26897,
26898
],
"lost bag": [
26912,
26984,
26986,
26988
],
"amulet of the eye": [
26914,
26990,
26992,
26994
],
"vat": [
26932,
26933