mta: clear hint arrow when leaving enchantment and alchemist room

This commit is contained in:
Adam
2021-06-04 16:13:34 -04:00
parent ab5d90fdca
commit 559410b537
2 changed files with 16 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ public class AlchemyRoom extends MTARoom
private AlchemyItem best;
private Cupboard suggestion;
private boolean hintSet;
@Inject
private AlchemyRoom(Client client, MTAConfig config, MTAPlugin plugin, ItemManager itemManager, InfoBoxManager infoBoxManager)
@@ -221,6 +222,11 @@ public class AlchemyRoom extends MTARoom
if (!inside())
{
reset();
if (hintSet)
{
client.clearHintArrow();
hintSet = false;
}
}
}
}
@@ -381,6 +387,7 @@ public class AlchemyRoom extends MTARoom
{
client.setHintArrow(object.getWorldLocation());
found = true;
hintSet = true;
}
BufferedImage image = itemManager.getImage(alchemyItem.getId());
@@ -395,6 +402,7 @@ public class AlchemyRoom extends MTARoom
if (!found && suggestion != null)
{
client.setHintArrow(suggestion.gameObject.getWorldLocation());
hintSet = true;
}
}

View File

@@ -50,6 +50,7 @@ public class EnchantmentRoom extends MTARoom
private final Client client;
private final List<WorldPoint> dragonstones = new ArrayList<>();
private boolean hintSet;
@Inject
private EnchantmentRoom(MTAConfig config, Client client)
@@ -64,6 +65,11 @@ public class EnchantmentRoom extends MTARoom
if (gameStateChanged.getGameState() == GameState.LOADING)
{
dragonstones.clear();
if (hintSet)
{
client.clearHintArrow();
hintSet = false;
}
}
}
@@ -79,10 +85,12 @@ public class EnchantmentRoom extends MTARoom
if (nearest != null)
{
client.setHintArrow(nearest);
hintSet = true;
}
else
{
client.clearHintArrow();
hintSet = false;
}
}