This patch updates the inventory tags plugin to utilize the MenuManager
util to better add menu options to the inventory tab.
Fixesrunelite/runelite#6132
VarClientInt(2) is set to `1` whenever a tooltip is present, meaning we
should never render a tooltip when it is set that way. Some menu options
(world map dungeon links) have a null widget associated with them, and
do not utilize the TOOLTIP_TIMEOUT VarClientInt, so this check is
necessary to avoid adding a duplicate tooltip.
Fixesrunelite/runelite#3278
This updates the fairy ring icon to more closely resemble existing
travel icons and be less busy-looking than the current "sparkly" icon.
Closesrunelite/runelite#2940
The effects of the Tele Block spell expire on three possible conditions:
1. When a player leaves the wilderness on a non-PVP/DMM world
2. When a player enters a PVP/DMM world safe zone
3. When a player logs out
Leaving the wilderness can be detected via Varbits changes, entering
safe zones in PVP/DMM worlds can be detected via WidgetHiddenChanged
events, and logging out is already detected via GameStateChanged events.
With that said, addressing the first two cases is not a trvial effort as
there are certain race conditions that must be handled. The
WidgetHiddenChanged event triggers upon login to PVP worlds regardless
of where you log in, and the PVP widgets all initially load in a state
which would be reflective of being in a safe zone, and are later set to
the proper state before the first display frame is rendered. Similarly,
during world hops, GameStateChanged and VarbitChanged events trigger in
a pattern which causes the client to think that a player is always
outside the wilderness upon reaching a `LOGGED_IN` game state; that is,
the following events occur on world hopping:
1. Game state changes to `HOPPING`
2. Varbits are all reset to default values. In the case of the
wilderness varbit, it is set to 0--the value representing being
outside the wilderness.
3. Game state changes to `LOGGED_IN`
4. Varbits are set based on player information. Only at this point is
the IN_WILDERNESS varbit set to its proper value.
To handle these race conditions, the event subscribers for game state
change and widget hidden events only set a flag which is checked once
per game tick to handle PVP safe zone (and wilderness varbit) checks.
Fixesrunelite/runelite#2384
This plugin displays the virtual level in the denominator of given
skills, and the virtual total level on the skills tab.
Fixesrunelite/runelite#375
Co-authored-by: Joshua Filby <joshua@filby.me>
The plugin is initialized with `lastTime` as null, meaning that if
`onGameTick` is called before `onInteractingChanged`, you can encounter
a case where after starting the client or plugin, `lastTime` has not yet
been set while `client.getLocalPlayer().getInteracting` is null (because
`onGameTick` gets sequenced before `onInteractingChanged` per tick),
causing an NPE when trying to compare a null Duration.
Fixesrunelite/runelite#5451
If a file is expected but not found, an IllegalArgumentException will be
thrown as a result of `null` being passed to the `ImageIO.read` call.
This commit adds better logging for this error case.
In Seasonal Deadman mode, protect from magic does not half the duration
of normal spellbook freeze spells (bind, snare, entangle) unlike
normal worlds and the permanent Deadman mode world.
Source: https://www.runescape.com/oldschool/deadman/season
This replaces invocations of `Class.getResourceAsStream(path)` in order
to relieve plugin/client code from managing synchronization and handling
exceptions.
This commit adds `ImageUtil::resizeCanvas`, `ImageUtil::outlineImage`,
and `ImageUtil::fillImage`, and applies these functions to the clan
manager to replace the clan rank images with calls to `SpriteManager`.
This commit adds `ImageUtil::bufferedImageFromImage`,
`ImageUtil::alphaOffset`, `ImageUtil::grayscaleImage`, and
`ImageUtil::flipImage` functions and applies them to client and plugin
code to remove unneeded derivative images from the resources directory.
With previous code, grayscaleOffset was modifying all image components
(including alpha), instead of only the color components. This commit
fixes that by using a `RescaleOp` instead, which allows for distinct
modifiers per component.
All chat messages are either checked for equality to command strings
which are not followed by spaces or are checked to start with command
strings followed by a space, and use the constants' length (plus one,
for the space) to get the command argument.
In addition to creating `colorTag`, `prependColorTag`, and
`wrapWithColorTag` functions, this commit moves
`SwingUtil::toHexColor` and `SwingUtil::colorLerp` to this new class.
SDMM worlds have both `DEADMAN` and `SEASONAL_DEADMAN` types, so we
must check for the latter first to accurately determine the hiscore
lookup endpoint.
The xp tracker plugin does not need to query for a list of available
worlds, it only needs to know the current world type, which can be found
using `Client.getWorldType()` instead. As such, usages of WorldClient
are substituted with this simpler method instead.
Closesrunelite/runelite#4190