forked from MagicBane/Server
Signature argument renamed
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
|
||||
package engine.powers.poweractions;
|
||||
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.objects.AbstractCharacter;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
@@ -19,13 +17,6 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.EffectsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public abstract class AbstractPowerAction {
|
||||
@@ -47,12 +38,12 @@ public abstract class AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public AbstractPowerAction(PowerAction rs){
|
||||
public AbstractPowerAction(PowerAction powerAction) {
|
||||
|
||||
this.IDString = rs.action_id;
|
||||
this.type = rs.action_type;
|
||||
int flags = rs.itemFlag.ordinal();
|
||||
this.isAggressive = rs.isAggressive;
|
||||
this.IDString = powerAction.action_id;
|
||||
this.type = powerAction.action_type;
|
||||
int flags = powerAction.itemFlag.ordinal();
|
||||
this.isAggressive = powerAction.isAggressive;
|
||||
}
|
||||
|
||||
public AbstractPowerAction(int uUID, String iDString, String type, boolean isAggressive,
|
||||
|
||||
@@ -28,8 +28,6 @@ import engine.server.MBServerStatics;
|
||||
import engine.wpak.data.PowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||
@@ -39,11 +37,11 @@ public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||
private String effectParentID;
|
||||
private EffectsBase effectParent;
|
||||
|
||||
public ApplyEffectPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects){
|
||||
super(rs);
|
||||
this.effectParentID = rs.effects.get(0).effect_id;
|
||||
public ApplyEffectPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
this.effectParentID = powerAction.effects.get(0).effect_id;
|
||||
this.effectParent = effects.get(this.effectParentID);
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@@ -33,11 +31,11 @@ public class ApplyEffectsPowerAction extends AbstractPowerAction {
|
||||
private EffectsBase effect2;
|
||||
private EffectsBase effectParent;
|
||||
|
||||
public ApplyEffectsPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects){
|
||||
super(rs);
|
||||
this.IDString = rs.action_id;
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.effectID2 = rs.effects.get(2).effect_id;
|
||||
public ApplyEffectsPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
this.IDString = powerAction.action_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
this.effectID2 = powerAction.effects.get(2).effect_id;
|
||||
this.effect = effects.get(this.effectID);
|
||||
this.effect2 = effects.get(this.effectID2);
|
||||
this.effectParent = effects.get(this.IDString);
|
||||
|
||||
@@ -19,8 +19,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class BlockPowerAction extends AbstractPowerAction {
|
||||
|
||||
public BlockPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public BlockPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,19 +20,16 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
|
||||
public class CharmPowerAction extends AbstractPowerAction {
|
||||
|
||||
private int levelCap;
|
||||
private int levelCapRamp;
|
||||
|
||||
public CharmPowerAction(PowerAction rs){
|
||||
super(rs);
|
||||
this.levelCap = rs.levelCap;
|
||||
this.levelCapRamp = rs.levelCurve.ordinal();
|
||||
public CharmPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
this.levelCap = powerAction.levelCap;
|
||||
this.levelCapRamp = powerAction.levelCurve.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,8 +20,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class ClaimMinePowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClaimMinePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public ClaimMinePowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,8 +21,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class ClearAggroPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClearAggroPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public ClearAggroPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,8 +20,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class ClearNearbyAggroPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ClearNearbyAggroPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public ClearNearbyAggroPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,14 +16,11 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
|
||||
public class ConfusionPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ConfusionPowerAction(PowerAction rs){
|
||||
super(rs);
|
||||
public ConfusionPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,11 +31,11 @@ public class CreateMobPowerAction extends AbstractPowerAction {
|
||||
private int mobID;
|
||||
private int mobLevel;
|
||||
|
||||
public CreateMobPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public CreateMobPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
|
||||
this.mobID = rs.petRace;
|
||||
this.mobLevel = rs.petLevel;
|
||||
this.mobID = powerAction.petRace;
|
||||
this.mobLevel = powerAction.petLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,6 @@ 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;
|
||||
|
||||
|
||||
@@ -29,11 +27,11 @@ public class DamageOverTimePowerAction extends AbstractPowerAction {
|
||||
private int numIterations;
|
||||
private EffectsBase effect;
|
||||
|
||||
public DamageOverTimePowerAction(PowerAction rs, HashMap<String, EffectsBase> effects){
|
||||
super(rs);
|
||||
public DamageOverTimePowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
|
||||
this.effectID = rs.action_id;
|
||||
this.numIterations = rs.effects.get(0).cycleDelay;
|
||||
this.effectID = powerAction.action_id;
|
||||
this.numIterations = powerAction.effects.get(0).cycleDelay;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ 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;
|
||||
|
||||
|
||||
@@ -32,11 +30,11 @@ public class DeferredPowerPowerAction extends AbstractPowerAction {
|
||||
private EffectsBase effect;
|
||||
// private EffectsBase deferedPower;
|
||||
|
||||
public DeferredPowerPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects){
|
||||
super(rs);
|
||||
public DeferredPowerPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.deferedPowerID = rs.action_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
this.deferedPowerID = powerAction.action_id;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ 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;
|
||||
|
||||
|
||||
@@ -29,10 +27,10 @@ public class DirectDamagePowerAction extends AbstractPowerAction {
|
||||
private String effectID;
|
||||
private EffectsBase effect;
|
||||
|
||||
public DirectDamagePowerAction(PowerAction rs, HashMap<String, EffectsBase> effects){
|
||||
super(rs);
|
||||
public DirectDamagePowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,18 +22,15 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class FearPowerAction extends AbstractPowerAction {
|
||||
|
||||
private int levelCap;
|
||||
private int levelCapRamp;
|
||||
|
||||
public FearPowerAction(PowerAction rs){
|
||||
super(rs);
|
||||
this.levelCap = rs.levelCap;
|
||||
this.levelCapRamp = rs.levelCurve.ordinal();
|
||||
public FearPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
this.levelCap = powerAction.levelCap;
|
||||
this.levelCapRamp = powerAction.levelCurve.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,10 +26,10 @@ public class InvisPowerAction extends AbstractPowerAction {
|
||||
private String effectID;
|
||||
private EffectsBase effect;
|
||||
|
||||
public InvisPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects) {
|
||||
super(rs);
|
||||
public InvisPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class MobRecallPowerAction extends AbstractPowerAction {
|
||||
|
||||
public MobRecallPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public MobRecallPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,8 +26,8 @@ public class OpenGatePowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public OpenGatePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public OpenGatePowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
public OpenGatePowerAction(int uUID, String iDString, String type, boolean isAggressive, long validItemFlags) {
|
||||
|
||||
@@ -20,15 +20,13 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
|
||||
public class PeekPowerAction extends AbstractPowerAction {
|
||||
|
||||
public PeekPowerAction(PowerAction rs){
|
||||
super(rs);
|
||||
public PeekPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
protected static boolean peekSuccess(AbstractCharacter pc, AbstractWorldObject awo) {
|
||||
|
||||
@@ -30,8 +30,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class RecallPowerAction extends AbstractPowerAction {
|
||||
|
||||
public RecallPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public RecallPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,9 +17,6 @@ import engine.powers.ActionsBase;
|
||||
import engine.powers.PowersBase;
|
||||
import engine.wpak.data.PowerAction;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
|
||||
public class RemoveEffectPowerAction extends AbstractPowerAction {
|
||||
|
||||
@@ -27,11 +24,11 @@ public class RemoveEffectPowerAction extends AbstractPowerAction {
|
||||
public EffectSourceType sourceType;
|
||||
private boolean removeAll;
|
||||
|
||||
public RemoveEffectPowerAction(PowerAction rs){
|
||||
super(rs);
|
||||
String effectTypeToRemove = rs.damageType.name();
|
||||
public RemoveEffectPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
String effectTypeToRemove = powerAction.damageType.name();
|
||||
sourceType = EffectSourceType.GetEffectSourceType(effectTypeToRemove);
|
||||
this.removeAll = rs.removeAll;
|
||||
this.removeAll = powerAction.removeAll;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class ResurrectPowerAction extends AbstractPowerAction {
|
||||
|
||||
public ResurrectPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public ResurrectPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,8 +27,8 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public RunegateTeleportPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public RunegateTeleportPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,8 +21,8 @@ public class SimpleDamagePowerAction extends AbstractPowerAction {
|
||||
|
||||
private int simpleDamage;
|
||||
|
||||
public SimpleDamagePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public SimpleDamagePowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
|
||||
this.simpleDamage = 1;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ public class SpireDisablePowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public SpireDisablePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public SpireDisablePowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,8 +34,8 @@ public class StealPowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public StealPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public StealPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
protected static boolean stealSuccess(PlayerCharacter pc, AbstractWorldObject awo) {
|
||||
|
||||
@@ -30,8 +30,8 @@ public class SummonPowerAction extends AbstractPowerAction {
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public SummonPowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public SummonPowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,10 +26,10 @@ public class TransformPowerAction extends AbstractPowerAction {
|
||||
private String effectID;
|
||||
private EffectsBase effect;
|
||||
|
||||
public TransformPowerAction(PowerAction rs, HashMap<String, EffectsBase> effects) {
|
||||
super(rs);
|
||||
public TransformPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
||||
super(powerAction);
|
||||
|
||||
this.effectID = rs.effects.get(0).effect_id;
|
||||
this.effectID = powerAction.effects.get(0).effect_id;
|
||||
this.effect = effects.get(this.effectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import engine.wpak.data.PowerAction;
|
||||
|
||||
public class TreeChokePowerAction extends AbstractPowerAction {
|
||||
|
||||
public TreeChokePowerAction(PowerAction rs) {
|
||||
super(rs);
|
||||
public TreeChokePowerAction(PowerAction powerAction) {
|
||||
super(powerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user