api: remove projectile getInteracting
This is unused currently and is being abused by some hacked clients.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
package net.runelite.mixins;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.events.ProjectileMoved;
|
||||
import net.runelite.api.mixins.Inject;
|
||||
@@ -32,8 +31,6 @@ import net.runelite.api.mixins.MethodHook;
|
||||
import net.runelite.api.mixins.Mixin;
|
||||
import net.runelite.api.mixins.Shadow;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
import net.runelite.rs.api.RSNPC;
|
||||
import net.runelite.rs.api.RSPlayer;
|
||||
import net.runelite.rs.api.RSProjectile;
|
||||
|
||||
@Mixin(RSProjectile.class)
|
||||
@@ -51,36 +48,6 @@ public abstract class RSProjectileMixin implements RSProjectile
|
||||
return getEndCycle() - currentGameCycle;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public Actor getInteracting()
|
||||
{
|
||||
int interactingIndex = getRsInteracting();
|
||||
if (interactingIndex == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (interactingIndex > 0)
|
||||
{
|
||||
int idx = interactingIndex - 1;
|
||||
RSNPC[] npcs = client.getCachedNPCs();
|
||||
return npcs[idx];
|
||||
}
|
||||
else
|
||||
{
|
||||
int idx = -interactingIndex - 1;
|
||||
|
||||
if (idx == client.getLocalInteractingIndex())
|
||||
{
|
||||
return client.getLocalPlayer();
|
||||
}
|
||||
|
||||
RSPlayer[] players = client.getCachedPlayers();
|
||||
return players[idx];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a projectile is set to move towards a point. For
|
||||
* projectiles that target the ground, like AoE projectiles from
|
||||
|
||||
Reference in New Issue
Block a user