Browse Source

traveller open gate fix

combat-2
FatBoy-DOTC 6 months ago
parent
commit
f06e2c2e5c
  1. 16
      src/engine/powers/poweractions/OpenGatePowerAction.java

16
src/engine/powers/poweractions/OpenGatePowerAction.java

@ -53,16 +53,16 @@ public class OpenGatePowerAction extends AbstractPowerAction { @@ -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 { @@ -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);
}

Loading…
Cancel
Save