project(mixins): Fix setCombatInfo
This commit is contained in:
@@ -33,6 +33,7 @@ import net.runelite.api.Actor;
|
||||
import net.runelite.api.Hitsplat;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.api.NpcID;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Point;
|
||||
@@ -68,7 +69,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
private static RSClient client;
|
||||
|
||||
@Inject
|
||||
private final Set<Integer> combatInfoFilter = ImmutableSet.of(0, 2, 16, 17, 18, 19, 20, 21, 22);
|
||||
private static final Set<Integer> combatInfoFilter = ImmutableSet.of(0, 2, 16, 17, 18, 19, 20, 21, 22);
|
||||
|
||||
@Inject
|
||||
private boolean dead;
|
||||
@@ -195,6 +196,16 @@ public abstract class RSActorMixin implements RSActor
|
||||
@Inject
|
||||
public void animationChanged(int idx)
|
||||
{
|
||||
if (this instanceof RSNPC)
|
||||
{
|
||||
int id = ((RSNPC) this).getId();
|
||||
|
||||
if (id == NpcID.CORPOREAL_BEAST && this.getAnimation() == 1676)
|
||||
{
|
||||
setDead(true);
|
||||
}
|
||||
}
|
||||
|
||||
AnimationChanged animationChange = new AnimationChanged();
|
||||
animationChange.setActor(this);
|
||||
client.getCallbacks().post(animationChange);
|
||||
@@ -273,7 +284,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
|
||||
if (healthRatio == 0)
|
||||
{
|
||||
if (!isDead())
|
||||
if (isDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -290,7 +301,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
}
|
||||
else if (healthRatio > 0)
|
||||
{
|
||||
if (this instanceof RSNPC && ((RSNPC) this).getId() == 319 && isDead())
|
||||
if (this instanceof RSNPC && ((RSNPC) this).getId() == NpcID.CORPOREAL_BEAST && isDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user