Skip to content

Commit

Permalink
Merge pull request #562 from chsami/development
Browse files Browse the repository at this point in the history
1.6.5
  • Loading branch information
chsami authored Dec 10, 2024
2 parents 0defeb3 + ddd8f43 commit ea18433
Show file tree
Hide file tree
Showing 303 changed files with 6,721 additions and 2,227 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "1.6.4.3"
automatic_release_tag: "1.6.5"
prerelease: false
title: "Release 1.6.4.3"
title: "Release 1.6.5"
files: |
/home/runner/work/Microbot/Microbot/runelite-client/target/microbot-*.jar
Expand Down
2 changes: 1 addition & 1 deletion cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.45-SNAPSHOT</version>
<version>1.10.46-SNAPSHOT</version>
</parent>

<artifactId>cache</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.45-SNAPSHOT</version>
<version>1.10.46-SNAPSHOT</version>
<packaging>pom</packaging>

<name>RuneLite</name>
Expand Down
2 changes: 1 addition & 1 deletion runelite-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.45-SNAPSHOT</version>
<version>1.10.46-SNAPSHOT</version>
</parent>

<artifactId>runelite-api</artifactId>
Expand Down
9 changes: 2 additions & 7 deletions runelite-api/src/main/java/net/runelite/api/AnimationID.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ public final class AnimationID
public static final int COOKING_WINE = 7529;
public static final int FLETCHING_BOW_CUTTING = 1248;
public static final int HUNTER_LAY_BOXTRAP_BIRDSNARE = 5208; //same for laying bird snares and box traps
public static final int HUNTER_LAY_DEADFALLTRAP = 5212; //setting up deadfall trap
public static final int HUNTER_LAY_NETTRAP = 5215; //setting up net trap
public static final int HUNTER_LAY_MANIACAL_MONKEY_BOULDER_TRAP = 7259; // setting up maniacal monkey boulder trap
public static final int HUNTER_CHECK_BIRD_SNARE = 5207;
public static final int HUNTER_CHECK_BOX_TRAP = 5212;
public static final int HERBLORE_MAKE_TAR = 5249;
public static final int FLETCHING_STRING_NORMAL_SHORTBOW = 6678;
public static final int FLETCHING_STRING_NORMAL_LONGBOW = 6684;
Expand Down Expand Up @@ -151,7 +149,7 @@ public final class AnimationID
public static final int CRAFTING_LOOM = 2270;
public static final int CRAFTING_CRUSH_BLESSED_BONES = 11099;
public static final int SMITHING_SMELTING = 899;
public static final int SMITHING_CANNONBALL = 827; //cball smithing uses this and SMITHING_SMELTING
public static final int SMITHING_CANNONBALL = 827; // same as BURYING_BONES
public static final int SMITHING_ANVIL = 898;
public static final int SMITHING_IMCANDO_HAMMER = 8911;
public static final int FISHING_BIG_NET = 620;
Expand Down Expand Up @@ -259,8 +257,6 @@ public final class AnimationID
public static final int DEMONIC_GORILLA_MAGIC_ATTACK = 7225;
public static final int DEMONIC_GORILLA_MELEE_ATTACK = 7226;
public static final int DEMONIC_GORILLA_RANGED_ATTACK = 7227;
public static final int DEMONIC_GORILLA_AOE_ATTACK = 7228;
public static final int DEMONIC_GORILLA_PRAYER_SWITCH = 7228;
public static final int DEMONIC_GORILLA_DEFEND = 7224;
public static final int BOOK_HOME_TELEPORT_1 = 4847;
public static final int BOOK_HOME_TELEPORT_2 = 4850;
Expand Down Expand Up @@ -325,13 +321,12 @@ public final class AnimationID
public static final int FARMING_PLANT_SEED = 2291;
public static final int FARMING_HARVEST_FLOWER = 2292;
public static final int FARMING_MIX_ULTRACOMPOST = 7699;
public static final int FARMING_HARVEST_ALLOTMENT = 830;
public static final int FARMING_HARVEST_ALLOTMENT = 830; // same as DIG

