runelite-client: add anti drag plugin
This commit is contained in:
@@ -123,6 +123,12 @@ public abstract class RSClientMixin implements RSClient
|
||||
@Inject
|
||||
private static RSNPC[] oldNpcs = new RSNPC[32768];
|
||||
|
||||
@Inject
|
||||
private static int itemPressedDurationBuffer;
|
||||
|
||||
@Inject
|
||||
private static int inventoryDragDelay;
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public boolean isInterpolatePlayerAnimations()
|
||||
@@ -165,6 +171,13 @@ public abstract class RSClientMixin implements RSClient
|
||||
interpolateObjectAnimations = interpolate;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setInventoryDragDelay(int delay)
|
||||
{
|
||||
inventoryDragDelay = delay;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public AccountType getAccountType()
|
||||
@@ -633,6 +646,28 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
}
|
||||
|
||||
@FieldHook("itemPressedDuration")
|
||||
@Inject
|
||||
public static void itemPressedDurationChanged(int idx)
|
||||
{
|
||||
if (client.getItemPressedDuration() > 0)
|
||||
{
|
||||
itemPressedDurationBuffer++;
|
||||
if (itemPressedDurationBuffer >= inventoryDragDelay)
|
||||
{
|
||||
client.setItemPressedDuration(itemPressedDurationBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
client.setItemPressedDuration(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
itemPressedDurationBuffer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@FieldHook("skillExperiences")
|
||||
@Inject
|
||||
public static void experiencedChanged(int idx)
|
||||
|
||||
Reference in New Issue
Block a user