Search in sources :

Example 1 with Projectile

use of org.powerbot.bot.rt6.client.Projectile in project powerbot by powerbot.

the class Projectiles method get.

/**
 * {@inheritDoc}
 */
@Override
protected List<org.powerbot.script.rt6.Projectile> get() {
    final List<org.powerbot.script.rt6.Projectile> items = new ArrayList<org.powerbot.script.rt6.Projectile>();
    final Client client = ctx.client();
    if (client == null) {
        return items;
    }
    for (final ProjectileNode n : NodeQueue.get(client.getProjectileDeque(), ProjectileNode.class)) {
        final Projectile p = n.getProjectile();
        if (!p.isNull()) {
            items.add(new org.powerbot.script.rt6.Projectile(ctx, p));
        }
    }
    return items;
}
Also used : ArrayList(java.util.ArrayList) Client(org.powerbot.bot.rt6.client.Client) ProjectileNode(org.powerbot.bot.rt6.client.ProjectileNode) Projectile(org.powerbot.bot.rt6.client.Projectile)

Aggregations

ArrayList (java.util.ArrayList)1 Client (org.powerbot.bot.rt6.client.Client)1 Projectile (org.powerbot.bot.rt6.client.Projectile)1 ProjectileNode (org.powerbot.bot.rt6.client.ProjectileNode)1