From 98664a89833f64b25c5a323a8181edf6db7be809 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 7 Sep 2024 15:18:02 -0400 Subject: [PATCH] Teleport poweraction work --- .../powers/poweractions/TeleportPowerAction.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/engine/powers/poweractions/TeleportPowerAction.java b/src/engine/powers/poweractions/TeleportPowerAction.java index 5dcbd052..90453059 100644 --- a/src/engine/powers/poweractions/TeleportPowerAction.java +++ b/src/engine/powers/poweractions/TeleportPowerAction.java @@ -21,20 +21,17 @@ import engine.powers.ActionsBase; import engine.powers.PowersBase; import engine.powers.effectmodifiers.AbstractEffectModifier; import engine.server.MBServerStatics; - -import java.sql.ResultSet; -import java.sql.SQLException; +import engine.wpak.data.PowerAction; public class TeleportPowerAction extends AbstractPowerAction { private boolean ignoreNoTeleSpire; - public TeleportPowerAction(ResultSet rs) throws SQLException { - super(rs); + public TeleportPowerAction(PowerAction powerAction) { + super(powerAction); - int flags = rs.getInt("flags"); - this.ignoreNoTeleSpire = ((flags & 32768) != 0) ? true : false; + this.ignoreNoTeleSpire = powerAction.ignoreNoTeleSpire; } private static void failTeleport(PowersBase pb, AbstractCharacter awo) { @@ -46,10 +43,6 @@ public class TeleportPowerAction extends AbstractPowerAction { PowersManager.finishRecycleTime(pb.getToken(), (PlayerCharacter) awo, true); } - public boolean ignoreNoTeleSpire() { - return this.ignoreNoTeleSpire; - } - @Override protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) {