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