hide dead NPCs for EntityHider (#1197)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(""))
|
||||
|
||||
Reference in New Issue
Block a user