After the introduction of the new ABOVE_MAP layer, the dev tools overlay
was no longer able to draw above the map, which is needed for the widget
inspector.
Prior to this commit, hitpoints exp drops (and combined exp drops
containing hitpoints) would be highlighted for any combat prayer. This
commit corrects this behavior so combined drops will only be highlighted
when containing the proper combat style prayer, and split exp drops will
only highlight hitpoints when the correct prayer type was active for the
experience drops which precede it.
Fixesrunelite/runelite#1697
This adds a test which exposes an edge case where the needed prayer
levels to next combat level had been calculated to be 3 instead of 1,
and fixes that calculation.
Fixesrunelite/runelite#7103
This commit moves constants from the test to the overlay, and replaces
instances of magic numbers with them. It additionally fixes the odd
check in `correctPrayer()` and fixes some minor whitespace issues.
This commit fixes the occasional issue of xp drops not being highlighted
while flicking prayer from the prayer menu; that is, before this commit
it was possible to select or deselect a prayer between xp drop widgets
being spawned, causing different highlighting for them. This commit
saves the active prayer at the beginning of each tick and uses that
tick's prayer for all widgets unhidden during that tick.
Fixesrunelite/runelite#1280Closesrunelite/runelite#6679
[Per the updates for the upcoming
seasonal](https://www.runescape.com/oldschool/deadman/season), similar
to previous tournaments:
> Teleblock will now last for 150 seconds, or for 75 seconds with Protect from Magic active.
When becoming affected by an ice spell, such as Ice Barrage, when moving
prior to the effect's start, the previous code had a subtle bug where
the freeze timer would be applied in the chat message subscriber, but
the `client` would update the player's position before the onGameTick
subscriber was executed, meaning any movement on the same tick the
player became frozen would be registered as "movement", thus removing
that timer.
This fix sidesteps that issue by also ensuring that the client's tick
is different than the freeze tick, since that value appears to remain
unmodified between execution of these two methods.
Fixesrunelite/runelite#6658
In side stones view, going through the spell autocast selection process
will cause the combat widget to become unloaded and reloaded, rather
than triggering the previous code path where the widget would change
hidden state. This commit adds a second subscriber to handle this path
as well.
Fixesrunelite/runelite#6557
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.