Browse Source

Teleport poweraction work

feature-config-usage
MagicBot 2 months ago
parent
commit
98664a8983
  1. 15
      src/engine/powers/poweractions/TeleportPowerAction.java

15
src/engine/powers/poweractions/TeleportPowerAction.java

@ -21,20 +21,17 @@ import engine.powers.ActionsBase;
import engine.powers.PowersBase; import engine.powers.PowersBase;
import engine.powers.effectmodifiers.AbstractEffectModifier; import engine.powers.effectmodifiers.AbstractEffectModifier;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import engine.wpak.data.PowerAction;
import java.sql.ResultSet;
import java.sql.SQLException;
public class TeleportPowerAction extends AbstractPowerAction { public class TeleportPowerAction extends AbstractPowerAction {
private boolean ignoreNoTeleSpire; private boolean ignoreNoTeleSpire;
public TeleportPowerAction(ResultSet rs) throws SQLException { public TeleportPowerAction(PowerAction powerAction) {
super(rs); super(powerAction);
int flags = rs.getInt("flags"); this.ignoreNoTeleSpire = powerAction.ignoreNoTeleSpire;
this.ignoreNoTeleSpire = ((flags & 32768) != 0) ? true : false;
} }
private static void failTeleport(PowersBase pb, AbstractCharacter awo) { private static void failTeleport(PowersBase pb, AbstractCharacter awo) {
@ -46,10 +43,6 @@ public class TeleportPowerAction extends AbstractPowerAction {
PowersManager.finishRecycleTime(pb.getToken(), (PlayerCharacter) awo, true); PowersManager.finishRecycleTime(pb.getToken(), (PlayerCharacter) awo, true);
} }
public boolean ignoreNoTeleSpire() {
return this.ignoreNoTeleSpire;
}
@Override @Override
protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) { protected void _startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int trains, ActionsBase ab, PowersBase pb) {

Loading…
Cancel
Save