// Lunar spellbook
public static final int ENERGY_TRANSFER_VENGEANCE_OTHER = 4411;
public static final int MAGIC_LUNAR_SHARED = 4413; // Utilized by Fertile Soil, Boost/Stat Potion Share, NPC Contact, Bake Pie
public static final int MAGIC_LUNAR_CURE_PLANT = 4432;
public static final int MAGIC_LUNAR_GEOMANCY = 7118;
public static final int MAGIC_LUNAR_PLANK_MAKE = 6298;
public static final int MAGIC_LUNAR_STRING_JEWELRY = 4412;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ public interface DynamicObject extends Renderable
* @return
*/
int getAnimCycle();

/**
* Like {@link #getModel()} but is threadsafe and doesn't support animations.
*
* @return
*/
Model getModelZbuf();
}
75 changes: 73 additions & 2 deletions runelite-api/src/main/java/net/runelite/api/SpriteID.java
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ public final class SpriteID
public static final int TAB_QUESTS = 776;
public static final int RS2_TAB_INVENTORY = 777;
public static final int RS2_TAB_EQUIPMENT = 778;
public static final int RS2_TAB_PRAYER = 779;
public static final int TAB_PRAYER = 779;
public static final int TAB_MAGIC = 780;
public static final int RS2_TAB_FRIENDS_CHAT = 781;
Expand Down Expand Up @@ -1662,7 +1661,47 @@ public final class SpriteID
public static final int SPELL_RESURRECT_GREATER_ZOMBIE = 2984;
/* Unmapped: 2985~2986 */
public static final int SPELL_RESURRECT_SUPERIOR_SKELETON_DISABLED = 2987;
/* Unmapped: 2988~4707 */
/* Unmapped: 2988~4259 */
public static final int HISCORE_MIMIC = 4260;
public static final int HISCORE_OBOR = 4261;
public static final int HISCORE_BRYOPHYTA = 4262;
public static final int HISCORE_GIANT_MOLE = 4263;
public static final int HISCORE_GROTESQUE_GUARDIANS = 4264;
public static final int HISCORE_TEMPOROSS = 4265;
public static final int HISCORE_WINTERTODT = 4266;
public static final int HISCORE_BARROWS_CHESTS = 4267;
public static final int HISCORE_SARACHNIS = 4269;
public static final int HISCORE_KALPHITE_QUEEN = 4270;
public static final int HISCORE_HESPORI = 4271;
public static final int HISCORE_SKOTIZO = 4272;
public static final int HISCORE_ZALCANO = 4273;
public static final int HISCORE_KING_BLACK_DRAGON = 4274;
public static final int HISCORE_KRAKEN = 4275;
public static final int HISCORE_ABYSSAL_SIRE = 4276;
public static final int HISCORE_THERMONUCLEAR_SMOKE_DEVIL = 4277;
public static final int HISCORE_THE_GAUNTLET = 4278;
public static final int HISCORE_ZULRAH = 4279;
public static final int HISCORE_CERBERUS = 4280;
public static final int HISCORE_VORKATH = 4281;
public static final int HISCORE_GENERAL_GRAARDOR = 4282;
public static final int HISCORE_KRIL_TSUTSAROTH = 4283;
public static final int HISCORE_COMMANDER_ZILYANA = 4284;
public static final int HISCORE_KREEARRA = 4285;
public static final int HISCORE_NIGHTMARE = 4286;
public static final int HISCORE_CORPOREAL_BEAST = 4287;
public static final int HISCORE_CHAMBERS_OF_XERIC = 4288;
public static final int HISCORE_ALCHEMICAL_HYDRA = 4289;
public static final int HISCORE_THEATRE_OF_BLOOD = 4290;
public static final int HISCORE_NEX = 4291;
public static final int HISCORE_DAGANNOTH_SUPREME = 4292;
public static final int HISCORE_DAGANNOTH_REX = 4293;
public static final int HISCORE_DAGANNOTH_PRIME = 4294;
public static final int HISCORE_THE_CORRUPTED_GAUNTLET = 4295;
public static final int HISCORE_CHAMBERS_OF_XERIC_CHALLENGE_MODE = 4296;
public static final int HISCORE_TOMBS_OF_AMASCUT = 4297;
public static final int HISCORE_TOMBS_OF_AMASCUT_EXPERT = 4298;
public static final int HISCORE_PHANTOM_MUSPAH = 4299;
/* Unmapped: 4300~4707 */
public static final int HEALTHBAR_PURPLE_FRONT_30PX = 4708;
public static final int HEALTHBAR_PURPLE_BACK_30PX = 4709;
public static final int HEALTHBAR_PURPLE_FRONT_40PX = 4710;
Expand Down Expand Up @@ -1713,4 +1752,36 @@ public final class SpriteID
public static final int ACTIVATED_PRAYER_BACKGROUND = 4892;
/* Unmapped: 4893~5250 */
public static final int EMOTE_FORTIS_SALUTE = 5251;
/* Unmapped: 5252~5620 */
public static final int HISCORE_CHAOS_ELEMENTAL = 5621;
public static final int HISCORE_ARTIO_CALLISTO = 5622;
public static final int HISCORE_CALVARION_VETION = 5623;
public static final int HISCORE_SPINDEL_VENENATIS = 5624;
public static final int HISCORE_CHAOS_FANATIC = 5625;
public static final int HISCORE_CRAZY_ARCHAEOLOGIST = 5626;
public static final int HISCORE_DERANGED_ARCHAEOLOGIST = 5627;
public static final int HISCORE_SCORPIA = 5628;
public static final int HISCORE_TZTOK_JAD = 5629;
public static final int HISCORE_TZKAL_ZUK = 5630;
public static final int HISCORE_THE_WHISPERER = 5631;
public static final int HISCORE_DUKE_SUCELLUS = 5632;
public static final int HISCORE_THE_LEVIATHAN = 5633;
public static final int HISCORE_VARDORVIS = 5634;
public static final int HISCORE_SCURRIUS = 5635;
public static final int HISCORE_SOL_HEREDIT = 5636;
public static final int HISCORE_LUNAR_CHESTS = 5637;
public static final int HISCORE_ARAXXOR = 5638;
public static final int HISCORE_AMOXLIATL = 5639;
public static final int HISCORE_THE_HUEYCOATL = 5640;
/* Unmapped: 5641~5852 */
public static final int HISCORE_CLUE_SCROLL_ALL = 5853;
public static final int HISCORE_BOUNTY_HUNTER_HUNTER = 5854;
public static final int HISCORE_BOUNTY_HUNTER_ROGUE = 5855;
public static final int HISCORE_LAST_MAN_STANDING = 5856;
public static final int HISCORE_LEAGUE_POINTS = 5857;
public static final int HISCORE_SOUL_WARS_ZEAL = 5858;
public static final int HISCORE_PVP_ARENA_RANK = 5859;
public static final int HISCORE_RIFTS_CLOSED = 5860;
public static final int HISCORE_DEADMAN_POINTS = 5861;
public static final int HISCORE_COLOSSEUM_GLORY = 5862;
}
7 changes: 6 additions & 1 deletion runelite-api/src/main/java/net/runelite/api/Varbits.java
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,11 @@ public final class Varbits
*/
public static final int QUEST_THE_HAND_IN_THE_SAND = 1527;

