traveller open gate fix

This commit is contained in:
2024-05-26 22:36:12 -05:00
parent 74b425e567
commit f06e2c2e5c
@@ -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);
}