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 AlchemyItem best;
|
||||||
private Cupboard suggestion;
|
private Cupboard suggestion;
|
||||||
|
private boolean hintSet;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AlchemyRoom(Client client, MTAConfig config, MTAPlugin plugin, ItemManager itemManager, InfoBoxManager infoBoxManager)
|
private AlchemyRoom(Client client, MTAConfig config, MTAPlugin plugin, ItemManager itemManager, InfoBoxManager infoBoxManager)
|
||||||
@@ -221,6 +222,11 @@ public class AlchemyRoom extends MTARoom
|
|||||||
if (!inside())
|
if (!inside())
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
if (hintSet)
|
||||||
|
{
|
||||||
|
client.clearHintArrow();
|
||||||
|
hintSet = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -381,6 +387,7 @@ public class AlchemyRoom extends MTARoom
|
|||||||
{
|
{
|
||||||
client.setHintArrow(object.getWorldLocation());
|
client.setHintArrow(object.getWorldLocation());
|
||||||
found = true;
|
found = true;
|
||||||
|
hintSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferedImage image = itemManager.getImage(alchemyItem.getId());
|
BufferedImage image = itemManager.getImage(alchemyItem.getId());
|
||||||
@@ -395,6 +402,7 @@ public class AlchemyRoom extends MTARoom
|
|||||||
if (!found && suggestion != null)
|
if (!found && suggestion != null)
|
||||||
{
|
{
|
||||||
client.setHintArrow(suggestion.gameObject.getWorldLocation());
|
client.setHintArrow(suggestion.gameObject.getWorldLocation());
|
||||||
|
hintSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public class EnchantmentRoom extends MTARoom
|
|||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final List<WorldPoint> dragonstones = new ArrayList<>();
|
private final List<WorldPoint> dragonstones = new ArrayList<>();
|
||||||
|
private boolean hintSet;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EnchantmentRoom(MTAConfig config, Client client)
|
private EnchantmentRoom(MTAConfig config, Client client)
|
||||||
@@ -64,6 +65,11 @@ public class EnchantmentRoom extends MTARoom
|
|||||||
if (gameStateChanged.getGameState() == GameState.LOADING)
|
if (gameStateChanged.getGameState() == GameState.LOADING)
|
||||||
{
|
{
|
||||||
dragonstones.clear();
|
dragonstones.clear();
|
||||||
|
if (hintSet)
|
||||||
|
{
|
||||||
|
client.clearHintArrow();
|
||||||
|
hintSet = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,10 +85,12 @@ public class EnchantmentRoom extends MTARoom
|
|||||||
if (nearest != null)
|
if (nearest != null)
|
||||||
{
|
{
|
||||||
client.setHintArrow(nearest);
|
client.setHintArrow(nearest);
|
||||||
|
hintSet = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
client.clearHintArrow();
|
client.clearHintArrow();
|
||||||
|
hintSet = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user