discord: Fix NMZ area check to exclude KBD lair

NMZ reuses the KBD region ID but is always above plane 0
This commit is contained in:
TheStonedTurtle
2020-03-26 21:07:08 -07:00
committed by Jordan Atwood
parent 0faf994f54
commit 7744056766

View File

@@ -381,7 +381,15 @@ public class DiscordPlugin extends Plugin
return;
}
final DiscordGameEventType discordGameEventType = DiscordGameEventType.fromRegion(playerRegionID);
DiscordGameEventType discordGameEventType = DiscordGameEventType.fromRegion(playerRegionID);
// NMZ uses the same region ID as KBD. KBD is always on plane 0 and NMZ is always above plane 0
// Since KBD requires going through the wilderness there is no EventType for it
if (DiscordGameEventType.MG_NIGHTMARE_ZONE == discordGameEventType
&& client.getLocalPlayer().getWorldLocation().getPlane() == 0)
{
discordGameEventType = null;
}
if (discordGameEventType == null)
{