hide dead NPCs for EntityHider (#1197)

This commit is contained in:
kecleon
2019-07-30 07:17:39 -07:00
committed by Lucwousin
parent 3701cfa294
commit 659bfe889c
5 changed files with 40 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ public abstract class EntityHiderBridgeMixin implements RSClient
@Inject
public static boolean hideProjectiles;
@Inject
public static boolean hideDeadNPCs;
@Inject
public static String hideNPCsNames;
@@ -151,4 +154,11 @@ public abstract class EntityHiderBridgeMixin implements RSClient
{
hideProjectiles = state;
}
@Inject
@Override
public void setDeadNPCsHidden(boolean state)
{
hideDeadNPCs = state;
}
}

View File

@@ -79,6 +79,9 @@ public abstract class EntityHiderMixin implements RSScene
@Shadow("hideProjectiles")
private static boolean hideProjectiles;
@Shadow("hideDeadNPCs")
private static boolean hideDeadNPCs;
@Copy("newGameObject")
abstract boolean addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSEntity renderable, int var10, boolean var11, long var12, int var13);
@@ -164,6 +167,11 @@ public abstract class EntityHiderMixin implements RSScene
}
}
if (hideDeadNPCs && npc.getHealthRatio() == 0)
{
return false;
}
for (String name : names)
{
if (name != null && !name.equals(""))