Set default offset to center of tile for arrows

Set default offset of the hint arrow to center of tile like type 2 of
the hint arrow does by default in runescape-client.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-04-09 00:56:27 +02:00
committed by Adam
parent 8615a0ad5d
commit 5aba4ea448
2 changed files with 10 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ import static net.runelite.api.MenuAction.PLAYER_THIRD_OPTION;
import net.runelite.api.MenuEntry;
import net.runelite.api.NPC;
import net.runelite.api.Node;
import static net.runelite.api.Perspective.LOCAL_TILE_SIZE;
import net.runelite.api.Player;
import net.runelite.api.Point;
import net.runelite.api.Prayer;
@@ -786,6 +787,9 @@ public abstract class RSClientMixin implements RSClient
client.setHintArrowTargetType(HintArrowType.WORLD_POSITION.getValue());
client.setHintArrowX(point.getX());
client.setHintArrowY(point.getY());
// position the arrow in center of the tile
client.setHintArrowOffsetX(LOCAL_TILE_SIZE / 2);
client.setHintArrowOffsetY(LOCAL_TILE_SIZE / 2);
}
@Copy("menuAction")

View File

@@ -595,6 +595,12 @@ public interface RSClient extends RSGameEngine, Client
@Import("hintArrowY")
int getHintArrowY();
@Import("hintArrowOffsetX")
void setHintArrowOffsetX(int value);
@Import("hintArrowOffsetY")
void setHintArrowOffsetY(int value);
@Import("hintArrowNpcTargetIdx")
void setHintArrowNpcTargetIdx(int value);