rs-client/apis
This commit is contained in:
@@ -653,7 +653,32 @@ public enum Varbits
|
||||
*/
|
||||
BUILDING_MODE(2176),
|
||||
|
||||
WINTERTODT_TIMER(7980);
|
||||
WINTERTODT_TIMER(7980),
|
||||
|
||||
/**
|
||||
* 1 if in game, 0 if not
|
||||
*/
|
||||
LMS_IN_GAME(5314),
|
||||
|
||||
/**
|
||||
* Amount of pvp kills in current game
|
||||
*/
|
||||
LMS_KILLS(5315),
|
||||
|
||||
/**
|
||||
* The x coordinate of the final safespace (world coord)
|
||||
*/
|
||||
LMS_SAFE_X(5316),
|
||||
|
||||
/**
|
||||
* Starts at 100, counts down every 10 ticks (6 seconds)
|
||||
*/
|
||||
LMS_POISON_PROGRESS(5317),
|
||||
|
||||
/**
|
||||
* The y coordinate of the final safespace (world coord)
|
||||
*/
|
||||
LMS_SAFE_Y(5320);
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
|
||||
@@ -33,6 +33,9 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.function.BiPredicate;
|
||||
import java.util.function.Consumer;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
|
||||
public class Geometry
|
||||
{
|
||||
@@ -451,4 +454,14 @@ public class Geometry
|
||||
{
|
||||
return clipPath(path.getPathIterator(new AffineTransform()), shape);
|
||||
}
|
||||
|
||||
public static void transformWorldToLocal(final Client client, final float[] coords)
|
||||
{
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, (int) coords[0], (int) coords[1]);
|
||||
if (lp != null)
|
||||
{
|
||||
coords[0] = lp.getX() - Perspective.LOCAL_TILE_SIZE / 2;
|
||||
coords[1] = lp.getY() - Perspective.LOCAL_TILE_SIZE / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -970,6 +970,7 @@ public class WidgetID
|
||||
|
||||
static class Pvp
|
||||
{
|
||||
static final int FOG_OVERLAY = 1;
|
||||
static final int PVP_WIDGET_CONTAINER = 54; // OUTDATED?
|
||||
static final int SKULL = 56; // OUTDATED?
|
||||
static final int ATTACK_RANGE = 59; // OUTDATED?
|
||||
|
||||
@@ -503,6 +503,7 @@ public enum WidgetInfo
|
||||
|
||||
MINIGAME_TELEPORT_BUTTON(WidgetID.MINIGAME_TAB_ID, WidgetID.Minigames.TELEPORT_BUTTON),
|
||||
|
||||
PVP_FOG_OVERLAY(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.FOG_OVERLAY),
|
||||
PVP_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.PVP_WIDGET_CONTAINER),
|
||||
PVP_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL_CONTAINER),
|
||||
PVP_SKULL(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL),
|
||||
|
||||
Reference in New Issue
Block a user