diff --git a/src/engine/powers/poweractions/OpenGatePowerAction.java b/src/engine/powers/poweractions/OpenGatePowerAction.java index 2bff5c9c..8b946ec7 100644 --- a/src/engine/powers/poweractions/OpenGatePowerAction.java +++ b/src/engine/powers/poweractions/OpenGatePowerAction.java @@ -53,16 +53,16 @@ public class OpenGatePowerAction extends AbstractPowerAction { if (source == null || awo == null || !(awo.getObjectType().equals(mbEnums.GameObjectType.Building)) || pb == null) return; - // Make sure building has a blueprint - - if (targetBuilding.getBlueprintUUID() == 0) + // Make sure target building is a runegate + if(targetBuilding.meshUUID != 24500) // runegate return; - // Make sure building is actually a runegate. - - if (targetBuilding.getBlueprint().getBuildingGroup() != BuildingGroup.RUNEGATE) - return; + // Which runegate was clicked on? + Runegate runeGate = Runegate._runegates.get(targetBuilding.getObjectUUID()); + if(runeGate == null){ + return; // mob camp prop runegate cannot be opened + } // Which portal was opened? token = pb.getToken(); @@ -104,9 +104,7 @@ public class OpenGatePowerAction extends AbstractPowerAction { default: } - // Which runegate was clicked on? - Runegate runeGate = Runegate._runegates.get(targetBuilding.getObjectUUID()); runeGate.activatePortal(portalType); }