mta: clear hint arrow when leaving enchantment and alchemist room
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user