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:
Adam
2022-04-09 23:28:01 -04:00
parent b010e0481e
commit d129c49923
25 changed files with 476 additions and 403 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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
{
}