cleanup: remove cwars limitations

cleanup: remove cwars limitations
This commit is contained in:
Kyle
2020-01-31 09:39:25 +00:00
committed by GitHub
parent 91f1b74c5d
commit 89fdd05875

View File

@@ -71,7 +71,7 @@ public class HideUnder extends Plugin
{ {
if (event.getGameState() == GameState.LOGGED_IN) if (event.getGameState() == GameState.LOGGED_IN)
{ {
client.setIsHidingEntities(isPlayerRegionAllowed()); client.setIsHidingEntities(true);
} }
} }
@@ -106,20 +106,4 @@ public class HideUnder extends Plugin
} }
} }
} }
private boolean isPlayerRegionAllowed()
{
final Player localPlayer = client.getLocalPlayer();
if (localPlayer == null)
{
return true;
}
final WorldPoint playerWp = WorldPoint.fromLocalInstance(client, localPlayer.getLocalLocation());
final int playerRegionID = playerWp == null ? 0 : playerWp.getRegionID();
// 9520 = Castle Wars
return playerRegionID != 9520;
}
} }