nightmarezone: Fix area check to exclude KBD lair

Fixes #3692
This commit is contained in:
TheStonedTurtle
2020-03-21 22:32:46 -07:00
committed by Jordan Atwood
parent 18a9a60b7d
commit 0faf994f54

View File

@@ -243,6 +243,12 @@ public class NightmareZonePlugin extends Plugin
public boolean isInNightmareZone()
{
return Arrays.equals(client.getMapRegions(), NMZ_MAP_REGION);
if (client.getLocalPlayer() == null)
{
return false;
}
// NMZ and the KBD lair uses the same region ID but NMZ uses planes 1-3 and KBD uses plane 0
return client.getLocalPlayer().getWorldLocation().getPlane() > 0 && Arrays.equals(client.getMapRegions(), NMZ_MAP_REGION);
}
}