/**
* Dragon slayer 2 quest status
*/
public static final int QUEST_DS2 = 6104;

/**
* Daily Tasks =Collection availability)
*/
Expand Down Expand Up @@ -813,7 +818,7 @@ public final class Varbits
* Number of game ticks remaining is in intervals of 100; for a value X there are 100 * X game ticks remaining.
* A player can eat from the food piles once this reaches 0.
*/
public static final int SCURRIUS_FOOD_PILE_COOLDOWN = 4098;
public static final int SCURRIUS_FOOD_PILE_COOLDOWN = 9581;

/**
* Farmer's Affinity effect timer
Expand Down
78 changes: 78 additions & 0 deletions runelite-api/src/test/java/net/runelite/api/DistinctIdTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* Copyright (c) 2024, Adam <[email protected]>
* 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.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;
import lombok.SneakyThrows;
import net.runelite.api.clan.ClanID;
import static org.junit.Assert.fail;
import org.junit.Test;

public class DistinctIdTest
{
@Test
public void testUnique()
{
duplicateCheck(
// disabled as a few plugins rely on the dups
//AnimationID.class,
ClanID.class,
EnumID.class,
FontID.class,
GraphicID.class,
HitsplatID.class,
KeyCode.class,
ParamID.class,
ScriptID.class,
SettingID.class,
SkullIcon.class,
SoundEffectID.class,
SpriteID.class,
StructID.class,
VarClientInt.class,
VarClientStr.class,
VarPlayer.class,
Varbits.class
);
}

@SneakyThrows
private void duplicateCheck(Class<?>... classes)
{
for (Class<?> clazz : classes)
{
Set<Integer> seen = new HashSet<>();
for (Field f : clazz.getDeclaredFields())
{
if (!seen.add(f.getInt(null)))
{
fail("field with duplicate value: " + clazz.getSimpleName() + "." + f.getName());
}
}
}
}
}
4 changes: 2 additions & 2 deletions runelite-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>net.runelite</groupId>
<artifactId>runelite-parent</artifactId>
<version>1.10.45-SNAPSHOT</version>
<version>1.10.46-SNAPSHOT</version>
</parent>

<artifactId>client</artifactId>
Expand All @@ -41,7 +41,7 @@
<git.commit.id.abbrev>nogit</git.commit.id.abbrev>
<git.dirty>false</git.dirty>
<shade.skip>false</shade.skip>
<microbot.version>1.6.4.3</microbot.version>
<microbot.version>1.6.5</microbot.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import java.io.IOException;
import java.util.UUID;
Expand All @@ -48,6 +49,7 @@ public class ClientSessionManager
private final ScheduledExecutorService executorService;
private final Client client;
private final SessionClient sessionClient;
private final boolean disableTelemetry;

private ScheduledFuture<?> scheduledFuture;
private ScheduledFuture<?> scheduledFutureMicroBot;
Expand All @@ -58,38 +60,42 @@ public class ClientSessionManager

@Inject
ClientSessionManager(ScheduledExecutorService executorService,
@Nullable Client client,
SessionClient sessionClient, MicrobotApi microbotApi)
{
@Nullable Client client,
SessionClient sessionClient, MicrobotApi microbotApi,
@Named("disableTelemetry") boolean disableTelemetry) {
this.executorService = executorService;
this.client = client;
this.sessionClient = sessionClient;
this.microbotApi = microbotApi;
this.disableTelemetry = disableTelemetry;
}

public void start()
{
executorService.execute(() ->
{
try
{
public void start() {
if (disableTelemetry) {
log.info("Telemetry is disabled. ClientSessionManager will not start.");
return;
}

executorService.execute(() -> {
try {
sessionId = sessionClient.open();
microbotSessionId = microbotApi.microbotOpen();
log.debug("Opened session {}", sessionId);
}
catch (IOException ex)
{
} catch (IOException ex) {
log.warn("error opening session", ex);
}
});

scheduledFuture = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES);
scheduledFutureMicroBot = executorService.scheduleWithFixedDelay(RunnableExceptionLogger.wrap(this::microbotPing), 1, 5, TimeUnit.MINUTES);
scheduledFuture = executorService.scheduleWithFixedDelay(
RunnableExceptionLogger.wrap(this::ping), 1, 10, TimeUnit.MINUTES);
scheduledFutureMicroBot = executorService.scheduleWithFixedDelay(
RunnableExceptionLogger.wrap(this::microbotPing), 1, 5, TimeUnit.MINUTES);
}

@Subscribe
private void onClientShutdown(ClientShutdown e)
{
if (disableTelemetry) return;
scheduledFuture.cancel(true);
scheduledFutureMicroBot.cancel(true);
e.waitFor(executorService.submit(() ->
Expand Down
Loading

0 comments on commit ea18433

Please sign in to comment.