api: deprecate getVar(int) and use getVarbitValue(int)
getVarbitValue was originally for external plugins which could not modify the varbits enum, but now ints are used everywhere it is no longer necessary for two separate methods
This commit is contained in:
@@ -106,7 +106,7 @@ public class ChatMessageManager
|
||||
final String channel = stringStack[size - 4];
|
||||
final ChatMessageType chatMessageType = messageNode.getType();
|
||||
|
||||
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
final boolean isChatboxTransparent = client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
Color usernameColor = null;
|
||||
Color channelColor = null;
|
||||
|
||||
@@ -217,7 +217,7 @@ public class ChatMessageManager
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
boolean isChatboxTransparent = client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
Color usernameColor = isChatboxTransparent ? chatColorConfig.transparentPrivateUsernames() : chatColorConfig.opaquePrivateUsernames();
|
||||
if (usernameColor == null)
|
||||
{
|
||||
@@ -842,7 +842,7 @@ public class ChatMessageManager
|
||||
@VisibleForTesting
|
||||
String formatRuneLiteMessage(String runeLiteFormatMessage, ChatMessageType type, boolean pmbox)
|
||||
{
|
||||
final boolean transparentChatbox = client.getVar(Varbits.TRANSPARENT_CHATBOX) != 0;
|
||||
final boolean transparentChatbox = client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) != 0;
|
||||
final boolean transparent = client.isResized() && transparentChatbox;
|
||||
final Collection<ChatColor> chatColors = colorCache.get(type);
|
||||
for (ChatColor chatColor : chatColors)
|
||||
|
||||
@@ -64,7 +64,7 @@ public class FavourRequirement implements Requirement
|
||||
@Override
|
||||
public boolean satisfiesRequirement(Client client)
|
||||
{
|
||||
int realFavour = client.getVar(house.getVarbit());
|
||||
int realFavour = client.getVarbitValue(house.getVarbit());
|
||||
return (realFavour / 10) >= percent;
|
||||
}
|
||||
}
|
||||
@@ -105,8 +105,8 @@ public class AttackStylesPlugin extends Plugin
|
||||
{
|
||||
resetWarnings();
|
||||
attackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
|
||||
equippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE);
|
||||
castingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE);
|
||||
equippedWeaponTypeVarbit = client.getVarbitValue(Varbits.EQUIPPED_WEAPON_TYPE);
|
||||
castingModeVarbit = client.getVarbitValue(Varbits.DEFENSIVE_CASTING_MODE);
|
||||
updateAttackStyle(
|
||||
equippedWeaponTypeVarbit,
|
||||
attackStyleVarbit,
|
||||
@@ -174,8 +174,8 @@ public class AttackStylesPlugin extends Plugin
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
int currentAttackStyleVarbit = client.getVar(VarPlayer.ATTACK_STYLE);
|
||||
int currentEquippedWeaponTypeVarbit = client.getVar(Varbits.EQUIPPED_WEAPON_TYPE);
|
||||
int currentCastingModeVarbit = client.getVar(Varbits.DEFENSIVE_CASTING_MODE);
|
||||
int currentEquippedWeaponTypeVarbit = client.getVarbitValue(Varbits.EQUIPPED_WEAPON_TYPE);
|
||||
int currentCastingModeVarbit = client.getVarbitValue(Varbits.DEFENSIVE_CASTING_MODE);
|
||||
|
||||
if (attackStyleVarbit != currentAttackStyleVarbit || equippedWeaponTypeVarbit != currentEquippedWeaponTypeVarbit || castingModeVarbit != currentCastingModeVarbit)
|
||||
{
|
||||
|
||||
@@ -788,7 +788,7 @@ public class TabInterface
|
||||
return;
|
||||
}
|
||||
|
||||
if (client.getVar(Varbits.BANK_REARRANGE_MODE) == 0)
|
||||
if (client.getVarbitValue(Varbits.BANK_REARRANGE_MODE) == 0)
|
||||
{
|
||||
tabManager.swap(source.getName(), dest.getName());
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public class BarbarianAssaultPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
int inGame = client.getVar(Varbits.IN_GAME_BA);
|
||||
int inGame = client.getVarbitValue(Varbits.IN_GAME_BA);
|
||||
|
||||
if (inGameBit != inGame)
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ class BarrowsBrotherSlainOverlay extends OverlayPanel
|
||||
|
||||
for (BarrowsBrothers brother : BarrowsBrothers.values())
|
||||
{
|
||||
final boolean brotherSlain = client.getVar(brother.getKilledVarbit()) > 0;
|
||||
final boolean brotherSlain = client.getVarbitValue(brother.getKilledVarbit()) > 0;
|
||||
String slain = brotherSlain ? "\u2713" : "\u2717";
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left(brother.getName())
|
||||
@@ -109,12 +109,12 @@ class BarrowsBrotherSlainOverlay extends OverlayPanel
|
||||
private int rewardPotential()
|
||||
{
|
||||
// this is from [proc,barrows_overlay_reward]
|
||||
int brothers = client.getVar(Varbits.BARROWS_KILLED_AHRIM)
|
||||
+ client.getVar(Varbits.BARROWS_KILLED_DHAROK)
|
||||
+ client.getVar(Varbits.BARROWS_KILLED_GUTHAN)
|
||||
+ client.getVar(Varbits.BARROWS_KILLED_KARIL)
|
||||
+ client.getVar(Varbits.BARROWS_KILLED_TORAG)
|
||||
+ client.getVar(Varbits.BARROWS_KILLED_VERAC);
|
||||
return client.getVar(Varbits.BARROWS_REWARD_POTENTIAL) + brothers * 2;
|
||||
int brothers = client.getVarbitValue(Varbits.BARROWS_KILLED_AHRIM)
|
||||
+ client.getVarbitValue(Varbits.BARROWS_KILLED_DHAROK)
|
||||
+ client.getVarbitValue(Varbits.BARROWS_KILLED_GUTHAN)
|
||||
+ client.getVarbitValue(Varbits.BARROWS_KILLED_KARIL)
|
||||
+ client.getVarbitValue(Varbits.BARROWS_KILLED_TORAG)
|
||||
+ client.getVarbitValue(Varbits.BARROWS_KILLED_VERAC);
|
||||
return client.getVarbitValue(Varbits.BARROWS_REWARD_POTENTIAL) + brothers * 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class BarrowsOverlay extends Overlay
|
||||
graphics.setColor(Color.black);
|
||||
graphics.drawString(brotherLetter, miniMapLocation.getX() + 1, miniMapLocation.getY() + 1);
|
||||
|
||||
if (client.getVar(brother.getKilledVarbit()) > 0)
|
||||
if (client.getVarbitValue(brother.getKilledVarbit()) > 0)
|
||||
{
|
||||
graphics.setColor(config.deadBrotherLocColor());
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class BlastFurnaceClickBoxOverlay extends Overlay
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
int dispenserState = client.getVar(Varbits.BAR_DISPENSER);
|
||||
int dispenserState = client.getVarbitValue(Varbits.BAR_DISPENSER);
|
||||
|
||||
if (config.showConveyorBelt() && plugin.getConveyorBelt() != null)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class BlastFurnaceCofferOverlay extends OverlayPanel
|
||||
|
||||
if (sack != null)
|
||||
{
|
||||
final int coffer = client.getVar(BLAST_FURNACE_COFFER);
|
||||
final int coffer = client.getVarbitValue(BLAST_FURNACE_COFFER);
|
||||
|
||||
sack.setHidden(true);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class BlastFurnaceOverlay extends OverlayPanel
|
||||
|
||||
for (BarsOres varbit : BarsOres.values())
|
||||
{
|
||||
int amount = client.getVar(varbit.getVarbit());
|
||||
int amount = client.getVarbitValue(varbit.getVarbit());
|
||||
|
||||
if (amount == 0)
|
||||
{
|
||||
|
||||
@@ -73,11 +73,11 @@ class BlastMineOreCountOverlay extends OverlayPanel
|
||||
if (config.showOreOverlay())
|
||||
{
|
||||
blastMineWidget.setHidden(true);
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.COAL, client.getVar(Varbits.BLAST_MINE_COAL))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.GOLD_ORE, client.getVar(Varbits.BLAST_MINE_GOLD))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.MITHRIL_ORE, client.getVar(Varbits.BLAST_MINE_MITHRIL))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.ADAMANTITE_ORE, client.getVar(Varbits.BLAST_MINE_ADAMANTITE))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.RUNITE_ORE, client.getVar(Varbits.BLAST_MINE_RUNITE))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.COAL, client.getVarbitValue(Varbits.BLAST_MINE_COAL))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.GOLD_ORE, client.getVarbitValue(Varbits.BLAST_MINE_GOLD))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.MITHRIL_ORE, client.getVarbitValue(Varbits.BLAST_MINE_MITHRIL))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.ADAMANTITE_ORE, client.getVarbitValue(Varbits.BLAST_MINE_ADAMANTITE))));
|
||||
panelComponent.getChildren().add(new ImageComponent(getImage(ItemID.RUNITE_ORE, client.getVarbitValue(Varbits.BLAST_MINE_RUNITE))));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -406,7 +406,7 @@ public class ChatChannelPlugin extends Plugin
|
||||
int rankIcon = -1;
|
||||
|
||||
// Use configured friends chat info colors if set, otherwise default to the jagex text and fc name colors
|
||||
if (client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1)
|
||||
if (client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1)
|
||||
{
|
||||
textColor = MoreObjects.firstNonNull(chatColorConfig.transparentFriendsChatInfo(), CHAT_FC_TEXT_TRANSPARENT_BACKGROUND);
|
||||
channelColor = MoreObjects.firstNonNull(chatColorConfig.transparentFriendsChatChannelName(), CHAT_FC_NAME_TRANSPARENT_BACKGROUND);
|
||||
@@ -462,7 +462,7 @@ public class ChatChannelPlugin extends Plugin
|
||||
|
||||
final Color textColor;
|
||||
// Use configured clan chat info colors if set, otherwise default to the jagex text and fc name colors
|
||||
if (client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1)
|
||||
if (client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1)
|
||||
{
|
||||
textColor = MoreObjects.firstNonNull(
|
||||
chatType == MemberActivity.ChatType.CLAN_CHAT ? chatColorConfig.transparentClanChatInfo() : chatColorConfig.transparentClanChatGuestInfo(),
|
||||
|
||||
@@ -1128,7 +1128,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
|
||||
private boolean gambleCountSubmit(ChatInput chatInput, String value)
|
||||
{
|
||||
final int gc = client.getVar(Varbits.BA_GC);
|
||||
final int gc = client.getVarbitValue(Varbits.BA_GC);
|
||||
final String playerName = client.getLocalPlayer().getName();
|
||||
|
||||
executor.execute(() ->
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ClueScrollOverlay extends OverlayPanel
|
||||
}
|
||||
|
||||
if (clue.isRequiresLight()
|
||||
&& ((clue.getFirePitVarbitId() == -1 || client.getVar(clue.getFirePitVarbitId()) != 1)
|
||||
&& ((clue.getFirePitVarbitId() == -1 || client.getVarbitValue(clue.getFirePitVarbitId()) != 1)
|
||||
&& (inventoryItems == null || !HAS_LIGHT.fulfilledBy(inventoryItems))
|
||||
&& (equippedItems == null || !HAS_LIGHT.fulfilledBy(equippedItems))))
|
||||
{
|
||||
|
||||
@@ -431,13 +431,13 @@ public class ClueScrollPlugin extends Plugin
|
||||
List<Item> items = new ArrayList<>(RUNEPOUCH_AMOUNT_VARBITS.length);
|
||||
for (int i = 0; i < RUNEPOUCH_AMOUNT_VARBITS.length; i++)
|
||||
{
|
||||
int amount = client.getVar(RUNEPOUCH_AMOUNT_VARBITS[i]);
|
||||
int amount = client.getVarbitValue(RUNEPOUCH_AMOUNT_VARBITS[i]);
|
||||
if (amount <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
int varbId = client.getVar(RUNEPOUCH_RUNE_VARBITS[i]);
|
||||
int varbId = client.getVarbitValue(RUNEPOUCH_RUNE_VARBITS[i]);
|
||||
RunepouchRune rune = RunepouchRune.getRune(varbId);
|
||||
if (rune == null)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ class CorpDamageOverlay extends OverlayPanel
|
||||
return null;
|
||||
}
|
||||
|
||||
int myDamage = client.getVar(Varbits.CORP_DAMAGE);
|
||||
int myDamage = client.getVarbitValue(Varbits.CORP_DAMAGE);
|
||||
int totalDamage = corpPlugin.getTotalDamage();
|
||||
int players = corpPlugin.getPlayers().size();
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ public class CorpPlugin extends Plugin
|
||||
{
|
||||
if (corp != null)
|
||||
{
|
||||
int myDamage = client.getVar(Varbits.CORP_DAMAGE);
|
||||
int myDamage = client.getVarbitValue(Varbits.CORP_DAMAGE);
|
||||
// avoid resetting our counter when the client's is reset
|
||||
if (myDamage > 0)
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ public class CrowdsourcingCooking
|
||||
|
||||
int cookingLevel = client.getBoostedSkillLevel(Skill.COOKING);
|
||||
boolean hasCookingGauntlets = hasCookingGauntlets();
|
||||
boolean kourendElite = client.getVar(Varbits.DIARY_KOUREND_ELITE) == 1;
|
||||
boolean kourendElite = client.getVarbitValue(Varbits.DIARY_KOUREND_ELITE) == 1;
|
||||
CookingData data = new CookingData(message, hasCookingGauntlets, inHosidiusKitchen, kourendElite, lastGameObjectClicked, cookingLevel);
|
||||
manager.storeEvent(data);
|
||||
}
|
||||
|
||||
@@ -82,10 +82,10 @@ public class CrowdsourcingThieving
|
||||
|
||||
private int getArdougneDiary()
|
||||
{
|
||||
int easy = client.getVar(Varbits.DIARY_ARDOUGNE_EASY);
|
||||
int medium = client.getVar(Varbits.DIARY_ARDOUGNE_MEDIUM);
|
||||
int hard = client.getVar(Varbits.DIARY_ARDOUGNE_HARD);
|
||||
int elite = client.getVar(Varbits.DIARY_ARDOUGNE_ELITE);
|
||||
int easy = client.getVarbitValue(Varbits.DIARY_ARDOUGNE_EASY);
|
||||
int medium = client.getVarbitValue(Varbits.DIARY_ARDOUGNE_MEDIUM);
|
||||
int hard = client.getVarbitValue(Varbits.DIARY_ARDOUGNE_HARD);
|
||||
int elite = client.getVarbitValue(Varbits.DIARY_ARDOUGNE_ELITE);
|
||||
return easy + 2 * medium + 4 * hard + 8 * elite;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public class CrowdsourcingZMI
|
||||
}
|
||||
|
||||
int tickDelta = itemContainerChangedTick - illegalActionTick;
|
||||
boolean ardougneMedium = client.getVar(Varbits.DIARY_ARDOUGNE_MEDIUM) == 1;
|
||||
boolean ardougneMedium = client.getVarbitValue(Varbits.DIARY_ARDOUGNE_MEDIUM) == 1;
|
||||
int runecraftBoostedLevel = client.getBoostedSkillLevel(Skill.RUNECRAFT);
|
||||
Multiset<Integer> currentInventorySnapshot = getInventorySnapshot();
|
||||
final Multiset<Integer> itemsReceived = Multisets.difference(currentInventorySnapshot, previousInventorySnapshot);
|
||||
|
||||
@@ -171,7 +171,7 @@ public class DailyTasksPlugin extends Plugin
|
||||
{
|
||||
if (client.getAccountType() == AccountType.NORMAL
|
||||
&& client.getVar(VarPlayer.NMZ_REWARD_POINTS) >= HERB_BOX_COST
|
||||
&& (client.getVar(Varbits.DAILY_HERB_BOXES_COLLECTED) < HERB_BOX_MAX
|
||||
&& (client.getVarbitValue(Varbits.DAILY_HERB_BOXES_COLLECTED) < HERB_BOX_MAX
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(HERB_BOX_MESSAGE);
|
||||
@@ -180,8 +180,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkStaves(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_VARROCK_EASY) == 1
|
||||
&& (client.getVar(Varbits.DAILY_STAVES_COLLECTED) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_VARROCK_EASY) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_STAVES_COLLECTED) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(STAVES_MESSAGE);
|
||||
@@ -190,8 +190,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkEssence(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_ARDOUGNE_MEDIUM) == 1
|
||||
&& (client.getVar(Varbits.DAILY_ESSENCE_COLLECTED) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_ARDOUGNE_MEDIUM) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_ESSENCE_COLLECTED) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(ESSENCE_MESSAGE);
|
||||
@@ -200,8 +200,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkRunes(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_WILDERNESS_EASY) == 1
|
||||
&& (client.getVar(Varbits.DAILY_RUNES_COLLECTED) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_WILDERNESS_EASY) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_RUNES_COLLECTED) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(RUNES_MESSAGE);
|
||||
@@ -211,8 +211,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
private void checkSand(boolean dailyReset)
|
||||
{
|
||||
if (client.getAccountType() != AccountType.ULTIMATE_IRONMAN
|
||||
&& client.getVar(Varbits.QUEST_THE_HAND_IN_THE_SAND) >= SAND_QUEST_COMPLETE
|
||||
&& (client.getVar(Varbits.DAILY_SAND_COLLECTED) == 0
|
||||
&& client.getVarbitValue(Varbits.QUEST_THE_HAND_IN_THE_SAND) >= SAND_QUEST_COMPLETE
|
||||
&& (client.getVarbitValue(Varbits.DAILY_SAND_COLLECTED) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(SAND_MESSAGE);
|
||||
@@ -221,8 +221,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkFlax(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_KANDARIN_EASY) == 1
|
||||
&& (client.getVar(Varbits.DAILY_FLAX_STATE) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_KANDARIN_EASY) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_FLAX_STATE) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(FLAX_MESSAGE);
|
||||
@@ -231,8 +231,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkArrows(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_WESTERN_EASY) == 1
|
||||
&& (client.getVar(Varbits.DAILY_ARROWS_STATE) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_WESTERN_EASY) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_ARROWS_STATE) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(ARROWS_MESSAGE);
|
||||
@@ -241,14 +241,14 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkBonemeal(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_MORYTANIA_MEDIUM) == 1)
|
||||
if (client.getVarbitValue(Varbits.DIARY_MORYTANIA_MEDIUM) == 1)
|
||||
{
|
||||
int collected = client.getVar(Varbits.DAILY_BONEMEAL_STATE);
|
||||
int collected = client.getVarbitValue(Varbits.DAILY_BONEMEAL_STATE);
|
||||
int max = BONEMEAL_PER_DIARY;
|
||||
if (client.getVar(Varbits.DIARY_MORYTANIA_HARD) == 1)
|
||||
if (client.getVarbitValue(Varbits.DIARY_MORYTANIA_HARD) == 1)
|
||||
{
|
||||
max += BONEMEAL_PER_DIARY;
|
||||
if (client.getVar(Varbits.DIARY_MORYTANIA_ELITE) == 1)
|
||||
if (client.getVarbitValue(Varbits.DIARY_MORYTANIA_ELITE) == 1)
|
||||
{
|
||||
max += BONEMEAL_PER_DIARY;
|
||||
}
|
||||
@@ -262,8 +262,8 @@ public class DailyTasksPlugin extends Plugin
|
||||
|
||||
private void checkDynamite(boolean dailyReset)
|
||||
{
|
||||
if (client.getVar(Varbits.DIARY_KOUREND_MEDIUM) == 1
|
||||
&& (client.getVar(Varbits.DAILY_DYNAMITE_COLLECTED) == 0
|
||||
if (client.getVarbitValue(Varbits.DIARY_KOUREND_MEDIUM) == 1
|
||||
&& (client.getVarbitValue(Varbits.DAILY_DYNAMITE_COLLECTED) == 0
|
||||
|| dailyReset))
|
||||
{
|
||||
sendChatMessage(DYNAMITE_MESSAGE);
|
||||
|
||||
@@ -198,8 +198,8 @@ public class DriftNetPlugin extends Plugin
|
||||
|
||||
for (DriftNet net : NETS)
|
||||
{
|
||||
DriftNetStatus status = DriftNetStatus.of(client.getVar(net.getStatusVarbit()));
|
||||
int count = client.getVar(net.getCountVarbit());
|
||||
DriftNetStatus status = DriftNetStatus.of(client.getVarbitValue(net.getStatusVarbit()));
|
||||
int count = client.getVarbitValue(net.getCountVarbit());
|
||||
|
||||
net.setStatus(status);
|
||||
net.setCount(count);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class XpDropPlugin extends Plugin
|
||||
else
|
||||
{
|
||||
EnumComposition colorEnum = client.getEnum(EnumID.XPDROP_COLORS);
|
||||
int defaultColorId = client.getVar(Varbits.EXPERIENCE_DROP_COLOR);
|
||||
int defaultColorId = client.getVarbitValue(Varbits.EXPERIENCE_DROP_COLOR);
|
||||
int color = colorEnum.getIntValue(defaultColorId);
|
||||
widget.setTextColor(color);
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ public class FairyRingPlugin extends Plugin
|
||||
String destination;
|
||||
try
|
||||
{
|
||||
FairyRings fairyRingDestination = getFairyRingDestination(client.getVar(Varbits.FAIRY_RING_DIAL_ADCB),
|
||||
client.getVar(Varbits.FAIRY_RIGH_DIAL_ILJK), client.getVar(Varbits.FAIRY_RING_DIAL_PSRQ));
|
||||
FairyRings fairyRingDestination = getFairyRingDestination(client.getVarbitValue(Varbits.FAIRY_RING_DIAL_ADCB),
|
||||
client.getVarbitValue(Varbits.FAIRY_RIGH_DIAL_ILJK), client.getVarbitValue(Varbits.FAIRY_RING_DIAL_PSRQ));
|
||||
destination = fairyRingDestination.getDestination();
|
||||
}
|
||||
catch (IllegalArgumentException ex)
|
||||
|
||||
@@ -387,7 +387,7 @@ public class FishingPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
int trawlerContribution = client.getVar(Varbits.FISHING_TRAWLER_ACTIVITY);
|
||||
int trawlerContribution = client.getVarbitValue(Varbits.FISHING_TRAWLER_ACTIVITY);
|
||||
trawlerContributionWidget.setText("Contribution: " + trawlerContribution);
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ public class HerbiboarPlugin extends Plugin
|
||||
{
|
||||
for (TrailToSpot trail : spot.getTrails())
|
||||
{
|
||||
int value = client.getVar(trail.getVarbitId());
|
||||
int value = client.getVarbitValue(trail.getVarbitId());
|
||||
|
||||
if (value == trail.getValue())
|
||||
{
|
||||
@@ -222,11 +222,11 @@ public class HerbiboarPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
finishId = client.getVar(Varbits.HB_FINISH);
|
||||
finishId = client.getVarbitValue(Varbits.HB_FINISH);
|
||||
|
||||
// The started varbit doesn't get set until the first spot of the rotation has been searched
|
||||
// so we need to use the current group as an indicator of the rotation being started
|
||||
started = client.getVar(Varbits.HB_STARTED) > 0 || currentGroup != null;
|
||||
started = client.getVarbitValue(Varbits.HB_STARTED) > 0 || currentGroup != null;
|
||||
boolean finished = !pathActive && started;
|
||||
|
||||
if (!wasStarted && started)
|
||||
|
||||
@@ -535,7 +535,7 @@ public class IdleNotifierPlugin extends Plugin
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (config.getOxygenThreshold() >= client.getVar(Varbits.OXYGEN_LEVEL) * 0.1)
|
||||
if (config.getOxygenThreshold() >= client.getVarbitValue(Varbits.OXYGEN_LEVEL) * 0.1)
|
||||
{
|
||||
if (!notifyOxygen)
|
||||
{
|
||||
@@ -558,7 +558,7 @@ public class IdleNotifierPlugin extends Plugin
|
||||
}
|
||||
if (client.getRealSkillLevel(Skill.HITPOINTS) > config.getHitpointsThreshold())
|
||||
{
|
||||
if (client.getBoostedSkillLevel(Skill.HITPOINTS) + client.getVar(Varbits.NMZ_ABSORPTION) <= config.getHitpointsThreshold())
|
||||
if (client.getBoostedSkillLevel(Skill.HITPOINTS) + client.getVarbitValue(Varbits.NMZ_ABSORPTION) <= config.getHitpointsThreshold())
|
||||
{
|
||||
if (!notifyHitpoints)
|
||||
{
|
||||
|
||||
@@ -471,7 +471,7 @@ public class ItemChargePlugin extends Plugin
|
||||
@Subscribe
|
||||
private void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
int explorerRingCharge = client.getVar(Varbits.EXPLORER_RING_ALCHS);
|
||||
int explorerRingCharge = client.getVarbitValue(Varbits.EXPLORER_RING_ALCHS);
|
||||
if (lastExplorerRingCharge != explorerRingCharge)
|
||||
{
|
||||
lastExplorerRingCharge = explorerRingCharge;
|
||||
|
||||
@@ -157,7 +157,7 @@ public class ItemStatPlugin extends Plugin
|
||||
if (event.getScriptId() == ScriptID.GE_OFFERS_SETUP_BUILD && config.geStats())
|
||||
{
|
||||
int currentGeItem = client.getVar(VarPlayer.CURRENT_GE_ITEM);
|
||||
if (currentGeItem != -1 && client.getVar(Varbits.GE_OFFER_CREATION_TYPE) == 0)
|
||||
if (currentGeItem != -1 && client.getVarbitValue(Varbits.GE_OFFER_CREATION_TYPE) == 0)
|
||||
{
|
||||
createItemInformation(currentGeItem);
|
||||
}
|
||||
@@ -413,7 +413,7 @@ public class ItemStatPlugin extends Plugin
|
||||
{
|
||||
if (client.isResized())
|
||||
{
|
||||
if (client.getVar(Varbits.SIDE_PANELS) == 1)
|
||||
if (client.getVarbitValue(Varbits.SIDE_PANELS) == 1)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_CONTAINER);
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ public class SpicyStew implements Effect
|
||||
/*
|
||||
* Spice boosts listed in the colour order of [Spicy stew -> Smell]
|
||||
*/
|
||||
int redBoost = spiceBoostOf(client.getVar(Varbits.SPICY_STEW_RED_SPICES));
|
||||
int yellowBoost = spiceBoostOf(client.getVar(Varbits.SPICY_STEW_YELLOW_SPICES));
|
||||
int orangeBoost = spiceBoostOf(client.getVar(Varbits.SPICY_STEW_ORANGE_SPICES));
|
||||
int brownBoost = spiceBoostOf(client.getVar(Varbits.SPICY_STEW_BROWN_SPICES));
|
||||
int redBoost = spiceBoostOf(client.getVarbitValue(Varbits.SPICY_STEW_RED_SPICES));
|
||||
int yellowBoost = spiceBoostOf(client.getVarbitValue(Varbits.SPICY_STEW_YELLOW_SPICES));
|
||||
int orangeBoost = spiceBoostOf(client.getVarbitValue(Varbits.SPICY_STEW_ORANGE_SPICES));
|
||||
int brownBoost = spiceBoostOf(client.getVarbitValue(Varbits.SPICY_STEW_BROWN_SPICES));
|
||||
|
||||
List<StatChange> changes = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ public class KeyRemappingPlugin extends Plugin
|
||||
{
|
||||
if (client.getGameState() == GameState.LOGGED_IN)
|
||||
{
|
||||
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
final boolean isChatboxTransparent = client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
final Color textColor = isChatboxTransparent ? JagexColors.CHAT_TYPED_TEXT_TRANSPARENT_BACKGROUND : JagexColors.CHAT_TYPED_TEXT_OPAQUE_BACKGROUND;
|
||||
setChatboxWidgetInput(chatboxInput, ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", textColor));
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@ public class KingdomPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
final int coffer = client.getVar(Varbits.KINGDOM_COFFER);
|
||||
final int approval = client.getVar(Varbits.KINGDOM_APPROVAL);
|
||||
final int coffer = client.getVarbitValue(Varbits.KINGDOM_COFFER);
|
||||
final int approval = client.getVarbitValue(Varbits.KINGDOM_APPROVAL);
|
||||
|
||||
if (client.getGameState() == GameState.LOGGED_IN
|
||||
&& isThroneOfMiscellaniaCompleted()
|
||||
|
||||
@@ -490,8 +490,8 @@ public class MotherlodePlugin extends Plugin
|
||||
|
||||
private void refreshSackValues()
|
||||
{
|
||||
curSackSize = client.getVar(Varbits.SACK_NUMBER);
|
||||
boolean sackUpgraded = client.getVar(Varbits.SACK_UPGRADED) == 1;
|
||||
curSackSize = client.getVarbitValue(Varbits.SACK_NUMBER);
|
||||
boolean sackUpgraded = client.getVarbitValue(Varbits.SACK_UPGRADED) == 1;
|
||||
maxSackSize = sackUpgraded ? SACK_LARGE_SIZE : SACK_SIZE;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ class MotherlodeSackOverlay extends OverlayPanel
|
||||
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left("Pay-dirt in sack:")
|
||||
.right(String.valueOf(client.getVar(Varbits.SACK_NUMBER)))
|
||||
.right(String.valueOf(client.getVarbitValue(Varbits.SACK_NUMBER)))
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +826,7 @@ public class MusicPlugin extends Plugin
|
||||
int raw = client.getVar(var);
|
||||
if (raw == 0)
|
||||
{
|
||||
raw = -client.getVar(mutedVarbitId);
|
||||
raw = -client.getVarbitValue(mutedVarbitId);
|
||||
}
|
||||
value = raw * this.max / 100;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class NightmareZoneOverlay extends OverlayPanel
|
||||
|
||||
renderAbsorptionCounter();
|
||||
|
||||
final int currentPoints = client.getVar(Varbits.NMZ_POINTS);
|
||||
final int currentPoints = client.getVarbitValue(Varbits.NMZ_POINTS);
|
||||
final int totalPoints = currentPoints + client.getVar(VarPlayer.NMZ_REWARD_POINTS);
|
||||
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
@@ -114,7 +114,7 @@ class NightmareZoneOverlay extends OverlayPanel
|
||||
|
||||
private void renderAbsorptionCounter()
|
||||
{
|
||||
int absorptionPoints = client.getVar(Varbits.NMZ_ABSORPTION);
|
||||
int absorptionPoints = client.getVarbitValue(Varbits.NMZ_ABSORPTION);
|
||||
if (absorptionPoints == 0)
|
||||
{
|
||||
if (absorptionCounter != null)
|
||||
|
||||
@@ -244,7 +244,7 @@ public class NightmareZonePlugin extends Plugin
|
||||
|
||||
private void checkAbsorption()
|
||||
{
|
||||
int absorptionPoints = client.getVar(Varbits.NMZ_ABSORPTION);
|
||||
int absorptionPoints = client.getVarbitValue(Varbits.NMZ_ABSORPTION);
|
||||
|
||||
if (!absorptionNotificationSend)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ public class NightmareZonePlugin extends Plugin
|
||||
private int calculatePointsPerHour()
|
||||
{
|
||||
Instant now = Instant.now();
|
||||
final int currentPoints = client.getVar(Varbits.NMZ_POINTS);
|
||||
final int currentPoints = client.getVarbitValue(Varbits.NMZ_POINTS);
|
||||
|
||||
if (nmzSessionStartTime == null)
|
||||
{
|
||||
|
||||
@@ -226,7 +226,7 @@ class OpponentInfoOverlay extends OverlayPanel
|
||||
*/
|
||||
private boolean hasHpHud(Actor opponent)
|
||||
{
|
||||
boolean settingEnabled = client.getVar(Varbits.BOSS_HEALTH_OVERLAY) == 0;
|
||||
boolean settingEnabled = client.getVarbitValue(Varbits.BOSS_HEALTH_OVERLAY) == 0;
|
||||
if (settingEnabled && opponent instanceof NPC)
|
||||
{
|
||||
int opponentId = client.getVar(VarPlayer.HP_HUD_NPC_ID);
|
||||
|
||||
@@ -85,7 +85,7 @@ class PyramidPlunderOverlay extends Overlay
|
||||
LocalPoint playerLocation = client.getLocalPlayer().getLocalLocation();
|
||||
|
||||
// Highlight convex hulls of urns, chests, and sarcophagus
|
||||
int currentFloor = client.getVar(Varbits.PYRAMID_PLUNDER_ROOM);
|
||||
int currentFloor = client.getVarbitValue(Varbits.PYRAMID_PLUNDER_ROOM);
|
||||
for (GameObject object : plugin.getObjectsToHighlight())
|
||||
{
|
||||
if (config.highlightUrnsFloor() > currentFloor && URN_IDS.contains(object.getId())
|
||||
@@ -127,7 +127,7 @@ class PyramidPlunderOverlay extends Overlay
|
||||
if (SPEARTRAP_ID == object.getId())
|
||||
{
|
||||
// this varbit is set to 1 when you enter a room and 0 once you get passed the spike traps
|
||||
if (client.getVar(Varbits.PYRAMID_PLUNDER_ROOM_LOCATION) != 1)
|
||||
if (client.getVarbitValue(Varbits.PYRAMID_PLUNDER_ROOM_LOCATION) != 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ public class PyramidPlunderPlugin extends Plugin
|
||||
{
|
||||
if (timer == null)
|
||||
{
|
||||
int ppTimer = client.getVar(Varbits.PYRAMID_PLUNDER_TIMER);
|
||||
int ppTimer = client.getVarbitValue(Varbits.PYRAMID_PLUNDER_TIMER);
|
||||
Duration remaining = PYRAMID_PLUNDER_DURATION.minus(ppTimer, RSTimeUnit.GAME_TICKS);
|
||||
timer = new PyramidPlunderTimer(remaining, itemManager.getImage(PHARAOHS_SCEPTRE), this,
|
||||
config, client);
|
||||
@@ -217,6 +217,6 @@ public class PyramidPlunderPlugin extends Plugin
|
||||
{
|
||||
return client.getLocalPlayer() != null
|
||||
&& PYRAMID_PLUNDER_REGION == client.getLocalPlayer().getWorldLocation().getRegionID()
|
||||
&& client.getVar(Varbits.PYRAMID_PLUNDER_TIMER) > 0;
|
||||
&& client.getVarbitValue(Varbits.PYRAMID_PLUNDER_TIMER) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ class PyramidPlunderTimer extends Timer
|
||||
@Override
|
||||
public String getTooltip()
|
||||
{
|
||||
int floor = client.getVar(Varbits.PYRAMID_PLUNDER_ROOM);
|
||||
int thievingLevel = client.getVar(Varbits.PYRAMID_PLUNDER_THIEVING_LEVEL);
|
||||
int floor = client.getVarbitValue(Varbits.PYRAMID_PLUNDER_ROOM);
|
||||
int thievingLevel = client.getVarbitValue(Varbits.PYRAMID_PLUNDER_THIEVING_LEVEL);
|
||||
return String.format("Time remaining. Floor: %d. Thieving level: %d", floor, thievingLevel);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ public class QuestListPlugin extends Plugin
|
||||
|
||||
private boolean isOnQuestTab()
|
||||
{
|
||||
return client.getVar(Varbits.QUEST_TAB) == 0 && client.getVar(VarClientInt.INVENTORY_TAB) == 2;
|
||||
return client.getVarbitValue(Varbits.QUEST_TAB) == 0 && client.getVar(VarClientInt.INVENTORY_TAB) == 2;
|
||||
}
|
||||
|
||||
private boolean isChatboxOpen()
|
||||
|
||||
@@ -206,7 +206,7 @@ class RaidsOverlay extends OverlayPanel
|
||||
if (plugin.isInRaidChambers())
|
||||
{
|
||||
// If the raid has started
|
||||
if (client.getVar(Varbits.RAID_STATE) > 0)
|
||||
if (client.getVarbitValue(Varbits.RAID_STATE) > 0)
|
||||
{
|
||||
if (client.getPlane() == OLM_PLANE)
|
||||
{
|
||||
|
||||
@@ -264,7 +264,7 @@ public class RaidsPlugin extends Plugin
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
int tempPartyID = client.getVar(VarPlayer.IN_RAID_PARTY);
|
||||
boolean tempInRaid = client.getVar(Varbits.IN_RAID) == 1;
|
||||
boolean tempInRaid = client.getVarbitValue(Varbits.IN_RAID) == 1;
|
||||
|
||||
// if the player's party state has changed
|
||||
if (tempPartyID != raidPartyID)
|
||||
@@ -321,8 +321,8 @@ public class RaidsPlugin extends Plugin
|
||||
|
||||
if (config.pointsMessage())
|
||||
{
|
||||
int totalPoints = client.getVar(Varbits.TOTAL_POINTS);
|
||||
int personalPoints = client.getVar(Varbits.PERSONAL_POINTS);
|
||||
int totalPoints = client.getVarbitValue(Varbits.TOTAL_POINTS);
|
||||
int personalPoints = client.getVarbitValue(Varbits.PERSONAL_POINTS);
|
||||
|
||||
double percentage = personalPoints / (totalPoints / 100.0);
|
||||
|
||||
@@ -425,7 +425,7 @@ public class RaidsPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
inRaidChambers = client.getVar(Varbits.IN_RAID) == 1;
|
||||
inRaidChambers = client.getVarbitValue(Varbits.IN_RAID) == 1;
|
||||
|
||||
if (!inRaidChambers)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ public class RegenMeterPlugin extends Plugin
|
||||
ticksPerHPRegen /= 2;
|
||||
}
|
||||
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_3) == TRAILBLAZER_LEAGUE_FLUID_STRIKES_RELIC)
|
||||
if (client.getVarbitValue(Varbits.LEAGUE_RELIC_3) == TRAILBLAZER_LEAGUE_FLUID_STRIKES_RELIC)
|
||||
{
|
||||
ticksPerHPRegen /= 4;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ public class RunEnergyPlugin extends Plugin
|
||||
final int effectiveWeight = Math.max(client.getWeight(), 0);
|
||||
double lossRate = (Math.min(effectiveWeight, 64) / 100.0) + 0.64;
|
||||
|
||||
if (client.getVar(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) != 0)
|
||||
if (client.getVarbitValue(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) != 0)
|
||||
{
|
||||
lossRate *= 0.3; // Stamina effect reduces energy depletion to 30%
|
||||
}
|
||||
|
||||
@@ -90,14 +90,14 @@ public class RunepouchOverlay extends WidgetItemOverlay
|
||||
for (int i = 0; i < AMOUNT_VARBITS.length; i++)
|
||||
{
|
||||
@Varbit int amountVarbit = AMOUNT_VARBITS[i];
|
||||
int amount = client.getVar(amountVarbit);
|
||||
int amount = client.getVarbitValue(amountVarbit);
|
||||
if (amount <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@Varbit int runeVarbit = RUNE_VARBITS[i];
|
||||
int runeId = client.getVar(runeVarbit);
|
||||
int runeId = client.getVarbitValue(runeVarbit);
|
||||
RunepouchRune rune = RunepouchRune.getRune(runeId);
|
||||
if (rune == null)
|
||||
{
|
||||
|
||||
@@ -490,14 +490,14 @@ public class ScreenshotPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
if (config.screenshotCollectionLogEntries() && chatMessage.startsWith(COLLECTION_LOG_TEXT) && client.getVar(Varbits.COLLECTION_LOG_NOTIFICATION) == 1)
|
||||
if (config.screenshotCollectionLogEntries() && chatMessage.startsWith(COLLECTION_LOG_TEXT) && client.getVarbitValue(Varbits.COLLECTION_LOG_NOTIFICATION) == 1)
|
||||
{
|
||||
String entry = Text.removeTags(chatMessage).substring(COLLECTION_LOG_TEXT.length());
|
||||
String fileName = "Collection log (" + entry + ")";
|
||||
takeScreenshot(fileName, SD_COLLECTION_LOG);
|
||||
}
|
||||
|
||||
if (chatMessage.contains("combat task") && config.screenshotCombatAchievements() && client.getVar(Varbits.COMBAT_ACHIEVEMENTS_POPUP) == 1)
|
||||
if (chatMessage.contains("combat task") && config.screenshotCombatAchievements() && client.getVarbitValue(Varbits.COMBAT_ACHIEVEMENTS_POPUP) == 1)
|
||||
{
|
||||
String fileName = parseCombatAchievementWidget(chatMessage);
|
||||
if (!fileName.isEmpty())
|
||||
@@ -663,7 +663,7 @@ public class ScreenshotPlugin extends Plugin
|
||||
String fileName = "Collection log (" + entry + ")";
|
||||
takeScreenshot(fileName, SD_COLLECTION_LOG);
|
||||
}
|
||||
if (topText.equalsIgnoreCase("Combat Task Completed!") && config.screenshotCombatAchievements() && client.getVar(Varbits.COMBAT_ACHIEVEMENTS_POPUP) == 0)
|
||||
if (topText.equalsIgnoreCase("Combat Task Completed!") && config.screenshotCombatAchievements() && client.getVarbitValue(Varbits.COMBAT_ACHIEVEMENTS_POPUP) == 0)
|
||||
{
|
||||
String entry = Text.removeTags(bottomText).substring("Task Completed: ".length());
|
||||
String fileName = "Combat task (" + entry.replaceAll("[:?]", "") + ")";
|
||||
|
||||
@@ -123,7 +123,7 @@ enum SlayerUnlock
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return client.getVar(toggleVarbit) == 0;
|
||||
return client.getVarbitValue(toggleVarbit) == 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class StatusBarsOverlay extends Overlay
|
||||
return DISEASE_COLOR;
|
||||
}
|
||||
|
||||
if (client.getVar(Varbits.PARASITE) >= 1)
|
||||
if (client.getVarbitValue(Varbits.PARASITE) >= 1)
|
||||
{
|
||||
return PARASITE_COLOR;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class StatusBarsOverlay extends Overlay
|
||||
() -> getRestoreValue("Run Energy"),
|
||||
() ->
|
||||
{
|
||||
if (client.getVar(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) != 0)
|
||||
if (client.getVarbitValue(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) != 0)
|
||||
{
|
||||
return RUN_STAMINA_COLOR;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class StatusBarsPlugin extends Plugin
|
||||
barsDisplayed = true;
|
||||
}
|
||||
else if ((interacting instanceof NPC && ArrayUtils.contains(((NPC) interacting).getComposition().getActions(), "Attack"))
|
||||
|| (interacting instanceof Player && client.getVar(Varbits.PVP_SPEC_ORB) == 1))
|
||||
|| (interacting instanceof Player && client.getVarbitValue(Varbits.PVP_SPEC_ORB) == 1))
|
||||
{
|
||||
lastCombatActionTickCount = client.getTickCount();
|
||||
barsDisplayed = true;
|
||||
|
||||
@@ -206,13 +206,13 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
int raidVarb = client.getVar(Varbits.IN_RAID);
|
||||
int vengCooldownVarb = client.getVar(Varbits.VENGEANCE_COOLDOWN);
|
||||
int isVengeancedVarb = client.getVar(Varbits.VENGEANCE_ACTIVE);
|
||||
int raidVarb = client.getVarbitValue(Varbits.IN_RAID);
|
||||
int vengCooldownVarb = client.getVarbitValue(Varbits.VENGEANCE_COOLDOWN);
|
||||
int isVengeancedVarb = client.getVarbitValue(Varbits.VENGEANCE_ACTIVE);
|
||||
int poisonVarp = client.getVar(VarPlayer.POISON);
|
||||
int pvpVarb = client.getVar(Varbits.PVP_SPEC_ORB);
|
||||
int corruptionCooldownVarb = client.getVar(Varbits.CORRUPTION_COOLDOWN);
|
||||
int imbuedHeartCooldownVarb = client.getVar(Varbits.IMBUED_HEART_COOLDOWN);
|
||||
int pvpVarb = client.getVarbitValue(Varbits.PVP_SPEC_ORB);
|
||||
int corruptionCooldownVarb = client.getVarbitValue(Varbits.CORRUPTION_COOLDOWN);
|
||||
int imbuedHeartCooldownVarb = client.getVarbitValue(Varbits.IMBUED_HEART_COOLDOWN);
|
||||
|
||||
if (lastRaidVarb != raidVarb)
|
||||
{
|
||||
@@ -576,7 +576,7 @@ public class TimersPlugin extends Plugin
|
||||
|
||||
if (config.showOverload() && message.startsWith("You drink some of your") && message.contains("overload"))
|
||||
{
|
||||
if (client.getVar(Varbits.IN_RAID) == 1)
|
||||
if (client.getVarbitValue(Varbits.IN_RAID) == 1)
|
||||
{
|
||||
createGameTimer(OVERLOAD_RAID);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class TimestampPlugin extends Plugin
|
||||
|
||||
private Color getTimestampColour()
|
||||
{
|
||||
boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
boolean isChatboxTransparent = client.isResized() && client.getVarbitValue(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||
|
||||
return isChatboxTransparent ? config.transparentTimestamp() : config.opaqueTimestamp();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class FarmingTracker
|
||||
}
|
||||
|
||||
{
|
||||
String autoweed = Integer.toString(client.getVar(Varbits.AUTOWEED));
|
||||
String autoweed = Integer.toString(client.getVarbitValue(Varbits.AUTOWEED));
|
||||
if (!autoweed.equals(configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.AUTOWEED)))
|
||||
{
|
||||
configManager.setRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.AUTOWEED, autoweed);
|
||||
@@ -120,7 +120,7 @@ public class FarmingTracker
|
||||
}
|
||||
|
||||
{
|
||||
boolean botanist = client.getVar(Varbits.LEAGUE_RELIC_5) == 1;
|
||||
boolean botanist = client.getVarbitValue(Varbits.LEAGUE_RELIC_5) == 1;
|
||||
if (!Boolean.valueOf(botanist).equals(configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.BOTANIST, Boolean.class)))
|
||||
{
|
||||
configManager.setRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.BOTANIST, botanist);
|
||||
@@ -146,7 +146,7 @@ public class FarmingTracker
|
||||
// Write the config value if it doesn't match what is current, or it is more than 5 minutes old
|
||||
int varbit = patch.getVarbit();
|
||||
String key = patch.configKey();
|
||||
String strVarbit = Integer.toString(client.getVar(varbit));
|
||||
String strVarbit = Integer.toString(client.getVarbitValue(varbit));
|
||||
String storedValue = configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, key);
|
||||
|
||||
if (storedValue != null)
|
||||
@@ -173,7 +173,7 @@ public class FarmingTracker
|
||||
else if (!newRegionLoaded && timeSinceModalClose > 1)
|
||||
{
|
||||
PatchState previousPatchState = patch.getImplementation().forVarbitValue(Integer.parseInt(parts[0]));
|
||||
PatchState currentPatchState = patch.getImplementation().forVarbitValue(client.getVar(varbit));
|
||||
PatchState currentPatchState = patch.getImplementation().forVarbitValue(client.getVarbitValue(varbit));
|
||||
|
||||
if (previousPatchState == null || currentPatchState == null)
|
||||
{
|
||||
|
||||
@@ -131,7 +131,7 @@ public class WikiPlugin extends Plugin
|
||||
children[0] = null;
|
||||
|
||||
Widget vanilla = client.getWidget(WidgetInfo.MINIMAP_WIKI_BANNER);
|
||||
if (vanilla != null && client.getVar(Varbits.WIKI_ENTITY_LOOKUP) == 0)
|
||||
if (vanilla != null && client.getVarbitValue(Varbits.WIKI_ENTITY_LOOKUP) == 0)
|
||||
{
|
||||
vanilla.setHidden(false);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class WikiPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (client.getVar(Varbits.WIKI_ENTITY_LOOKUP) == 1) // disabled
|
||||
if (client.getVarbitValue(Varbits.WIKI_ENTITY_LOOKUP) == 1) // disabled
|
||||
{
|
||||
// when the wiki entity lookup option is disabled the banner parent layer,
|
||||
// which is used for var transmit events, is not positioned. This is copied
|
||||
|
||||
@@ -194,7 +194,7 @@ public class WintertodtPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged varbitChanged)
|
||||
{
|
||||
int timerValue = client.getVar(Varbits.WINTERTODT_TIMER);
|
||||
int timerValue = client.getVarbitValue(Varbits.WINTERTODT_TIMER);
|
||||
if (timerValue != previousTimerValue)
|
||||
{
|
||||
int timeToNotify = config.roundNotification();
|
||||
|
||||
@@ -335,8 +335,8 @@ public class WorldHopperPlugin extends Plugin
|
||||
int old1 = favoriteWorld1;
|
||||
int old2 = favoriteWorld2;
|
||||
|
||||
favoriteWorld1 = client.getVar(Varbits.WORLDHOPPER_FAVROITE_1);
|
||||
favoriteWorld2 = client.getVar(Varbits.WORLDHOPPER_FAVROITE_2);
|
||||
favoriteWorld1 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVROITE_1);
|
||||
favoriteWorld2 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVROITE_2);
|
||||
|
||||
if (old1 != favoriteWorld1 || old2 != favoriteWorld2)
|
||||
{
|
||||
|
||||
@@ -45,15 +45,15 @@ enum XpWorldType
|
||||
@Override
|
||||
int modifier(Client client)
|
||||
{
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_6) != 0)
|
||||
if (client.getVarbitValue(Varbits.LEAGUE_RELIC_6) != 0)
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_4) != 0)
|
||||
if (client.getVarbitValue(Varbits.LEAGUE_RELIC_4) != 0)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_2) != 0)
|
||||
if (client.getVarbitValue(Varbits.LEAGUE_RELIC_2) != 0)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
{
|
||||
if (client.isResized())
|
||||
{
|
||||
if (client.getVar(Varbits.SIDE_PANELS) == 1)
|
||||
if (client.getVarbitValue(Varbits.SIDE_PANELS) == 1)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE);
|
||||
}
|
||||
|
||||
@@ -209,8 +209,8 @@ public class WidgetOverlay extends Overlay
|
||||
{
|
||||
// The xptracker component layer isn't hidden if the counter and process bar are both configured "Off",
|
||||
// it just has its children hidden.
|
||||
if (client.getVar(Varbits.EXPERIENCE_TRACKER_COUNTER) == 30 // Off
|
||||
&& client.getVar(Varbits.EXPERIENCE_TRACKER_PROGRESS_BAR) == 0) // Off
|
||||
if (client.getVarbitValue(Varbits.EXPERIENCE_TRACKER_COUNTER) == 30 // Off
|
||||
&& client.getVarbitValue(Varbits.EXPERIENCE_TRACKER_PROGRESS_BAR) == 0) // Off
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public class WidgetOverlay extends Overlay
|
||||
}
|
||||
|
||||
OverlayPosition position;
|
||||
switch (client.getVar(Varbits.EXPERIENCE_TRACKER_POSITION))
|
||||
switch (client.getVarbitValue(Varbits.EXPERIENCE_TRACKER_POSITION))
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
@@ -269,7 +269,7 @@ public class WidgetOverlay extends Overlay
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
// Don't draw widget overlay if the PVP KDR stats text will be empty
|
||||
if (client.getVar(Varbits.SHOW_PVP_KDR_STATS) == 1)
|
||||
if (client.getVarbitValue(Varbits.SHOW_PVP_KDR_STATS) == 1)
|
||||
{
|
||||
return super.render(graphics);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user