timers: Fix leagues area teleport bug

Teleporting using a trailblazer leagues area teleport previously caused
a home or minigame teleport timer to be created, depending on which of
the two was most recently stored as `lastTeleportClicked`. To avoid
this, a new TeleportWidget has been registered which does not follow any
code paths in the plugin.
This commit is contained in:
Jordan Atwood
2020-11-12 18:36:15 -08:00
committed by Adam
parent 909acea9f7
commit cb31e1ddd4
3 changed files with 17 additions and 2 deletions

View File

@@ -32,7 +32,9 @@ import net.runelite.api.widgets.WidgetInfo;
enum TeleportWidget
{
HOME_TELEPORT,
MINIGAME_TELEPORT;
MINIGAME_TELEPORT,
TRAILBLAZER_AREA_TELEPORT,
;
private static final Collection HOME_TELEPORT_IDS = ImmutableList.of(
WidgetInfo.SPELL_LUMBRIDGE_HOME_TELEPORT.getId(),
@@ -56,6 +58,10 @@ enum TeleportWidget
{
return MINIGAME_TELEPORT;
}
else if (widgetId == WidgetInfo.TRAILBLAZER_AREA_TELEPORT.getId())
{
return TRAILBLAZER_AREA_TELEPORT;
}
return null;
}
}