runelite-client: add actor death event, use in bosstimer plugin

This commit is contained in:
Adam
2017-06-18 12:57:29 -04:00
parent 60566a7083
commit 54dbe446ed
6 changed files with 217 additions and 63 deletions

View File

@@ -26,6 +26,7 @@ package net.runelite.api;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.util.Objects;
import net.runelite.rs.api.CombatInfo1;
import net.runelite.rs.api.CombatInfo2;
import net.runelite.rs.api.CombatInfoList;
@@ -35,7 +36,7 @@ import net.runelite.rs.api.Node;
public abstract class Actor extends Renderable
{
private Client client;
private final Client client;
private net.runelite.rs.api.Actor actor;
public Actor(Client client, net.runelite.rs.api.Actor actor)
@@ -46,6 +47,37 @@ public abstract class Actor extends Renderable
this.actor = actor;
}
@Override
public int hashCode()
{
int hash = 5;
hash = 47 * hash + Objects.hashCode(this.client);
return hash;
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null)
{
return false;
}
if (getClass() != obj.getClass())
{
return false;
}
final Actor other = (Actor) obj;
if (!Objects.equals(this.client, other.client))
{
return false;
}
return true;
}
public abstract int getCombatLevel();
public abstract String getName();