api: replace varbits enum with ints
This adds a Varbit magic constant annotation which is used now on varbit parameters and fields. This is roughly the same type-safety wise, with IDE support, but the ids can be inlined by the compiler and it avoids having to have a large enum class with many fields.
This commit is contained in:
@@ -120,6 +120,7 @@
|
||||
<exclude>net/runelite/api/SoundEffectVolume.class</exclude>
|
||||
<exclude>net/runelite/api/SpriteID.class</exclude>
|
||||
<exclude>net/runelite/api/StructID.class</exclude>
|
||||
<exclude>net/runelite/api/Varbits.class</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.annotations.VisibleForDevtools;
|
||||
import net.runelite.api.annotations.VisibleForExternalPlugins;
|
||||
import net.runelite.api.clan.ClanChannel;
|
||||
@@ -773,12 +774,12 @@ public interface Client extends OAuthApi, GameEngine
|
||||
int getVar(VarPlayer varPlayer);
|
||||
|
||||
/**
|
||||
* Gets a value corresponding to the passed variable.
|
||||
* Gets a value corresponding to the passed varbit.
|
||||
*
|
||||
* @param varbit the variable
|
||||
* @param varbit the varbit id
|
||||
* @return the value
|
||||
*/
|
||||
int getVar(Varbits varbit);
|
||||
int getVar(@Varbit int varbit);
|
||||
|
||||
/**
|
||||
* Gets an int value corresponding to the passed variable.
|
||||
@@ -812,7 +813,7 @@ public interface Client extends OAuthApi, GameEngine
|
||||
* @return the value
|
||||
*/
|
||||
@VisibleForExternalPlugins
|
||||
int getVarbitValue(int varbitId);
|
||||
int getVarbitValue(@Varbit int varbitId);
|
||||
|
||||
/**
|
||||
* Gets the value of a given VarClientInt
|
||||
@@ -843,12 +844,12 @@ public interface Client extends OAuthApi, GameEngine
|
||||
void setVar(VarClientInt varClientStr, int value);
|
||||
|
||||
/**
|
||||
* Sets the value of a given variable.
|
||||
* Sets the value of a varbit
|
||||
*
|
||||
* @param varbit the variable
|
||||
* @param varbit the varbit id
|
||||
* @param value the new value
|
||||
*/
|
||||
void setVarbit(Varbits varbit, int value);
|
||||
void setVarbit(@Varbit int varbit, int value);
|
||||
|
||||
/**
|
||||
* Gets the varbit composition for a given varbit id
|
||||
@@ -866,10 +867,10 @@ public interface Client extends OAuthApi, GameEngine
|
||||
* @param varps passed varbits
|
||||
* @param varbitId the variable ID
|
||||
* @return the value
|
||||
* @see Varbits#id
|
||||
* @see Varbits
|
||||
*/
|
||||
@VisibleForDevtools
|
||||
int getVarbitValue(int[] varps, int varbitId);
|
||||
int getVarbitValue(int[] varps, @Varbit int varbitId);
|
||||
|
||||
/**
|
||||
* Sets the value of a given variable.
|
||||
@@ -877,10 +878,10 @@ public interface Client extends OAuthApi, GameEngine
|
||||
* @param varps passed varbits
|
||||
* @param varbit the variable
|
||||
* @param value the value
|
||||
* @see Varbits#id
|
||||
* @see Varbits
|
||||
*/
|
||||
@VisibleForDevtools
|
||||
void setVarbitValue(int[] varps, int varbit, int value);
|
||||
void setVarbitValue(int[] varps, @Varbit int varbit, int value);
|
||||
|
||||
/**
|
||||
* Mark the given varp as changed, causing var listeners to be
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
*/
|
||||
package net.runelite.api;
|
||||
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
|
||||
/**
|
||||
* An enumeration of different prayer spells.
|
||||
*/
|
||||
@@ -146,11 +148,10 @@ public enum Prayer
|
||||
*/
|
||||
AUGURY(Varbits.PRAYER_AUGURY, 40.0);
|
||||
|
||||
private final Varbits varbit;
|
||||
|
||||
private final int varbit;
|
||||
private final double drainRate;
|
||||
|
||||
Prayer(Varbits varbit, double drainRate)
|
||||
Prayer(@Varbit int varbit, double drainRate)
|
||||
{
|
||||
this.varbit = varbit;
|
||||
this.drainRate = drainRate;
|
||||
@@ -161,7 +162,8 @@ public enum Prayer
|
||||
*
|
||||
* @return the prayer active varbit
|
||||
*/
|
||||
public Varbits getVarbit()
|
||||
@Varbit
|
||||
public int getVarbit()
|
||||
{
|
||||
return varbit;
|
||||
}
|
||||
|
||||
@@ -24,201 +24,196 @@
|
||||
*/
|
||||
package net.runelite.api;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Server controlled "content-developer" integers.
|
||||
*
|
||||
* @see VarPlayer
|
||||
*
|
||||
* <p>
|
||||
* These differ from a {@link VarPlayer} in that VarBits can be
|
||||
* less than 32 bits. One or more VarBits can be assigned to a
|
||||
* backing VarPlayer, each with a static range of bits that it is
|
||||
* allowed to access. This allows a more compact representation
|
||||
* of small values, like booleans
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum Varbits
|
||||
public final class Varbits
|
||||
{
|
||||
/*
|
||||
* If chatbox is transparent or not
|
||||
*/
|
||||
TRANSPARENT_CHATBOX(4608),
|
||||
public static final int TRANSPARENT_CHATBOX = 4608;
|
||||
|
||||
/*
|
||||
* If the player has an active stamina potion effect or not
|
||||
*/
|
||||
RUN_SLOWED_DEPLETION_ACTIVE(25),
|
||||
public static final int RUN_SLOWED_DEPLETION_ACTIVE = 25;
|
||||
|
||||
/**
|
||||
* If scrollbar in resizable mode chat is on the left
|
||||
*/
|
||||
CHAT_SCROLLBAR_ON_LEFT(6374),
|
||||
public static final int CHAT_SCROLLBAR_ON_LEFT = 6374;
|
||||
|
||||
/**
|
||||
* Runepouch
|
||||
*/
|
||||
RUNE_POUCH_RUNE1(29),
|
||||
RUNE_POUCH_RUNE2(1622),
|
||||
RUNE_POUCH_RUNE3(1623),
|
||||
RUNE_POUCH_AMOUNT1(1624),
|
||||
RUNE_POUCH_AMOUNT2(1625),
|
||||
RUNE_POUCH_AMOUNT3(1626),
|
||||
public static final int RUNE_POUCH_RUNE1 = 29;
|
||||
public static final int RUNE_POUCH_RUNE2 = 1622;
|
||||
public static final int RUNE_POUCH_RUNE3 = 1623;
|
||||
public static final int RUNE_POUCH_AMOUNT1 = 1624;
|
||||
public static final int RUNE_POUCH_AMOUNT2 = 1625;
|
||||
public static final int RUNE_POUCH_AMOUNT3 = 1626;
|
||||
|
||||
/**
|
||||
* Prayers
|
||||
*/
|
||||
QUICK_PRAYER(4103),
|
||||
PRAYER_THICK_SKIN(4104),
|
||||
PRAYER_BURST_OF_STRENGTH(4105),
|
||||
PRAYER_CLARITY_OF_THOUGHT(4106),
|
||||
PRAYER_SHARP_EYE(4122),
|
||||
PRAYER_MYSTIC_WILL(4123),
|
||||
PRAYER_ROCK_SKIN(4107),
|
||||
PRAYER_SUPERHUMAN_STRENGTH(4108),
|
||||
PRAYER_IMPROVED_REFLEXES(4109),
|
||||
PRAYER_RAPID_RESTORE(4110),
|
||||
PRAYER_RAPID_HEAL(4111),
|
||||
PRAYER_PROTECT_ITEM(4112),
|
||||
PRAYER_HAWK_EYE(4124),
|
||||
PRAYER_MYSTIC_LORE(4125),
|
||||
PRAYER_STEEL_SKIN(4113),
|
||||
PRAYER_ULTIMATE_STRENGTH(4114),
|
||||
PRAYER_INCREDIBLE_REFLEXES(4115),
|
||||
PRAYER_PROTECT_FROM_MAGIC(4116),
|
||||
PRAYER_PROTECT_FROM_MISSILES(4117),
|
||||
PRAYER_PROTECT_FROM_MELEE(4118),
|
||||
PRAYER_EAGLE_EYE(4126),
|
||||
PRAYER_MYSTIC_MIGHT(4127),
|
||||
PRAYER_RETRIBUTION(4119),
|
||||
PRAYER_REDEMPTION(4120),
|
||||
PRAYER_SMITE(4121),
|
||||
PRAYER_CHIVALRY(4128),
|
||||
PRAYER_PIETY(4129),
|
||||
PRAYER_PRESERVE(5466),
|
||||
PRAYER_RIGOUR(5464),
|
||||
PRAYER_AUGURY(5465),
|
||||
public static final int QUICK_PRAYER = 4103;
|
||||
public static final int PRAYER_THICK_SKIN = 4104;
|
||||
public static final int PRAYER_BURST_OF_STRENGTH = 4105;
|
||||
public static final int PRAYER_CLARITY_OF_THOUGHT = 4106;
|
||||
public static final int PRAYER_SHARP_EYE = 4122;
|
||||
public static final int PRAYER_MYSTIC_WILL = 4123;
|
||||
public static final int PRAYER_ROCK_SKIN = 4107;
|
||||
public static final int PRAYER_SUPERHUMAN_STRENGTH = 4108;
|
||||
public static final int PRAYER_IMPROVED_REFLEXES = 4109;
|
||||
public static final int PRAYER_RAPID_RESTORE = 4110;
|
||||
public static final int PRAYER_RAPID_HEAL = 4111;
|
||||
public static final int PRAYER_PROTECT_ITEM = 4112;
|
||||
public static final int PRAYER_HAWK_EYE = 4124;
|
||||
public static final int PRAYER_MYSTIC_LORE = 4125;
|
||||
public static final int PRAYER_STEEL_SKIN = 4113;
|
||||
public static final int PRAYER_ULTIMATE_STRENGTH = 4114;
|
||||
public static final int PRAYER_INCREDIBLE_REFLEXES = 4115;
|
||||
public static final int PRAYER_PROTECT_FROM_MAGIC = 4116;
|
||||
public static final int PRAYER_PROTECT_FROM_MISSILES = 4117;
|
||||
public static final int PRAYER_PROTECT_FROM_MELEE = 4118;
|
||||
public static final int PRAYER_EAGLE_EYE = 4126;
|
||||
public static final int PRAYER_MYSTIC_MIGHT = 4127;
|
||||
public static final int PRAYER_RETRIBUTION = 4119;
|
||||
public static final int PRAYER_REDEMPTION = 4120;
|
||||
public static final int PRAYER_SMITE = 4121;
|
||||
public static final int PRAYER_CHIVALRY = 4128;
|
||||
public static final int PRAYER_PIETY = 4129;
|
||||
public static final int PRAYER_PRESERVE = 5466;
|
||||
public static final int PRAYER_RIGOUR = 5464;
|
||||
public static final int PRAYER_AUGURY = 5465;
|
||||
|
||||
/**
|
||||
* Diary Entries
|
||||
*/
|
||||
DIARY_ARDOUGNE_EASY(4458),
|
||||
DIARY_ARDOUGNE_MEDIUM(4459),
|
||||
DIARY_ARDOUGNE_HARD(4460),
|
||||
DIARY_ARDOUGNE_ELITE(4461),
|
||||
public static final int DIARY_ARDOUGNE_EASY = 4458;
|
||||
public static final int DIARY_ARDOUGNE_MEDIUM = 4459;
|
||||
public static final int DIARY_ARDOUGNE_HARD = 4460;
|
||||
public static final int DIARY_ARDOUGNE_ELITE = 4461;
|
||||
|
||||
DIARY_DESERT_EASY(4483),
|
||||
DIARY_DESERT_MEDIUM(4484),
|
||||
DIARY_DESERT_HARD(4485),
|
||||
DIARY_DESERT_ELITE(4486),
|
||||
public static final int DIARY_DESERT_EASY = 4483;
|
||||
public static final int DIARY_DESERT_MEDIUM = 4484;
|
||||
public static final int DIARY_DESERT_HARD = 4485;
|
||||
public static final int DIARY_DESERT_ELITE = 4486;
|
||||
|
||||
DIARY_FALADOR_EASY(4462),
|
||||
DIARY_FALADOR_MEDIUM(4463),
|
||||
DIARY_FALADOR_HARD(4464),
|
||||
DIARY_FALADOR_ELITE(4465),
|
||||
public static final int DIARY_FALADOR_EASY = 4462;
|
||||
public static final int DIARY_FALADOR_MEDIUM = 4463;
|
||||
public static final int DIARY_FALADOR_HARD = 4464;
|
||||
public static final int DIARY_FALADOR_ELITE = 4465;
|
||||
|
||||
DIARY_FREMENNIK_EASY(4491),
|
||||
DIARY_FREMENNIK_MEDIUM(4492),
|
||||
DIARY_FREMENNIK_HARD(4493),
|
||||
DIARY_FREMENNIK_ELITE(4494),
|
||||
public static final int DIARY_FREMENNIK_EASY = 4491;
|
||||
public static final int DIARY_FREMENNIK_MEDIUM = 4492;
|
||||
public static final int DIARY_FREMENNIK_HARD = 4493;
|
||||
public static final int DIARY_FREMENNIK_ELITE = 4494;
|
||||
|
||||
DIARY_KANDARIN_EASY(4475),
|
||||
DIARY_KANDARIN_MEDIUM(4476),
|
||||
DIARY_KANDARIN_HARD(4477),
|
||||
DIARY_KANDARIN_ELITE(4478),
|
||||
public static final int DIARY_KANDARIN_EASY = 4475;
|
||||
public static final int DIARY_KANDARIN_MEDIUM = 4476;
|
||||
public static final int DIARY_KANDARIN_HARD = 4477;
|
||||
public static final int DIARY_KANDARIN_ELITE = 4478;
|
||||
|
||||
DIARY_KARAMJA_EASY(3578),
|
||||
DIARY_KARAMJA_MEDIUM(3599),
|
||||
DIARY_KARAMJA_HARD(3611),
|
||||
DIARY_KARAMJA_ELITE(4566),
|
||||
public static final int DIARY_KARAMJA_EASY = 3578;
|
||||
public static final int DIARY_KARAMJA_MEDIUM = 3599;
|
||||
public static final int DIARY_KARAMJA_HARD = 3611;
|
||||
public static final int DIARY_KARAMJA_ELITE = 4566;
|
||||
|
||||
DIARY_KOUREND_EASY(7925),
|
||||
DIARY_KOUREND_MEDIUM(7926),
|
||||
DIARY_KOUREND_HARD(7927),
|
||||
DIARY_KOUREND_ELITE(7928),
|
||||
public static final int DIARY_KOUREND_EASY = 7925;
|
||||
public static final int DIARY_KOUREND_MEDIUM = 7926;
|
||||
public static final int DIARY_KOUREND_HARD = 7927;
|
||||
public static final int DIARY_KOUREND_ELITE = 7928;
|
||||
|
||||
DIARY_LUMBRIDGE_EASY(4495),
|
||||
DIARY_LUMBRIDGE_MEDIUM(4496),
|
||||
DIARY_LUMBRIDGE_HARD(4497),
|
||||
DIARY_LUMBRIDGE_ELITE(4498),
|
||||
public static final int DIARY_LUMBRIDGE_EASY = 4495;
|
||||
public static final int DIARY_LUMBRIDGE_MEDIUM = 4496;
|
||||
public static final int DIARY_LUMBRIDGE_HARD = 4497;
|
||||
public static final int DIARY_LUMBRIDGE_ELITE = 4498;
|
||||
|
||||
DIARY_MORYTANIA_EASY(4487),
|
||||
DIARY_MORYTANIA_MEDIUM(4488),
|
||||
DIARY_MORYTANIA_HARD(4489),
|
||||
DIARY_MORYTANIA_ELITE(4490),
|
||||
public static final int DIARY_MORYTANIA_EASY = 4487;
|
||||
public static final int DIARY_MORYTANIA_MEDIUM = 4488;
|
||||
public static final int DIARY_MORYTANIA_HARD = 4489;
|
||||
public static final int DIARY_MORYTANIA_ELITE = 4490;
|
||||
|
||||
DIARY_VARROCK_EASY(4479),
|
||||
DIARY_VARROCK_MEDIUM(4480),
|
||||
DIARY_VARROCK_HARD(4481),
|
||||
DIARY_VARROCK_ELITE(4482),
|
||||
public static final int DIARY_VARROCK_EASY = 4479;
|
||||
public static final int DIARY_VARROCK_MEDIUM = 4480;
|
||||
public static final int DIARY_VARROCK_HARD = 4481;
|
||||
public static final int DIARY_VARROCK_ELITE = 4482;
|
||||
|
||||
DIARY_WESTERN_EASY(4471),
|
||||
DIARY_WESTERN_MEDIUM(4472),
|
||||
DIARY_WESTERN_HARD(4473),
|
||||
DIARY_WESTERN_ELITE(4474),
|
||||
public static final int DIARY_WESTERN_EASY = 4471;
|
||||
public static final int DIARY_WESTERN_MEDIUM = 4472;
|
||||
public static final int DIARY_WESTERN_HARD = 4473;
|
||||
public static final int DIARY_WESTERN_ELITE = 4474;
|
||||
|
||||
DIARY_WILDERNESS_EASY(4466),
|
||||
DIARY_WILDERNESS_MEDIUM(4467),
|
||||
DIARY_WILDERNESS_HARD(4468),
|
||||
DIARY_WILDERNESS_ELITE(4469),
|
||||
public static final int DIARY_WILDERNESS_EASY = 4466;
|
||||
public static final int DIARY_WILDERNESS_MEDIUM = 4467;
|
||||
public static final int DIARY_WILDERNESS_HARD = 4468;
|
||||
public static final int DIARY_WILDERNESS_ELITE = 4469;
|
||||
|
||||
/**
|
||||
* Kourend house favours
|
||||
*/
|
||||
KOUREND_FAVOR_ARCEUUS(4896),
|
||||
KOUREND_FAVOR_HOSIDIUS(4895),
|
||||
KOUREND_FAVOR_LOVAKENGJ(4898),
|
||||
KOUREND_FAVOR_PISCARILIUS(4899),
|
||||
KOUREND_FAVOR_SHAYZIEN(4894),
|
||||
public static final int KOUREND_FAVOR_ARCEUUS = 4896;
|
||||
public static final int KOUREND_FAVOR_HOSIDIUS = 4895;
|
||||
public static final int KOUREND_FAVOR_LOVAKENGJ = 4898;
|
||||
public static final int KOUREND_FAVOR_PISCARILIUS = 4899;
|
||||
public static final int KOUREND_FAVOR_SHAYZIEN = 4894;
|
||||
|
||||
/**
|
||||
* Equipped weapon type
|
||||
*/
|
||||
EQUIPPED_WEAPON_TYPE(357),
|
||||
public static final int EQUIPPED_WEAPON_TYPE = 357;
|
||||
|
||||
/**
|
||||
* Defensive casting mode
|
||||
*/
|
||||
DEFENSIVE_CASTING_MODE(2668),
|
||||
public static final int DEFENSIVE_CASTING_MODE = 2668;
|
||||
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
SIDE_PANELS(4607),
|
||||
public static final int SIDE_PANELS = 4607;
|
||||
|
||||
/**
|
||||
* Herbiboar Trails
|
||||
*/
|
||||
HB_TRAIL_31303(5737),
|
||||
HB_TRAIL_31306(5738),
|
||||
HB_TRAIL_31309(5739),
|
||||
HB_TRAIL_31312(5740),
|
||||
HB_TRAIL_31315(5741),
|
||||
HB_TRAIL_31318(5742),
|
||||
HB_TRAIL_31321(5743),
|
||||
HB_TRAIL_31324(5744),
|
||||
HB_TRAIL_31327(5745),
|
||||
HB_TRAIL_31330(5746),
|
||||
public static final int HB_TRAIL_31303 = 5737;
|
||||
public static final int HB_TRAIL_31306 = 5738;
|
||||
public static final int HB_TRAIL_31309 = 5739;
|
||||
public static final int HB_TRAIL_31312 = 5740;
|
||||
public static final int HB_TRAIL_31315 = 5741;
|
||||
public static final int HB_TRAIL_31318 = 5742;
|
||||
public static final int HB_TRAIL_31321 = 5743;
|
||||
public static final int HB_TRAIL_31324 = 5744;
|
||||
public static final int HB_TRAIL_31327 = 5745;
|
||||
public static final int HB_TRAIL_31330 = 5746;
|
||||
|
||||
HB_TRAIL_31333(5768),
|
||||
HB_TRAIL_31336(5769),
|
||||
HB_TRAIL_31339(5770),
|
||||
HB_TRAIL_31342(5771),
|
||||
HB_TRAIL_31345(5772),
|
||||
HB_TRAIL_31348(5773),
|
||||
HB_TRAIL_31351(5774),
|
||||
HB_TRAIL_31354(5775),
|
||||
HB_TRAIL_31357(5776),
|
||||
HB_TRAIL_31360(5777),
|
||||
public static final int HB_TRAIL_31333 = 5768;
|
||||
public static final int HB_TRAIL_31336 = 5769;
|
||||
public static final int HB_TRAIL_31339 = 5770;
|
||||
public static final int HB_TRAIL_31342 = 5771;
|
||||
public static final int HB_TRAIL_31345 = 5772;
|
||||
public static final int HB_TRAIL_31348 = 5773;
|
||||
public static final int HB_TRAIL_31351 = 5774;
|
||||
public static final int HB_TRAIL_31354 = 5775;
|
||||
public static final int HB_TRAIL_31357 = 5776;
|
||||
public static final int HB_TRAIL_31360 = 5777;
|
||||
|
||||
HB_TRAIL_31363(5747),
|
||||
HB_TRAIL_31366(5748),
|
||||
HB_TRAIL_31369(5749),
|
||||
HB_TRAIL_31372(5750),
|
||||
public static final int HB_TRAIL_31363 = 5747;
|
||||
public static final int HB_TRAIL_31366 = 5748;
|
||||
public static final int HB_TRAIL_31369 = 5749;
|
||||
public static final int HB_TRAIL_31372 = 5750;
|
||||
|
||||
HB_FINISH(5766),
|
||||
public static final int HB_FINISH = 5766;
|
||||
|
||||
/**
|
||||
* Started hunting Herbiboar.
|
||||
@@ -226,432 +221,424 @@ public enum Varbits
|
||||
* NOTE: This value remains at 0 even after starting a Herbiboar trail up until searching the first object along the
|
||||
* hunting path.
|
||||
*/
|
||||
HB_STARTED(5767),
|
||||
public static final int HB_STARTED = 5767;
|
||||
|
||||
/**
|
||||
* Barbarian Assault
|
||||
*/
|
||||
IN_GAME_BA(3923),
|
||||
BA_GC(4768),
|
||||
public static final int IN_GAME_BA = 3923;
|
||||
public static final int BA_GC = 4768;
|
||||
|
||||
/**
|
||||
* 0 = Outside wilderness
|
||||
* 1 = In wilderness
|
||||
*/
|
||||
IN_WILDERNESS(5963),
|
||||
public static final int IN_WILDERNESS = 5963;
|
||||
|
||||
/**
|
||||
* Fishing Trawler
|
||||
* FISHING_TRAWLER_ACTIVITY Expected values: 0-255
|
||||
*/
|
||||
FISHING_TRAWLER_ACTIVITY(3377),
|
||||
public static final int FISHING_TRAWLER_ACTIVITY = 3377;
|
||||
|
||||
/**
|
||||
* Blast Furnace Bar Dispenser
|
||||
*
|
||||
* <p>
|
||||
* These are the expected values:
|
||||
* 0 = No bars being processed
|
||||
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
|
||||
* 2 = Bars are cooling down
|
||||
* 3 = Bars can be collected
|
||||
* 0 = No bars being processed
|
||||
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
|
||||
* 2 = Bars are cooling down
|
||||
* 3 = Bars can be collected
|
||||
*/
|
||||
BAR_DISPENSER(936),
|
||||
public static final int BAR_DISPENSER = 936;
|
||||
|
||||
/**
|
||||
* Motherlode mine sack
|
||||
*/
|
||||
SACK_NUMBER(5558),
|
||||
SACK_UPGRADED(5556),
|
||||
public static final int SACK_NUMBER = 5558;
|
||||
public static final int SACK_UPGRADED = 5556;
|
||||
|
||||
/**
|
||||
* Experience tracker
|
||||
*
|
||||
* <p>
|
||||
* EXPERIENCE_TRACKER_POSITION expected values:
|
||||
* 0 = Right
|
||||
* 1 = Middle
|
||||
* 2 = Left
|
||||
* 0 = Right
|
||||
* 1 = Middle
|
||||
* 2 = Left
|
||||
*/
|
||||
EXPERIENCE_TRACKER_POSITION(4692),
|
||||
EXPERIENCE_TRACKER_COUNTER(4697),
|
||||
EXPERIENCE_TRACKER_PROGRESS_BAR(4698),
|
||||
public static final int EXPERIENCE_TRACKER_POSITION = 4692;
|
||||
public static final int EXPERIENCE_TRACKER_COUNTER = 4697;
|
||||
public static final int EXPERIENCE_TRACKER_PROGRESS_BAR = 4698;
|
||||
|
||||
/**
|
||||
* Experience drop color
|
||||
*/
|
||||
EXPERIENCE_DROP_COLOR(4695),
|
||||
public static final int EXPERIENCE_DROP_COLOR = 4695;
|
||||
|
||||
/**
|
||||
* Tithe Farm
|
||||
*/
|
||||
TITHE_FARM_SACK_AMOUNT(4900),
|
||||
TITHE_FARM_SACK_ICON(5370),
|
||||
TITHE_FARM_POINTS(4893),
|
||||
|
||||
public static final int TITHE_FARM_SACK_AMOUNT = 4900;
|
||||
public static final int TITHE_FARM_SACK_ICON = 5370;
|
||||
public static final int TITHE_FARM_POINTS = 4893;
|
||||
|
||||
/**
|
||||
* Blast Mine
|
||||
*/
|
||||
BLAST_MINE_COAL(4924),
|
||||
BLAST_MINE_GOLD(4925),
|
||||
BLAST_MINE_MITHRIL(4926),
|
||||
BLAST_MINE_ADAMANTITE(4921),
|
||||
BLAST_MINE_RUNITE(4922),
|
||||
public static final int BLAST_MINE_COAL = 4924;
|
||||
public static final int BLAST_MINE_GOLD = 4925;
|
||||
public static final int BLAST_MINE_MITHRIL = 4926;
|
||||
public static final int BLAST_MINE_ADAMANTITE = 4921;
|
||||
public static final int BLAST_MINE_RUNITE = 4922;
|
||||
|
||||
/**
|
||||
* Raids
|
||||
*/
|
||||
IN_RAID(5432),
|
||||
TOTAL_POINTS(5431),
|
||||
PERSONAL_POINTS(5422),
|
||||
RAID_PARTY_SIZE(5424),
|
||||
public static final int IN_RAID = 5432;
|
||||
public static final int TOTAL_POINTS = 5431;
|
||||
public static final int PERSONAL_POINTS = 5422;
|
||||
public static final int RAID_PARTY_SIZE = 5424;
|
||||
|
||||
// 0 = raid not started, >0 = raid started
|
||||
RAID_STATE(5425),
|
||||
public static final int RAID_STATE = 5425;
|
||||
|
||||
/**
|
||||
* Making Friends with My Arm fire pits
|
||||
*
|
||||
* <p>
|
||||
* Expected values:
|
||||
* 0 = Not built
|
||||
* 1 = Built
|
||||
* 0 = Not built
|
||||
* 1 = Built
|
||||
*/
|
||||
FIRE_PIT_GIANT_MOLE(6532),
|
||||
FIRE_PIT_LUMBRIDGE_SWAMP(6533),
|
||||
FIRE_PIT_MOS_LE_HARMLESS(6534),
|
||||
public static final int FIRE_PIT_GIANT_MOLE = 6532;
|
||||
public static final int FIRE_PIT_LUMBRIDGE_SWAMP = 6533;
|
||||
public static final int FIRE_PIT_MOS_LE_HARMLESS = 6534;
|
||||
|
||||
/**
|
||||
* Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating
|
||||
*/
|
||||
THEATRE_OF_BLOOD(6440),
|
||||
public static final int THEATRE_OF_BLOOD = 6440;
|
||||
|
||||
/**
|
||||
* Nightmare Zone
|
||||
*/
|
||||
NMZ_ABSORPTION(3956),
|
||||
NMZ_POINTS(3949),
|
||||
public static final int NMZ_ABSORPTION = 3956;
|
||||
public static final int NMZ_POINTS = 3949;
|
||||
|
||||
/**
|
||||
* Blast Furnace
|
||||
*/
|
||||
BLAST_FURNACE_COPPER_ORE(959),
|
||||
BLAST_FURNACE_TIN_ORE(950),
|
||||
BLAST_FURNACE_IRON_ORE(951),
|
||||
BLAST_FURNACE_COAL(949),
|
||||
BLAST_FURNACE_MITHRIL_ORE(952),
|
||||
BLAST_FURNACE_ADAMANTITE_ORE(953),
|
||||
BLAST_FURNACE_RUNITE_ORE(954),
|
||||
BLAST_FURNACE_SILVER_ORE(956),
|
||||
BLAST_FURNACE_GOLD_ORE(955),
|
||||
public static final int BLAST_FURNACE_COPPER_ORE = 959;
|
||||
public static final int BLAST_FURNACE_TIN_ORE = 950;
|
||||
public static final int BLAST_FURNACE_IRON_ORE = 951;
|
||||
public static final int BLAST_FURNACE_COAL = 949;
|
||||
public static final int BLAST_FURNACE_MITHRIL_ORE = 952;
|
||||
public static final int BLAST_FURNACE_ADAMANTITE_ORE = 953;
|
||||
public static final int BLAST_FURNACE_RUNITE_ORE = 954;
|
||||
public static final int BLAST_FURNACE_SILVER_ORE = 956;
|
||||
public static final int BLAST_FURNACE_GOLD_ORE = 955;
|
||||
|
||||
BLAST_FURNACE_BRONZE_BAR(941),
|
||||
BLAST_FURNACE_IRON_BAR(942),
|
||||
BLAST_FURNACE_STEEL_BAR(943),
|
||||
BLAST_FURNACE_MITHRIL_BAR(944),
|
||||
BLAST_FURNACE_ADAMANTITE_BAR(945),
|
||||
BLAST_FURNACE_RUNITE_BAR(946),
|
||||
BLAST_FURNACE_SILVER_BAR(948),
|
||||
BLAST_FURNACE_GOLD_BAR(947),
|
||||
public static final int BLAST_FURNACE_BRONZE_BAR = 941;
|
||||
public static final int BLAST_FURNACE_IRON_BAR = 942;
|
||||
public static final int BLAST_FURNACE_STEEL_BAR = 943;
|
||||
public static final int BLAST_FURNACE_MITHRIL_BAR = 944;
|
||||
public static final int BLAST_FURNACE_ADAMANTITE_BAR = 945;
|
||||
public static final int BLAST_FURNACE_RUNITE_BAR = 946;
|
||||
public static final int BLAST_FURNACE_SILVER_BAR = 948;
|
||||
public static final int BLAST_FURNACE_GOLD_BAR = 947;
|
||||
|
||||
BLAST_FURNACE_COFFER(5357),
|
||||
public static final int BLAST_FURNACE_COFFER = 5357;
|
||||
|
||||
/**
|
||||
* Pyramid plunder
|
||||
*/
|
||||
PYRAMID_PLUNDER_ROOM_LOCATION(2365),
|
||||
PYRAMID_PLUNDER_TIMER(2375),
|
||||
PYRAMID_PLUNDER_THIEVING_LEVEL(2376),
|
||||
PYRAMID_PLUNDER_ROOM(2377),
|
||||
public static final int PYRAMID_PLUNDER_ROOM_LOCATION = 2365;
|
||||
public static final int PYRAMID_PLUNDER_TIMER = 2375;
|
||||
public static final int PYRAMID_PLUNDER_THIEVING_LEVEL = 2376;
|
||||
public static final int PYRAMID_PLUNDER_ROOM = 2377;
|
||||
|
||||
/**
|
||||
* Barrows
|
||||
*/
|
||||
BARROWS_KILLED_AHRIM(457),
|
||||
BARROWS_KILLED_DHAROK(458),
|
||||
BARROWS_KILLED_GUTHAN(459),
|
||||
BARROWS_KILLED_KARIL(460),
|
||||
BARROWS_KILLED_TORAG(461),
|
||||
BARROWS_KILLED_VERAC(462),
|
||||
BARROWS_REWARD_POTENTIAL(463),
|
||||
BARROWS_NPCS_SLAIN(464),
|
||||
public static final int BARROWS_KILLED_AHRIM = 457;
|
||||
public static final int BARROWS_KILLED_DHAROK = 458;
|
||||
public static final int BARROWS_KILLED_GUTHAN = 459;
|
||||
public static final int BARROWS_KILLED_KARIL = 460;
|
||||
public static final int BARROWS_KILLED_TORAG = 461;
|
||||
public static final int BARROWS_KILLED_VERAC = 462;
|
||||
public static final int BARROWS_REWARD_POTENTIAL = 463;
|
||||
public static final int BARROWS_NPCS_SLAIN = 464;
|
||||
|
||||
/**
|
||||
* Spicy stew ingredients
|
||||
*/
|
||||
SPICY_STEW_RED_SPICES(1879),
|
||||
SPICY_STEW_YELLOW_SPICES(1880),
|
||||
SPICY_STEW_BROWN_SPICES(1881),
|
||||
SPICY_STEW_ORANGE_SPICES(1882),
|
||||
public static final int SPICY_STEW_RED_SPICES = 1879;
|
||||
public static final int SPICY_STEW_YELLOW_SPICES = 1880;
|
||||
public static final int SPICY_STEW_BROWN_SPICES = 1881;
|
||||
public static final int SPICY_STEW_ORANGE_SPICES = 1882;
|
||||
|
||||
/**
|
||||
* Multicombat area
|
||||
*/
|
||||
MULTICOMBAT_AREA(4605),
|
||||
public static final int MULTICOMBAT_AREA = 4605;
|
||||
|
||||
/**
|
||||
* Kingdom of Miscellania Management
|
||||
* Kingdom Approval is represented as a 7-bit unsigned integer; 127 corresponds to 100% approval
|
||||
*/
|
||||
KINGDOM_APPROVAL(72),
|
||||
KINGDOM_COFFER(74),
|
||||
public static final int KINGDOM_APPROVAL = 72;
|
||||
public static final int KINGDOM_COFFER = 74;
|
||||
|
||||
/**
|
||||
* The Hand in the Sand quest status
|
||||
*/
|
||||
QUEST_THE_HAND_IN_THE_SAND(1527),
|
||||
public static final int QUEST_THE_HAND_IN_THE_SAND = 1527;
|
||||
|
||||
/**
|
||||
* Daily Tasks (Collection availability)
|
||||
* Daily Tasks =Collection availability)
|
||||
*/
|
||||
DAILY_HERB_BOXES_COLLECTED(3961),
|
||||
DAILY_STAVES_COLLECTED(4539),
|
||||
DAILY_ESSENCE_COLLECTED(4547),
|
||||
DAILY_RUNES_COLLECTED(4540),
|
||||
DAILY_SAND_COLLECTED(4549),
|
||||
DAILY_FLAX_STATE(4559),
|
||||
DAILY_ARROWS_STATE(4563),
|
||||
public static final int DAILY_HERB_BOXES_COLLECTED = 3961;
|
||||
public static final int DAILY_STAVES_COLLECTED = 4539;
|
||||
public static final int DAILY_ESSENCE_COLLECTED = 4547;
|
||||
public static final int DAILY_RUNES_COLLECTED = 4540;
|
||||
public static final int DAILY_SAND_COLLECTED = 4549;
|
||||
public static final int DAILY_FLAX_STATE = 4559;
|
||||
public static final int DAILY_ARROWS_STATE = 4563;
|
||||
/**
|
||||
* This varbit tracks how much bonemeal has been redeemed from Robin
|
||||
* The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39
|
||||
*/
|
||||
DAILY_BONEMEAL_STATE(4543),
|
||||
*/
|
||||
public static final int DAILY_BONEMEAL_STATE = 4543;
|
||||
|
||||
DAILY_DYNAMITE_COLLECTED(7939),
|
||||
public static final int DAILY_DYNAMITE_COLLECTED = 7939;
|
||||
|
||||
/**
|
||||
* Fairy Ring
|
||||
*/
|
||||
FAIR_RING_LAST_DESTINATION(5374),
|
||||
FAIRY_RING_DIAL_ADCB(3985), //Left dial
|
||||
FAIRY_RIGH_DIAL_ILJK(3986), //Middle dial
|
||||
FAIRY_RING_DIAL_PSRQ(3987), //Right dial
|
||||
public static final int FAIR_RING_LAST_DESTINATION = 5374;
|
||||
public static final int FAIRY_RING_DIAL_ADCB = 3985; //Left dial
|
||||
public static final int FAIRY_RIGH_DIAL_ILJK = 3986; //Middle dial
|
||||
public static final int FAIRY_RING_DIAL_PSRQ = 3987; //Right dial
|
||||
|
||||
/**
|
||||
* Transmog controllers for farming
|
||||
*/
|
||||
FARMING_4771(4771),
|
||||
FARMING_4772(4772),
|
||||
FARMING_4773(4773),
|
||||
FARMING_4774(4774),
|
||||
FARMING_4775(4775),
|
||||
FARMING_7904(7904),
|
||||
FARMING_7905(7905),
|
||||
FARMING_7906(7906),
|
||||
FARMING_7907(7907),
|
||||
FARMING_7908(7908),
|
||||
FARMING_7909(7909),
|
||||
FARMING_7910(7910),
|
||||
FARMING_7911(7911),
|
||||
FARMING_7912(7912),
|
||||
public static final int FARMING_4771 = 4771;
|
||||
public static final int FARMING_4772 = 4772;
|
||||
public static final int FARMING_4773 = 4773;
|
||||
public static final int FARMING_4774 = 4774;
|
||||
public static final int FARMING_4775 = 4775;
|
||||
public static final int FARMING_7904 = 7904;
|
||||
public static final int FARMING_7905 = 7905;
|
||||
public static final int FARMING_7906 = 7906;
|
||||
public static final int FARMING_7907 = 7907;
|
||||
public static final int FARMING_7908 = 7908;
|
||||
public static final int FARMING_7909 = 7909;
|
||||
public static final int FARMING_7910 = 7910;
|
||||
public static final int FARMING_7911 = 7911;
|
||||
public static final int FARMING_7912 = 7912;
|
||||
|
||||
/**
|
||||
* Transmog controllers for grapes
|
||||
*/
|
||||
GRAPES_4953(4953),
|
||||
GRAPES_4954(4954),
|
||||
GRAPES_4955(4955),
|
||||
GRAPES_4956(4956),
|
||||
GRAPES_4957(4957),
|
||||
GRAPES_4958(4958),
|
||||
GRAPES_4959(4959),
|
||||
GRAPES_4960(4960),
|
||||
GRAPES_4961(4961),
|
||||
GRAPES_4962(4962),
|
||||
GRAPES_4963(4963),
|
||||
GRAPES_4964(4964),
|
||||
public static final int GRAPES_4953 = 4953;
|
||||
public static final int GRAPES_4954 = 4954;
|
||||
public static final int GRAPES_4955 = 4955;
|
||||
public static final int GRAPES_4956 = 4956;
|
||||
public static final int GRAPES_4957 = 4957;
|
||||
public static final int GRAPES_4958 = 4958;
|
||||
public static final int GRAPES_4959 = 4959;
|
||||
public static final int GRAPES_4960 = 4960;
|
||||
public static final int GRAPES_4961 = 4961;
|
||||
public static final int GRAPES_4962 = 4962;
|
||||
public static final int GRAPES_4963 = 4963;
|
||||
public static final int GRAPES_4964 = 4964;
|
||||
|
||||
/**
|
||||
* Automatically weed farming patches
|
||||
*/
|
||||
AUTOWEED(5557),
|
||||
public static final int AUTOWEED = 5557;
|
||||
|
||||
/**
|
||||
* The varbit that stores the players {@code AccountType}.
|
||||
*/
|
||||
ACCOUNT_TYPE(1777),
|
||||
public static final int ACCOUNT_TYPE = 1777;
|
||||
|
||||
/**
|
||||
* The varbit that stores the oxygen percentage for player
|
||||
*/
|
||||
OXYGEN_LEVEL(5811),
|
||||
public static final int OXYGEN_LEVEL = 5811;
|
||||
|
||||
/**
|
||||
* Drift net status
|
||||
*
|
||||
* <p>
|
||||
* Expected values
|
||||
* 0 = Unset
|
||||
* 1 = Set up
|
||||
* 2 = Caught some fish
|
||||
* 3 = Full
|
||||
* 0 = Unset
|
||||
* 1 = Set up
|
||||
* 2 = Caught some fish
|
||||
* 3 = Full
|
||||
*/
|
||||
NORTH_NET_STATUS(5812),
|
||||
SOUTH_NET_STATUS(5814),
|
||||
public static final int NORTH_NET_STATUS = 5812;
|
||||
public static final int SOUTH_NET_STATUS = 5814;
|
||||
|
||||
/**
|
||||
* Drift net catch count
|
||||
*/
|
||||
NORTH_NET_CATCH_COUNT(5813),
|
||||
SOUTH_NET_CATCH_COUNT(5815),
|
||||
public static final int NORTH_NET_CATCH_COUNT = 5813;
|
||||
public static final int SOUTH_NET_CATCH_COUNT = 5815;
|
||||
|
||||
/**
|
||||
* Drift net collect interface
|
||||
*
|
||||
* <p>
|
||||
* Expected values:
|
||||
* 0 = Not open
|
||||
* 1 = North interface open
|
||||
* 2 = South interface open
|
||||
* 0 = Not open
|
||||
* 1 = North interface open
|
||||
* 2 = South interface open
|
||||
*/
|
||||
DRIFT_NET_COLLECT(5933),
|
||||
public static final int DRIFT_NET_COLLECT = 5933;
|
||||
|
||||
/**
|
||||
* Corp beast damage
|
||||
*/
|
||||
CORP_DAMAGE(999),
|
||||
public static final int CORP_DAMAGE = 999;
|
||||
|
||||
/**
|
||||
* Toggleable slayer unlocks
|
||||
*/
|
||||
SUPERIOR_ENABLED(5362),
|
||||
FOSSIL_ISLAND_WYVERN_DISABLE(6251),
|
||||
public static final int SUPERIOR_ENABLED = 5362;
|
||||
public static final int FOSSIL_ISLAND_WYVERN_DISABLE = 6251;
|
||||
|
||||
BANK_REARRANGE_MODE(3959),
|
||||
CURRENT_BANK_TAB(4150),
|
||||
public static final int BANK_REARRANGE_MODE = 3959;
|
||||
public static final int CURRENT_BANK_TAB = 4150;
|
||||
|
||||
WORLDHOPPER_FAVROITE_1(4597),
|
||||
WORLDHOPPER_FAVROITE_2(4598),
|
||||
public static final int WORLDHOPPER_FAVROITE_1 = 4597;
|
||||
public static final int WORLDHOPPER_FAVROITE_2 = 4598;
|
||||
|
||||
/**
|
||||
* Vengeance is active
|
||||
*/
|
||||
VENGEANCE_ACTIVE(2450),
|
||||
public static final int VENGEANCE_ACTIVE = 2450;
|
||||
|
||||
/**
|
||||
* Spell cooldowns
|
||||
*/
|
||||
VENGEANCE_COOLDOWN(2451),
|
||||
CORRUPTION_COOLDOWN(12288),
|
||||
public static final int VENGEANCE_COOLDOWN = 2451;
|
||||
public static final int CORRUPTION_COOLDOWN = 12288;
|
||||
|
||||
/**
|
||||
* Imbued Heart cooldown
|
||||
* Number of game tick remaining on cooldown in intervals of 10; for a value X there are 10 * X game ticks remaining.
|
||||
* The heart regains its power once this reaches 0.
|
||||
*/
|
||||
IMBUED_HEART_COOLDOWN(5361),
|
||||
public static final int IMBUED_HEART_COOLDOWN = 5361;
|
||||
|
||||
/**
|
||||
* Amount of items in each bank tab
|
||||
*/
|
||||
BANK_TAB_ONE_COUNT(4171),
|
||||
BANK_TAB_TWO_COUNT(4172),
|
||||
BANK_TAB_THREE_COUNT(4173),
|
||||
BANK_TAB_FOUR_COUNT(4174),
|
||||
BANK_TAB_FIVE_COUNT(4175),
|
||||
BANK_TAB_SIX_COUNT(4176),
|
||||
BANK_TAB_SEVEN_COUNT(4177),
|
||||
BANK_TAB_EIGHT_COUNT(4178),
|
||||
BANK_TAB_NINE_COUNT(4179),
|
||||
public static final int BANK_TAB_ONE_COUNT = 4171;
|
||||
public static final int BANK_TAB_TWO_COUNT = 4172;
|
||||
public static final int BANK_TAB_THREE_COUNT = 4173;
|
||||
public static final int BANK_TAB_FOUR_COUNT = 4174;
|
||||
public static final int BANK_TAB_FIVE_COUNT = 4175;
|
||||
public static final int BANK_TAB_SIX_COUNT = 4176;
|
||||
public static final int BANK_TAB_SEVEN_COUNT = 4177;
|
||||
public static final int BANK_TAB_EIGHT_COUNT = 4178;
|
||||
public static final int BANK_TAB_NINE_COUNT = 4179;
|
||||
|
||||
/**
|
||||
* Type of GE offer currently being created
|
||||
* 0 = buy
|
||||
* 1 = sell
|
||||
*/
|
||||
GE_OFFER_CREATION_TYPE(4397),
|
||||
public static final int GE_OFFER_CREATION_TYPE = 4397;
|
||||
|
||||
/**
|
||||
* The active tab within the quest interface
|
||||
*/
|
||||
QUEST_TAB(8168),
|
||||
public static final int QUEST_TAB = 8168;
|
||||
|
||||
/**
|
||||
* Explorer ring
|
||||
*/
|
||||
EXPLORER_RING_ALCHTYPE(5398),
|
||||
EXPLORER_RING_TELEPORTS(4552),
|
||||
EXPLORER_RING_ALCHS(4554),
|
||||
EXPLORER_RING_RUNENERGY(4553),
|
||||
public static final int EXPLORER_RING_ALCHTYPE = 5398;
|
||||
public static final int EXPLORER_RING_TELEPORTS = 4552;
|
||||
public static final int EXPLORER_RING_ALCHS = 4554;
|
||||
public static final int EXPLORER_RING_RUNENERGY = 4553;
|
||||
|
||||
WINTERTODT_TIMER(7980),
|
||||
public static final int WINTERTODT_TIMER = 7980;
|
||||
|
||||
/**
|
||||
* League relics
|
||||
*/
|
||||
LEAGUE_RELIC_1(10049),
|
||||
LEAGUE_RELIC_2(10050),
|
||||
LEAGUE_RELIC_3(10051),
|
||||
LEAGUE_RELIC_4(10052),
|
||||
LEAGUE_RELIC_5(10053),
|
||||
LEAGUE_RELIC_6(11696),
|
||||
public static final int LEAGUE_RELIC_1 = 10049;
|
||||
public static final int LEAGUE_RELIC_2 = 10050;
|
||||
public static final int LEAGUE_RELIC_3 = 10051;
|
||||
public static final int LEAGUE_RELIC_4 = 10052;
|
||||
public static final int LEAGUE_RELIC_5 = 10053;
|
||||
public static final int LEAGUE_RELIC_6 = 11696;
|
||||
|
||||
/**
|
||||
* Muted volume restore values
|
||||
*/
|
||||
MUTED_MUSIC_VOLUME(9666),
|
||||
MUTED_SOUND_EFFECT_VOLUME(9674),
|
||||
MUTED_AREA_EFFECT_VOLUME(9675),
|
||||
public static final int MUTED_MUSIC_VOLUME = 9666;
|
||||
public static final int MUTED_SOUND_EFFECT_VOLUME = 9674;
|
||||
public static final int MUTED_AREA_EFFECT_VOLUME = 9675;
|
||||
|
||||
/**
|
||||
* Parasite infection status during nightmare of ashihama bossfight
|
||||
*
|
||||
* <p>
|
||||
* 0 = not infected
|
||||
* 1 = infected
|
||||
*
|
||||
*/
|
||||
PARASITE(10151),
|
||||
public static final int PARASITE = 10151;
|
||||
|
||||
/**
|
||||
* Whether the vanilla wiki entity lookup is displayed under the minimap
|
||||
*
|
||||
* <p>
|
||||
* 0 = Enabled
|
||||
* 1 = Disabled
|
||||
*
|
||||
*/
|
||||
WIKI_ENTITY_LOOKUP(10113),
|
||||
public static final int WIKI_ENTITY_LOOKUP = 10113;
|
||||
|
||||
/**
|
||||
* Whether the Special Attack orb is disabled due to being in a PvP area
|
||||
*
|
||||
* 0 = Enabled (player is not in PvP)
|
||||
* 1 = Disabled (player in in PvP)
|
||||
* <p>
|
||||
* 0 = Enabled =player is not in PvP)
|
||||
* 1 = Disabled =player in in PvP)
|
||||
*
|
||||
* @see <a href="https://oldschool.runescape.wiki/w/Minimap#Special_attack_orb">The OSRS Wiki's Minimap page</a>
|
||||
*/
|
||||
PVP_SPEC_ORB(8121),
|
||||
public static final int PVP_SPEC_ORB = 8121;
|
||||
|
||||
/**
|
||||
* Collection Log notification settings whenever a new item is added
|
||||
*
|
||||
* <p>
|
||||
* 0 = no notification
|
||||
* 1 = chat notification only
|
||||
* 2 = popup notification only
|
||||
* 3 = chat and popup
|
||||
*/
|
||||
COLLECTION_LOG_NOTIFICATION(11959),
|
||||
public static final int COLLECTION_LOG_NOTIFICATION = 11959;
|
||||
|
||||
/**
|
||||
* Combat Achievements popup settings whenever a new task is completed
|
||||
*
|
||||
* <p>
|
||||
* 0 = popup notification enabled
|
||||
* 1 = popup notification disabled
|
||||
*/
|
||||
COMBAT_ACHIEVEMENTS_POPUP(12455),
|
||||
public static final int COMBAT_ACHIEVEMENTS_POPUP = 12455;
|
||||
|
||||
/**
|
||||
* Show boss health overlay setting
|
||||
* 0 = on
|
||||
* 1 = off
|
||||
*/
|
||||
BOSS_HEALTH_OVERLAY(12389),
|
||||
public static final int BOSS_HEALTH_OVERLAY = 12389;
|
||||
|
||||
/**
|
||||
* Whether the PVP kill-death stats widget should be drawn while in the wilderness or in PVP worlds.
|
||||
*
|
||||
* <p>
|
||||
* 0 = Disabled
|
||||
* 1 = Enabled
|
||||
*/
|
||||
SHOW_PVP_KDR_STATS(4143),
|
||||
;
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
*/
|
||||
private final int id;
|
||||
public static final int SHOW_PVP_KDR_STATS = 4143;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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.annotations;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import net.runelite.api.Varbits;
|
||||
import org.intellij.lang.annotations.MagicConstant;
|
||||
|
||||
@MagicConstant(valuesFromClass = Varbits.class)
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Varbit
|
||||
{
|
||||
}
|
||||
@@ -136,6 +136,12 @@
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>23.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JOGL -->
|
||||
<dependency>
|
||||
|
||||
@@ -28,6 +28,7 @@ import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
@@ -37,7 +38,6 @@ public class FavourRequirement implements Requirement
|
||||
* An enumeration of Kourend house favour the player can earn.
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum Favour
|
||||
{
|
||||
ARCEUUS("Arceuus", Varbits.KOUREND_FAVOR_ARCEUUS),
|
||||
@@ -46,8 +46,10 @@ public class FavourRequirement implements Requirement
|
||||
PISCARILIUS("Piscarilius", Varbits.KOUREND_FAVOR_PISCARILIUS),
|
||||
SHAYZIEN("Shayzien", Varbits.KOUREND_FAVOR_SHAYZIEN);
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
private final Varbits varbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int varbit;
|
||||
}
|
||||
|
||||
private final Favour house;
|
||||
|
||||
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.barrows;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@@ -42,5 +43,6 @@ enum BarrowsBrothers
|
||||
|
||||
private final String name;
|
||||
private final WorldPoint location;
|
||||
private final Varbits killedVarbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int killedVarbit;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
@@ -51,6 +52,7 @@ enum BarsOres
|
||||
SILVER_BAR(Varbits.BLAST_FURNACE_SILVER_BAR, ItemID.SILVER_BAR),
|
||||
GOLD_BAR(Varbits.BLAST_FURNACE_GOLD_BAR, ItemID.GOLD_BAR);
|
||||
|
||||
private final Varbits varbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int varbit;
|
||||
private final int itemID;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ClueScrollOverlay extends OverlayPanel
|
||||
}
|
||||
|
||||
if (clue.isRequiresLight()
|
||||
&& ((clue.getHasFirePit() == null || client.getVar(clue.getHasFirePit()) != 1)
|
||||
&& ((clue.getFirePitVarbitId() == -1 || client.getVar(clue.getFirePitVarbitId()) != 1)
|
||||
&& (inventoryItems == null || !HAS_LIGHT.fulfilledBy(inventoryItems))
|
||||
&& (equippedItems == null || !HAS_LIGHT.fulfilledBy(equippedItems))))
|
||||
{
|
||||
|
||||
@@ -145,10 +145,10 @@ public class ClueScrollPlugin extends Plugin
|
||||
private static final Color HIGHLIGHT_HOVER_BORDER_COLOR = HIGHLIGHT_BORDER_COLOR.darker();
|
||||
private static final Color HIGHLIGHT_FILL_COLOR = new Color(0, 255, 0, 20);
|
||||
private static final String CLUE_TAG_NAME = "clue";
|
||||
private static final Varbits[] RUNEPOUCH_AMOUNT_VARBITS = {
|
||||
private static final int[] RUNEPOUCH_AMOUNT_VARBITS = {
|
||||
Varbits.RUNE_POUCH_AMOUNT1, Varbits.RUNE_POUCH_AMOUNT2, Varbits.RUNE_POUCH_AMOUNT3
|
||||
};
|
||||
private static final Varbits[] RUNEPOUCH_RUNE_VARBITS = {
|
||||
private static final int[] RUNEPOUCH_RUNE_VARBITS = {
|
||||
Varbits.RUNE_POUCH_RUNE1, Varbits.RUNE_POUCH_RUNE2, Varbits.RUNE_POUCH_RUNE3
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.awt.Graphics2D;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
@@ -43,8 +43,8 @@ public abstract class ClueScroll
|
||||
private boolean requiresLight;
|
||||
|
||||
@Setter(AccessLevel.PROTECTED)
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private Varbits hasFirePit;
|
||||
@Getter(onMethod_ = {@Varbit}, value = AccessLevel.PUBLIC)
|
||||
private int firePitVarbitId = -1;
|
||||
|
||||
@Setter(AccessLevel.PROTECTED)
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
|
||||
@@ -32,14 +32,21 @@ import javax.annotation.Nullable;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.ANCIENT_WIZARDS;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.ARMADYLEAN_GUARD;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.ARMADYLEAN_OR_BANDOSIAN_GUARD;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.BANDOSIAN_GUARD;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.BRASSICAN_MAGE;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.SARADOMIN_WIZARD;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.ZAMORAK_WIZARD;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.*;
|
||||
|
||||
@Getter
|
||||
public class CoordinateClue extends ClueScroll implements TextClueScroll, LocationClueScroll
|
||||
@@ -49,7 +56,8 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
||||
{
|
||||
private final String directions;
|
||||
private final boolean lightRequired;
|
||||
private final Varbits lightSource;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int lightSourceVarbitId;
|
||||
private final Enemy enemy;
|
||||
|
||||
private CoordinateClueInfo(@NonNull String directions)
|
||||
@@ -62,15 +70,15 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
||||
this.directions = directions;
|
||||
this.enemy = enemy;
|
||||
this.lightRequired = false;
|
||||
this.lightSource = null;
|
||||
this.lightSourceVarbitId = -1;
|
||||
}
|
||||
|
||||
private CoordinateClueInfo(@Nonnull String directions, Enemy enemy, boolean lightRequired, Varbits lightSource)
|
||||
private CoordinateClueInfo(@Nonnull String directions, Enemy enemy, boolean lightRequired, @Varbit int lightSourceVarbitId)
|
||||
{
|
||||
this.directions = directions;
|
||||
this.enemy = enemy;
|
||||
this.lightRequired = lightRequired;
|
||||
this.lightSource = lightSource;
|
||||
this.lightSourceVarbitId = lightSourceVarbitId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +265,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
||||
final CoordinateClueInfo clueInfo = CLUES.get(location);
|
||||
if (clueInfo != null)
|
||||
{
|
||||
setHasFirePit(clueInfo.getLightSource());
|
||||
setFirePitVarbitId(clueInfo.getLightSourceVarbitId());
|
||||
setRequiresLight(clueInfo.lightRequired);
|
||||
setEnemy(clueInfo.getEnemy());
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import static net.runelite.api.ItemID.*;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.ScriptID;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
|
||||
@@ -253,11 +254,11 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
||||
this.itemRequirements = itemRequirements;
|
||||
}
|
||||
|
||||
private EmoteClue(String text, String locationName, @Nullable STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Nonnull Varbits firePit, @Nonnull ItemRequirement... itemRequirements)
|
||||
private EmoteClue(String text, String locationName, @Nullable STASHUnit stashUnit, WorldPoint location, Emote firstEmote, Emote secondEmote, @Varbit int firePitVarbitId, @Nonnull ItemRequirement... itemRequirements)
|
||||
{
|
||||
this(text, locationName, stashUnit, location, firstEmote, secondEmote, itemRequirements);
|
||||
setRequiresLight(true);
|
||||
setHasFirePit(firePit);
|
||||
setFirePitVarbitId(firePitVarbitId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
package net.runelite.client.plugins.devtools;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.inject.Inject;
|
||||
import java.awt.BorderLayout;
|
||||
@@ -32,6 +33,7 @@ import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.event.AdjustmentEvent;
|
||||
import java.awt.event.AdjustmentListener;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -45,6 +47,7 @@ import javax.swing.JScrollPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.border.CompoundBorder;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.IndexDataBase;
|
||||
import net.runelite.api.VarClientInt;
|
||||
@@ -62,6 +65,7 @@ import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.DynamicGridLayout;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
@Slf4j
|
||||
class VarInspector extends DevToolsFrame
|
||||
{
|
||||
@Getter
|
||||
@@ -84,6 +88,26 @@ class VarInspector extends DevToolsFrame
|
||||
|
||||
private final static int MAX_LOG_ENTRIES = 10_000;
|
||||
private static final int VARBITS_ARCHIVE_ID = 14;
|
||||
private static final Map<Integer, String> VARBIT_NAMES;
|
||||
|
||||
static
|
||||
{
|
||||
ImmutableMap.Builder<Integer, String> builder = new ImmutableMap.Builder<>();
|
||||
|
||||
try
|
||||
{
|
||||
for (Field f : Varbits.class.getDeclaredFields())
|
||||
{
|
||||
builder.put(f.getInt(null), f.getName());
|
||||
}
|
||||
}
|
||||
catch (IllegalAccessException ex)
|
||||
{
|
||||
log.error("error setting up varbit names", ex);
|
||||
}
|
||||
|
||||
VARBIT_NAMES = builder.build();
|
||||
}
|
||||
|
||||
private final Client client;
|
||||
private final ClientThread clientThread;
|
||||
@@ -218,15 +242,7 @@ class VarInspector extends DevToolsFrame
|
||||
// Example: 4101 collides with 4104-4129
|
||||
client.setVarbitValue(oldVarps2, i, neew);
|
||||
|
||||
String name = Integer.toString(i);
|
||||
for (Varbits varbit : Varbits.values())
|
||||
{
|
||||
if (varbit.getId() == i)
|
||||
{
|
||||
name = String.format("%s(%d)", varbit.name(), i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
final String name = VARBIT_NAMES.getOrDefault(i, Integer.toString(i));
|
||||
addVarLog(VarType.VARBIT, name, old, neew);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,11 @@ package net.runelite.client.plugins.driftnet;
|
||||
|
||||
import java.util.Set;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.GameObject;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@Data
|
||||
@@ -38,8 +39,10 @@ import net.runelite.api.coords.WorldPoint;
|
||||
class DriftNet
|
||||
{
|
||||
private final int objectId;
|
||||
private final Varbits statusVarbit;
|
||||
private final Varbits countVarbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int statusVarbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int countVarbit;
|
||||
private final Set<WorldPoint> adjacentTiles;
|
||||
|
||||
private GameObject net;
|
||||
|
||||
@@ -199,7 +199,7 @@ public class HerbiboarPlugin extends Plugin
|
||||
{
|
||||
for (TrailToSpot trail : spot.getTrails())
|
||||
{
|
||||
int value = client.getVar(trail.getVarbit());
|
||||
int value = client.getVar(trail.getVarbitId());
|
||||
|
||||
if (value == trail.getValue())
|
||||
{
|
||||
|
||||
@@ -27,8 +27,9 @@ package net.runelite.client.plugins.herbiboars;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.Value;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
|
||||
/**
|
||||
* A representation of a trail of footsteps which appears when hunting for the Herbiboar.
|
||||
@@ -42,9 +43,10 @@ class TrailToSpot
|
||||
* equal to that of {@link TrailToSpot#getValue()}. Once the next object along the trail has been searched, this
|
||||
* Varbit's value will be greater than that of {@link TrailToSpot#getValue()}.
|
||||
*/
|
||||
private final Varbits varbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int varbitId;
|
||||
/**
|
||||
* The cutoff reference value to compare against the value of {@link TrailToSpot#getVarbit()} to determine its state
|
||||
* The cutoff reference value to compare against the value of {@link TrailToSpot#getVarbitId()} ()} to determine its state
|
||||
* along the current trail.
|
||||
*/
|
||||
private final int value;
|
||||
|
||||
@@ -59,6 +59,7 @@ import net.runelite.api.StructID;
|
||||
import net.runelite.api.VarClientInt;
|
||||
import net.runelite.api.VarPlayer;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.events.AreaSoundEffectPlayed;
|
||||
import net.runelite.api.events.BeforeRender;
|
||||
import net.runelite.api.events.ClientTick;
|
||||
@@ -783,7 +784,8 @@ public class MusicPlugin extends Plugin
|
||||
@Getter
|
||||
private final String name;
|
||||
private final VarPlayer var;
|
||||
private final Varbits mutedVar;
|
||||
@Varbit
|
||||
private final int mutedVarbitId;
|
||||
private final IntSupplier getter;
|
||||
private final Consumer<Integer> setter;
|
||||
private final IntConsumer volumeChanger;
|
||||
@@ -797,14 +799,14 @@ public class MusicPlugin extends Plugin
|
||||
private Slider windowSlider;
|
||||
|
||||
Channel(String name,
|
||||
VarPlayer var, Varbits mutedVar,
|
||||
VarPlayer var, @Varbit int mutedVarbitId,
|
||||
IntSupplier getter, Consumer<Integer> setter,
|
||||
IntConsumer volumeChanger, int max,
|
||||
WidgetInfo sideRoot)
|
||||
{
|
||||
this.name = name;
|
||||
this.var = var;
|
||||
this.mutedVar = mutedVar;
|
||||
this.mutedVarbitId = mutedVarbitId;
|
||||
this.getter = getter;
|
||||
this.setter = setter;
|
||||
this.volumeChanger = volumeChanger;
|
||||
@@ -824,7 +826,7 @@ public class MusicPlugin extends Plugin
|
||||
int raw = client.getVar(var);
|
||||
if (raw == 0)
|
||||
{
|
||||
raw = -client.getVar(mutedVar);
|
||||
raw = -client.getVar(mutedVarbitId);
|
||||
}
|
||||
value = raw * this.max / 100;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.game.RunepouchRune;
|
||||
@@ -47,12 +48,10 @@ import net.runelite.client.util.ColorUtil;
|
||||
|
||||
public class RunepouchOverlay extends WidgetItemOverlay
|
||||
{
|
||||
private static final Varbits[] AMOUNT_VARBITS =
|
||||
{
|
||||
private static final int[] AMOUNT_VARBITS = {
|
||||
Varbits.RUNE_POUCH_AMOUNT1, Varbits.RUNE_POUCH_AMOUNT2, Varbits.RUNE_POUCH_AMOUNT3
|
||||
};
|
||||
private static final Varbits[] RUNE_VARBITS =
|
||||
{
|
||||
private static final int[] RUNE_VARBITS = {
|
||||
Varbits.RUNE_POUCH_RUNE1, Varbits.RUNE_POUCH_RUNE2, Varbits.RUNE_POUCH_RUNE3
|
||||
};
|
||||
private static final Dimension IMAGE_SIZE = new Dimension(11, 11);
|
||||
@@ -60,16 +59,15 @@ public class RunepouchOverlay extends WidgetItemOverlay
|
||||
private final Client client;
|
||||
private final RunepouchConfig config;
|
||||
private final TooltipManager tooltipManager;
|
||||
private final ItemManager itemManager;
|
||||
|
||||
@Inject
|
||||
private ItemManager itemManager;
|
||||
|
||||
@Inject
|
||||
RunepouchOverlay(Client client, RunepouchConfig config, TooltipManager tooltipManager)
|
||||
RunepouchOverlay(Client client, RunepouchConfig config, TooltipManager tooltipManager, ItemManager itemManager)
|
||||
{
|
||||
this.tooltipManager = tooltipManager;
|
||||
this.client = client;
|
||||
this.config = config;
|
||||
this.itemManager = itemManager;
|
||||
showOnInventory();
|
||||
showOnBank();
|
||||
}
|
||||
@@ -91,15 +89,14 @@ public class RunepouchOverlay extends WidgetItemOverlay
|
||||
|
||||
for (int i = 0; i < AMOUNT_VARBITS.length; i++)
|
||||
{
|
||||
Varbits amountVarbit = AMOUNT_VARBITS[i];
|
||||
|
||||
@Varbit int amountVarbit = AMOUNT_VARBITS[i];
|
||||
int amount = client.getVar(amountVarbit);
|
||||
if (amount <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Varbits runeVarbit = RUNE_VARBITS[i];
|
||||
@Varbit int runeVarbit = RUNE_VARBITS[i];
|
||||
int runeId = client.getVar(runeVarbit);
|
||||
RunepouchRune rune = RunepouchRune.getRune(runeId);
|
||||
if (rune == null)
|
||||
|
||||
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.slayer;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.VarPlayer;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
|
||||
/**
|
||||
* Unlockables in the slayer interface
|
||||
@@ -87,17 +88,19 @@ enum SlayerUnlock
|
||||
VAMPYRE_EXTEND(49),
|
||||
VAMPYRE_UNLOCK(50);
|
||||
|
||||
private final Varbits toggleVarbit;
|
||||
@Varbit
|
||||
private final int toggleVarbit;
|
||||
|
||||
SlayerUnlock(int index)
|
||||
{
|
||||
this(index, null);
|
||||
assert index == ordinal();
|
||||
this.toggleVarbit = -1;
|
||||
}
|
||||
|
||||
SlayerUnlock(int index, Varbits toggleVarbit)
|
||||
SlayerUnlock(int index, @Varbit int varbit)
|
||||
{
|
||||
assert index == ordinal();
|
||||
this.toggleVarbit = toggleVarbit;
|
||||
this.toggleVarbit = varbit;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +119,7 @@ enum SlayerUnlock
|
||||
{
|
||||
if (isOwned(client))
|
||||
{
|
||||
if (toggleVarbit == null)
|
||||
if (toggleVarbit == -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.annotations.Varbit;
|
||||
import net.runelite.client.plugins.timetracking.TimeTrackingConfig;
|
||||
|
||||
@RequiredArgsConstructor(
|
||||
@@ -40,16 +40,17 @@ class FarmingPatch
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private FarmingRegion region;
|
||||
private final String name;
|
||||
private final Varbits varbit;
|
||||
@Getter(onMethod_ = {@Varbit})
|
||||
private final int varbit;
|
||||
private final PatchImplementation implementation;
|
||||
|
||||
String configKey()
|
||||
{
|
||||
return region.getRegionID() + "." + varbit.getId();
|
||||
return region.getRegionID() + "." + varbit;
|
||||
}
|
||||
|
||||
String notifyConfigKey()
|
||||
{
|
||||
return TimeTrackingConfig.NOTIFY + "." + region.getRegionID() + "." + varbit.getId();
|
||||
return TimeTrackingConfig.NOTIFY + "." + region.getRegionID() + "." + varbit;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class FarmingTracker
|
||||
for (FarmingPatch patch : region.getPatches())
|
||||
{
|
||||
// Write the config value if it doesn't match what is current, or it is more than 5 minutes old
|
||||
Varbits varbit = patch.getVarbit();
|
||||
int varbit = patch.getVarbit();
|
||||
String key = patch.configKey();
|
||||
String strVarbit = Integer.toString(client.getVar(varbit));
|
||||
String storedValue = configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, key);
|
||||
|
||||
@@ -454,7 +454,6 @@ public class TimersPluginTest
|
||||
public void testCorruptionCooldown()
|
||||
{
|
||||
when(timersConfig.showArceuusCooldown()).thenReturn(true);
|
||||
when(client.getVar(any(Varbits.class))).thenReturn(0);
|
||||
when(client.getVar(Varbits.CORRUPTION_COOLDOWN)).thenReturn(1);
|
||||
timersPlugin.onVarbitChanged(new VarbitChanged());
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.google.inject.Guice;
|
||||
import com.google.inject.testing.fieldbinder.Bind;
|
||||
import com.google.inject.testing.fieldbinder.BoundFieldModule;
|
||||
import java.time.Instant;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import javax.inject.Inject;
|
||||
@@ -53,7 +53,7 @@ import org.mockito.junit.MockitoJUnitRunner;
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class FarmingContractManagerTest
|
||||
{
|
||||
private Map<Varbits, FarmingPatch> farmingGuildPatches = new EnumMap<>(Varbits.class);
|
||||
private Map<Integer, FarmingPatch> farmingGuildPatches = new HashMap<>();
|
||||
|
||||
@Inject
|
||||
private FarmingContractManager farmingContractManager;
|
||||
|
||||
Reference in New Issue
Block a user