Refactored poweractions
This commit is contained in:
@@ -14,14 +14,12 @@ import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class BlockPowerAction extends AbstractPowerAction {
|
||||
|
||||
public BlockPowerAction(ResultSet rs) throws SQLException {
|
||||
public BlockPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,12 @@ import engine.mbEnums;
|
||||
import engine.objects.*;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class ClaimMinePowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClaimMinePowerAction(ResultSet rs) throws SQLException {
|
||||
public ClaimMinePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,14 +16,12 @@ import engine.objects.AbstractWorldObject;
|
||||
import engine.objects.Mob;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class ClearAggroPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClearAggroPowerAction(ResultSet rs) throws SQLException {
|
||||
public ClearAggroPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,12 @@ import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class ClearNearbyAggroPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClearNearbyAggroPowerAction(ResultSet rs) throws SQLException {
|
||||
public ClearNearbyAggroPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,15 +25,13 @@ import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
|
||||
public class CreateMobPowerAction extends AbstractPowerAction {
|
||||
|
||||
private int mobID;
|
||||
private int mobLevel;
|
||||
|
||||
public CreateMobPowerAction(PowerAction rs) throws SQLException {
|
||||
public CreateMobPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
|
||||
this.mobID = rs.petRace;
|
||||
|
||||
@@ -16,9 +16,8 @@ import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.EffectsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@@ -27,10 +26,11 @@ public class InvisPowerAction extends AbstractPowerAction {
|
||||
private String effectID;
|
||||
private EffectsBase effect;
|
||||
|
||||
public InvisPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
|
||||
public InvisPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects) {
|
||||
super(rs);
|
||||
|
||||
this.effectID = rs.getString("effectID");
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,17 +14,14 @@ import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.objects.Mob;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class MobRecallPowerAction extends AbstractPowerAction {
|
||||
|
||||
public MobRecallPowerAction(ResultSet rs) throws SQLException {
|
||||
public MobRecallPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
@@ -41,7 +38,7 @@ public class MobRecallPowerAction extends AbstractPowerAction {
|
||||
MovementManager.translocate(awoac, awoac.getBindLoc());
|
||||
if (awoac.getObjectType() == GameObjectType.Mob) {
|
||||
//MobAI.setAwake((Mob)awoac,true);
|
||||
((Mob) awoac).setCombatTarget(null);
|
||||
(awoac).setCombatTarget(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,16 +19,14 @@ import engine.objects.Building;
|
||||
import engine.objects.Runegate;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
public class OpenGatePowerAction extends AbstractPowerAction {
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public OpenGatePowerAction(ResultSet rs) throws SQLException {
|
||||
public OpenGatePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,14 +25,12 @@ import engine.objects.PlayerCharacter;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.server.MBServerStatics;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class RecallPowerAction extends AbstractPowerAction {
|
||||
|
||||
public RecallPowerAction(ResultSet rs) throws SQLException {
|
||||
public RecallPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,14 +14,12 @@ import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class ResurrectPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ResurrectPowerAction(ResultSet rs) throws SQLException {
|
||||
public ResurrectPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@ import engine.net.client.msg.PromptRecallMsg;
|
||||
import engine.objects.*;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import static engine.math.FastMath.sqr;
|
||||
import static engine.math.FastMath.sqrt;
|
||||
@@ -29,7 +27,7 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public RunegateTeleportPowerAction(ResultSet rs) throws SQLException {
|
||||
public RunegateTeleportPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,16 +14,14 @@ import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class SimpleDamagePowerAction extends AbstractPowerAction {
|
||||
|
||||
private int simpleDamage;
|
||||
|
||||
public SimpleDamagePowerAction(ResultSet rs) throws SQLException {
|
||||
public SimpleDamagePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
|
||||
this.simpleDamage = rs.getInt("simpleDamage");
|
||||
|
||||
@@ -19,16 +19,14 @@ import engine.objects.Building;
|
||||
import engine.objects.PlayerCharacter;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
public class SpireDisablePowerAction extends AbstractPowerAction {
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public SpireDisablePowerAction(ResultSet rs) throws SQLException {
|
||||
public SpireDisablePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,8 @@ import engine.objects.*;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.server.MBServerStatics;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import static engine.math.FastMath.sqr;
|
||||
@@ -35,7 +34,7 @@ public class StealPowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public StealPowerAction(ResultSet rs) throws SQLException {
|
||||
public StealPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,16 +23,14 @@ import engine.objects.PlayerCharacter;
|
||||
import engine.objects.Zone;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
public class SummonPowerAction extends AbstractPowerAction {
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public SummonPowerAction(ResultSet rs) throws SQLException {
|
||||
public SummonPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,14 +14,12 @@ import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
|
||||
public class TreeChokePowerAction extends AbstractPowerAction {
|
||||
|
||||
public TreeChokePowerAction(ResultSet rs) throws SQLException {
|
||||
public TreeChokePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user