From 3d96e6504ebd5183c415f66b7f8a864fb0b8c544 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 21 Aug 2024 17:40:24 -0500 Subject: [PATCH] All Effect Data Loaded From Parser --- .../db/handlers/dbEffectsBaseHandler.java | 282 ------------ src/engine/db/handlers/dbPowerHandler.java | 56 --- src/engine/gameManager/DbManager.java | 2 - src/engine/gameManager/PowersManager.java | 11 +- src/engine/powers/EffectsBase.java | 422 ++++++++++-------- .../AbstractEffectModifier.java | 18 + .../AdjustAboveDmgCapEffectModifier.java | 5 + .../AmbidexterityEffectModifier.java | 4 + .../ArmorPiercingEffectModifier.java | 5 + .../AttackDelayEffectModifier.java | 4 + .../AttributeEffectModifier.java | 5 + .../BlackMantleEffectModifier.java | 5 + .../BladeTrailsEffectModifier.java | 5 + .../effectmodifiers/BlockEffectModifier.java | 5 + .../BlockedPowerTypeEffectModifier.java | 5 + .../CannotAttackEffectModifier.java | 5 + .../CannotCastEffectModifier.java | 5 + .../CannotMoveEffectModifier.java | 5 + .../CannotTrackEffectModifier.java | 5 + .../CharmedEffectModifier.java | 5 + ...onstrainedAmbidexterityEffectModifier.java | 5 + .../effectmodifiers/DCVEffectModifier.java | 5 + .../effectmodifiers/DREffectModifier.java | 5 + .../DamageCapEffectModifier.java | 5 + .../DamageShieldEffectModifier.java | 5 + .../effectmodifiers/DodgeEffectModifier.java | 5 + .../DurabilityEffectModifier.java | 5 + .../ExclusiveDamageCapEffectModifier.java | 5 + .../effectmodifiers/FadeEffectModifier.java | 5 + .../effectmodifiers/FlyEffectModifier.java | 5 + .../effectmodifiers/HealthEffectModifier.java | 5 + .../HealthFullEffectModifier.java | 5 + .../HealthRecoverRateEffectModifier.java | 5 + .../IgnoreDamageCapEffectModifier.java | 5 + .../IgnorePassiveDefenseEffectModifier.java | 5 + .../ImmuneToAttackEffectModifier.java | 5 + .../ImmuneToEffectModifier.java | 5 + .../ImmuneToPowersEffectModifier.java | 5 + .../InvisibleEffectModifier.java | 5 + .../ItemNameEffectModifier.java | 5 + .../effectmodifiers/ManaEffectModifier.java | 5 + .../ManaFullEffectModifier.java | 5 + .../ManaRecoverRateEffectModifier.java | 5 + .../MaxDamageEffectModifier.java | 5 + .../MeleeDamageEffectModifier.java | 5 + .../MinDamageEffectModifier.java | 5 + .../effectmodifiers/NoModEffectModifier.java | 5 + .../effectmodifiers/OCVEffectModifier.java | 5 + .../effectmodifiers/ParryEffectModifier.java | 5 + .../PassiveDefenseEffectModifier.java | 5 + .../PowerCostEffectModifier.java | 5 + .../PowerCostHealthEffectModifier.java | 5 + .../PowerDamageEffectModifier.java | 5 + .../ProtectionFromEffectModifier.java | 5 + .../ResistanceEffectModifier.java | 5 + .../ScaleHeightEffectModifier.java | 5 + .../ScaleWidthEffectModifier.java | 5 + .../ScanRangeEffectModifier.java | 5 + .../SeeInvisibleEffectModifier.java | 5 + .../SilencedEffectModifier.java | 5 + .../effectmodifiers/SkillEffectModifier.java | 5 + .../effectmodifiers/SlayEffectModifier.java | 5 + .../effectmodifiers/SpeedEffectModifier.java | 5 + .../SpireBlockEffectModifier.java | 5 + .../StaminaEffectModifier.java | 5 + .../StaminaFullEffectModifier.java | 5 + .../StaminaRecoverRateEffectModifier.java | 5 + .../StunnedEffectModifier.java | 5 + .../effectmodifiers/ValueEffectModifier.java | 5 + .../WeaponProcEffectModifier.java | 5 + .../WeaponRangeEffectModifier.java | 5 + .../WeaponSpeedEffectModifier.java | 5 + 72 files changed, 584 insertions(+), 535 deletions(-) delete mode 100644 src/engine/db/handlers/dbEffectsBaseHandler.java delete mode 100644 src/engine/db/handlers/dbPowerHandler.java diff --git a/src/engine/db/handlers/dbEffectsBaseHandler.java b/src/engine/db/handlers/dbEffectsBaseHandler.java deleted file mode 100644 index 587b6b6b..00000000 --- a/src/engine/db/handlers/dbEffectsBaseHandler.java +++ /dev/null @@ -1,282 +0,0 @@ -// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . -// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· -// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ -// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ -// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ -// Magicbane Emulator Project © 2013 - 2022 -// www.magicbane.com - - -package engine.db.handlers; - -import engine.gameManager.DbManager; -import engine.gameManager.PowersManager; -import engine.mbEnums; -import engine.powers.EffectsBase; -import engine.powers.effectmodifiers.*; -import org.pmw.tinylog.Logger; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashSet; - -public class dbEffectsBaseHandler extends dbHandlerBase { - - public dbEffectsBaseHandler() { - - } - - public static void cacheAllEffectModifiers() { - - String IDString; - AbstractEffectModifier abstractEffectModifier = null; - - try (Connection connection = DbManager.getConnection(); - PreparedStatement prepareStatement = connection.prepareStatement("SELECT * FROM static_power_effectmod")) { - - ResultSet rs = prepareStatement.executeQuery(); - - while (rs.next()) { - - IDString = rs.getString("IDString"); - EffectsBase effectBase = PowersManager.getEffectByIDString(IDString); - mbEnums.ModType modifier = mbEnums.ModType.GetModType(rs.getString("modType")); - - //combine item prefix and suffix effect modifiers - - abstractEffectModifier = getCombinedModifiers(abstractEffectModifier, rs, effectBase, modifier); - - if (abstractEffectModifier != null) { - - if (EffectsBase.modifiersMap.containsKey(effectBase.getIDString()) == false) - EffectsBase.modifiersMap.put(effectBase.getIDString(), new HashSet<>()); - - EffectsBase.modifiersMap.get(effectBase.getIDString()).add(abstractEffectModifier); - - } - - } - - } catch (Exception e) { - Logger.error(e); - } - - } - - public static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ResultSet rs, EffectsBase effectBase, mbEnums.ModType modifier) throws SQLException { - switch (modifier) { - case AdjustAboveDmgCap: - abstractEffectModifier = new AdjustAboveDmgCapEffectModifier(rs); - break; - case Ambidexterity: - abstractEffectModifier = new AmbidexterityEffectModifier(rs); - break; - case AnimOverride: - break; - case ArmorPiercing: - abstractEffectModifier = new ArmorPiercingEffectModifier(rs); - break; - case AttackDelay: - abstractEffectModifier = new AttackDelayEffectModifier(rs); - break; - case Attr: - abstractEffectModifier = new AttributeEffectModifier(rs); - break; - case BlackMantle: - abstractEffectModifier = new BlackMantleEffectModifier(rs); - break; - case BladeTrails: - abstractEffectModifier = new BladeTrailsEffectModifier(rs); - break; - case Block: - abstractEffectModifier = new BlockEffectModifier(rs); - break; - case BlockedPowerType: - abstractEffectModifier = new BlockedPowerTypeEffectModifier(rs); - break; - case CannotAttack: - abstractEffectModifier = new CannotAttackEffectModifier(rs); - break; - case CannotCast: - abstractEffectModifier = new CannotCastEffectModifier(rs); - break; - case CannotMove: - abstractEffectModifier = new CannotMoveEffectModifier(rs); - break; - case CannotTrack: - abstractEffectModifier = new CannotTrackEffectModifier(rs); - break; - case Charmed: - abstractEffectModifier = new CharmedEffectModifier(rs); - break; - case ConstrainedAmbidexterity: - abstractEffectModifier = new ConstrainedAmbidexterityEffectModifier(rs); - break; - case DamageCap: - abstractEffectModifier = new DamageCapEffectModifier(rs); - break; - case DamageShield: - abstractEffectModifier = new DamageShieldEffectModifier(rs); - break; - case DCV: - abstractEffectModifier = new DCVEffectModifier(rs); - break; - case Dodge: - abstractEffectModifier = new DodgeEffectModifier(rs); - break; - case DR: - abstractEffectModifier = new DREffectModifier(rs); - break; - case Durability: - abstractEffectModifier = new DurabilityEffectModifier(rs); - break; - case ExclusiveDamageCap: - abstractEffectModifier = new ExclusiveDamageCapEffectModifier(rs); - break; - case Fade: - abstractEffectModifier = new FadeEffectModifier(rs); - break; - case Fly: - abstractEffectModifier = new FlyEffectModifier(rs); - break; - case Health: - abstractEffectModifier = new HealthEffectModifier(rs); - break; - case HealthFull: - abstractEffectModifier = new HealthFullEffectModifier(rs); - break; - case HealthRecoverRate: - abstractEffectModifier = new HealthRecoverRateEffectModifier(rs); - break; - case IgnoreDamageCap: - abstractEffectModifier = new IgnoreDamageCapEffectModifier(rs); - break; - case IgnorePassiveDefense: - abstractEffectModifier = new IgnorePassiveDefenseEffectModifier(rs); - break; - case ImmuneTo: - abstractEffectModifier = new ImmuneToEffectModifier(rs); - break; - case ImmuneToAttack: - abstractEffectModifier = new ImmuneToAttackEffectModifier(rs); - break; - case ImmuneToPowers: - abstractEffectModifier = new ImmuneToPowersEffectModifier(rs); - break; - case Invisible: - abstractEffectModifier = new InvisibleEffectModifier(rs); - break; - case ItemName: - abstractEffectModifier = new ItemNameEffectModifier(rs); - if (((ItemNameEffectModifier) abstractEffectModifier).name.isEmpty()) - break; - if (effectBase != null) - effectBase.setName((((ItemNameEffectModifier) abstractEffectModifier).name)); - break; - case Mana: - abstractEffectModifier = new ManaEffectModifier(rs); - break; - case ManaFull: - abstractEffectModifier = new ManaFullEffectModifier(rs); - break; - case ManaRecoverRate: - abstractEffectModifier = new ManaRecoverRateEffectModifier(rs); - break; - case MaxDamage: - abstractEffectModifier = new MaxDamageEffectModifier(rs); - break; - case MeleeDamageModifier: - abstractEffectModifier = new MeleeDamageEffectModifier(rs); - break; - case MinDamage: - abstractEffectModifier = new MinDamageEffectModifier(rs); - break; - case NoMod: - abstractEffectModifier = new NoModEffectModifier(rs); - break; - case OCV: - abstractEffectModifier = new OCVEffectModifier(rs); - break; - case Parry: - abstractEffectModifier = new ParryEffectModifier(rs); - break; - case PassiveDefense: - abstractEffectModifier = new PassiveDefenseEffectModifier(rs); - break; - case PowerCost: - abstractEffectModifier = new PowerCostEffectModifier(rs); - break; - case PowerCostHealth: - abstractEffectModifier = new PowerCostHealthEffectModifier(rs); - break; - case PowerDamageModifier: - abstractEffectModifier = new PowerDamageEffectModifier(rs); - break; - case ProtectionFrom: - abstractEffectModifier = new ProtectionFromEffectModifier(rs); - break; - case Resistance: - abstractEffectModifier = new ResistanceEffectModifier(rs); - break; - case ScaleHeight: - abstractEffectModifier = new ScaleHeightEffectModifier(rs); - break; - case ScaleWidth: - abstractEffectModifier = new ScaleWidthEffectModifier(rs); - break; - case ScanRange: - abstractEffectModifier = new ScanRangeEffectModifier(rs); - break; - case SeeInvisible: - abstractEffectModifier = new SeeInvisibleEffectModifier(rs); - break; - case Silenced: - abstractEffectModifier = new SilencedEffectModifier(rs); - break; - case Skill: - abstractEffectModifier = new SkillEffectModifier(rs); - break; - case Slay: - abstractEffectModifier = new SlayEffectModifier(rs); - break; - case Speed: - abstractEffectModifier = new SpeedEffectModifier(rs); - break; - case SpireBlock: - abstractEffectModifier = new SpireBlockEffectModifier(rs); - break; - case Stamina: - abstractEffectModifier = new StaminaEffectModifier(rs); - break; - case StaminaFull: - abstractEffectModifier = new StaminaFullEffectModifier(rs); - break; - case StaminaRecoverRate: - abstractEffectModifier = new StaminaRecoverRateEffectModifier(rs); - break; - case Stunned: - abstractEffectModifier = new StunnedEffectModifier(rs); - break; - case Value: - abstractEffectModifier = new ValueEffectModifier(rs); - if (effectBase != null) { - ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier; - effectBase.value = valueEffect.minMod; - } - break; - case WeaponProc: - abstractEffectModifier = new WeaponProcEffectModifier(rs); - break; - case WeaponRange: - abstractEffectModifier = new WeaponRangeEffectModifier(rs); - break; - case WeaponSpeed: - abstractEffectModifier = new WeaponSpeedEffectModifier(rs); - break; - - } - return abstractEffectModifier; - } -} diff --git a/src/engine/db/handlers/dbPowerHandler.java b/src/engine/db/handlers/dbPowerHandler.java deleted file mode 100644 index 65665818..00000000 --- a/src/engine/db/handlers/dbPowerHandler.java +++ /dev/null @@ -1,56 +0,0 @@ -// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . -// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· -// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ -// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ -// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ -// Magicbane Emulator Project © 2013 - 2022 -// www.magicbane.com - - -package engine.db.handlers; - -import engine.gameManager.DbManager; -import engine.gameManager.PowersManager; -import engine.mbEnums; -import engine.objects.Mob; -import engine.powers.EffectsBase; -import org.pmw.tinylog.Logger; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.HashSet; - -public class dbPowerHandler extends dbHandlerBase { - - public dbPowerHandler() { - this.localClass = Mob.class; - this.localObjectType = mbEnums.GameObjectType.valueOf(this.localClass.getSimpleName()); - } - public static void addAllAnimationOverrides() { - - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_animation_override")) { - - ResultSet rs = preparedStatement.executeQuery(); - - String IDString; - int animation; - while (rs.next()) { - IDString = rs.getString("IDString"); - - EffectsBase eb = PowersManager.getEffectByIDString(IDString); - if (eb != null) - IDString = eb.getIDString(); - - animation = rs.getInt("animation"); - PowersManager.AnimationOverrides.put(IDString, animation); - - } - } catch (Exception e) { - Logger.error(e); - } - - } - -} diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index 1cb13e83..e01d2865 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -69,8 +69,6 @@ public enum DbManager { public static final dbBlueprintHandler BlueprintQueries = new dbBlueprintHandler(); public static final dbShrineHandler ShrineQueries = new dbShrineHandler(); public static final dbRunegateHandler RunegateQueries = new dbRunegateHandler(); - - public static final dbPowerHandler PowerQueries = new dbPowerHandler(); public static final dbPetitionHandler PetitionQueries = new dbPetitionHandler(); private static final EnumMap> objectCache = new EnumMap<>(GameObjectType.class); public static Hasher hasher; diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 769ee19f..4f70aedb 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -10,8 +10,6 @@ package engine.gameManager; import engine.InterestManagement.Terrain; import engine.InterestManagement.WorldGrid; -import engine.db.handlers.dbEffectsBaseHandler; -import engine.db.handlers.dbPowerHandler; import engine.db.handlers.dbSkillReqHandler; import engine.job.AbstractJob; import engine.job.AbstractScheduleJob; @@ -22,7 +20,6 @@ import engine.jobs.FinishRecycleTimeJob; import engine.jobs.UseItemJob; import engine.jobs.UsePowerJob; import engine.math.Vector3fImmutable; -import engine.mbEnums; import engine.mbEnums.*; import engine.net.ByteBufferWriter; import engine.net.Dispatch; @@ -38,6 +35,7 @@ import engine.wpak.PowersParser; import engine.wpak.data.EffectEntry; import org.pmw.tinylog.Logger; +import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -58,7 +56,6 @@ public enum PowersManager { public static HashMap powerActionsByIDString = new HashMap<>(); public static HashMap powerActionsByID = new HashMap<>(); public static HashMap ActionTokenByIDString = new HashMap<>(); - public static HashMap AnimationOverrides = new HashMap<>(); public static HashMap> _allRunePowers; public static HashMap> _allRuneSkillAdjusts; public static HashMap> _effect_costMaps = new HashMap<>(); @@ -128,12 +125,6 @@ public enum PowersManager { PowersManager.effectsBaseByIDString.put(effectBase.getIDString(), effectBase); } - // Add Modifiers to Effects **Replace with parsed values from cfg file** - dbEffectsBaseHandler.cacheAllEffectModifiers(); - - // Add Source Types to Effects **Replace with parsed values from cfg file** - //dbPowerHandler.addAllSourceTypes(); - dbPowerHandler.addAllAnimationOverrides(); } // This pre-loads all powers and effects diff --git a/src/engine/powers/EffectsBase.java b/src/engine/powers/EffectsBase.java index 73a8b13f..bf903a2c 100644 --- a/src/engine/powers/EffectsBase.java +++ b/src/engine/powers/EffectsBase.java @@ -9,7 +9,6 @@ package engine.powers; -import engine.gameManager.DbManager; import engine.gameManager.DispatchManager; import engine.gameManager.PowersManager; import engine.job.JobContainer; @@ -35,21 +34,13 @@ import engine.wpak.data.ConditionEntry; import engine.wpak.data.EffectEntry; import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; - -import java.sql.Connection; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; -import java.util.HashMap; import java.util.HashSet; import java.util.concurrent.ConcurrentHashMap; public class EffectsBase { - - public static HashMap> modifiersMap = new HashMap<>(); - public static HashMap> EffectDamageTypes = new HashMap<>(); - private static ConcurrentHashMap itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); + private static final ConcurrentHashMap itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); public static int NewID = 3000; public int UUID; public String IDString; @@ -80,13 +71,13 @@ public class EffectsBase { public String name = ""; public float value = 0; private ConcurrentHashMap resourceCosts = new ConcurrentHashMap<>(); - private ConcurrentHashMap sourceTypes = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); //loaded values from parser - public HashSet effectSources = new HashSet<>(); - public HashSet effectModifiers = new HashSet<>(); - public HashSet effectFailCondition = new HashSet<>(); - public HashSet effectDamageType = new HashSet<>(); + public HashSet effectSources = new HashSet<>(); + public HashSet effectModifiers = new HashSet<>(); + public HashSet effectFailCondition = new HashSet<>(); + + public HashSet effectDamageTypes = new HashSet<>(); /** * No Table ID Constructor @@ -122,23 +113,28 @@ public class EffectsBase { this.isSuffix = true; //load effect modifiers - this.effectModifiers = new HashSet<>(entry.mods); + for (EffectModifier mod : entry.mods) + this.effectModifiers.add(getCombinedModifiers(null, mod, this, mod.type)); //load sources - for(String source : entry.sources) + for (String source : entry.sources) this.effectSources.add(EffectSourceType.GetEffectSourceType(source)); //load fail conditions - for(ConditionEntry condition : entry.conditions){ + for (ConditionEntry condition : entry.conditions) { PowerFailCondition failCondition = PowerFailCondition.valueOf(condition.condition); this.effectFailCondition.add(failCondition); - loadFailConditions(failCondition,this,condition); + loadFailConditions(failCondition, this, condition); + + //add all damage types + if(!condition.damageTypes.isEmpty()) + this.effectDamageTypes.addAll(condition.damageTypes); } - //TODO load damage types and slopes from conditions + } - public static void loadFailConditions(PowerFailCondition failCondition, EffectsBase eb, ConditionEntry entry){ + public static void loadFailConditions(PowerFailCondition failCondition, EffectsBase eb, ConditionEntry entry) { if (failCondition == null || eb == null) { return; @@ -148,52 +144,12 @@ public class EffectsBase { case TakeDamage: - // dont go any further. - - if (eb == null) - break; - eb.cancelOnTakeDamage = true; eb.amount = entry.arg; - eb.amountRamp = (float)entry.curveType.getValue(); - eb.useRampAdd = (float)entry.curveType.getValue() != 0; - - ArrayList damageTypes = new ArrayList<>(); - String damageType1 = ""; - String damageType2 = ""; - String damageType3 = ""; - for(mbEnums.DamageType dt : entry.damageTypes){ - damageTypes.add(dt.name()); - } - - - if (damageType1.isEmpty() && damageType2.isEmpty() && damageType3.isEmpty()) - break; - - if(damageTypes.get(0) != null) - damageType1 = damageTypes.get(0); - - if(damageTypes.get(1) != null) - damageType1 = damageTypes.get(1); - - if(damageTypes.get(2) != null) - damageType1 = damageTypes.get(2); - - if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken())) - EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>()); - - mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(damageType1); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - - dt = mbEnums.DamageType.getDamageType(damageType2); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - dt = mbEnums.DamageType.getDamageType(damageType3); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); + eb.amountRamp = (float) entry.curveType.getValue(); + eb.useRampAdd = (float) entry.curveType.getValue() != 0; break; case Attack: eb.cancelOnAttack = true; @@ -313,109 +269,6 @@ public class EffectsBase { // getFailConditions(); } - public static void loadFailConditions(HashMap effects) { - - try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_failcondition WHERE powerOrEffect = 'Effect';")) { - - ResultSet rs = preparedStatement.executeQuery(); - - PowerFailCondition failCondition = null; - - while (rs.next()) { - String fail = rs.getString("type"); - - - String IDString = rs.getString("IDString"); - failCondition = PowerFailCondition.valueOf(fail); - - if (failCondition == null) { - Logger.error("Couldn't Find FailCondition " + fail + " for " + IDString); - continue; - } - - - EffectsBase eb = effects.get(IDString); - - switch (failCondition) { - - case TakeDamage: - - // dont go any further. - - if (eb == null) - break; - - eb.cancelOnTakeDamage = true; - - - eb.amount = rs.getFloat("amount"); - eb.amountRamp = rs.getFloat("ramp"); - eb.useRampAdd = rs.getBoolean("UseAddFormula"); - - String damageType1 = rs.getString("damageType1"); - String damageType2 = rs.getString("damageType2"); - String damageType3 = rs.getString("damageType3"); - - if (damageType1.isEmpty() && damageType2.isEmpty() && damageType3.isEmpty()) - break; - - if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken())) - EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>()); - - mbEnums.DamageType dt = mbEnums.DamageType.getDamageType(damageType1); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - - dt = mbEnums.DamageType.getDamageType(damageType2); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - dt = mbEnums.DamageType.getDamageType(damageType3); - if (dt != null) - EffectsBase.EffectDamageTypes.get(eb.token).add(dt); - break; - case Attack: - eb.cancelOnAttack = true; - break; - case AttackSwing: - eb.cancelOnAttackSwing = true; - break; - case Cast: - eb.cancelOnCast = true; - break; - case CastSpell: - eb.cancelOnCastSpell = true; - break; - case EquipChange: - eb.cancelOnEquipChange = true; - break; - case Logout: - eb.cancelOnLogout = true; - break; - case Move: - eb.cancelOnMove = true; - break; - case NewCharm: - eb.cancelOnNewCharm = true; - break; - case Sit: - eb.cancelOnSit = true; - break; - case TerritoryClaim: - eb.cancelOnTerritoryClaim = true; - break; - case UnEquip: - eb.cancelOnUnEquip = true; - break; - } - } - - rs.close(); - } catch (Exception e) { - Logger.error(e); - } - } - public static String getItemEffectsByName(String string) { if (EffectsBase.itemEffectsByName.containsKey(string)) return EffectsBase.itemEffectsByName.get(string); @@ -439,14 +292,12 @@ public class EffectsBase { public boolean damageTypeSpecific() { - return EffectsBase.EffectDamageTypes.containsKey(this.token); + return !this.effectDamageTypes.isEmpty(); } public boolean containsDamageType(mbEnums.DamageType dt) { - if (!EffectsBase.EffectDamageTypes.containsKey(this.token)) - return false; - return EffectsBase.EffectDamageTypes.get(this.token).contains(dt); + return this.effectDamageTypes.contains(dt); } public int getUUID() { @@ -467,11 +318,7 @@ public class EffectsBase { } public HashSet getModifiers() { - - if (EffectsBase.modifiersMap.containsKey(this.IDString) == false) - return new HashSet<>(); // was never used or assigned to? - - return EffectsBase.modifiersMap.get(this.IDString); + return this.effectModifiers; } public boolean isPrefix() { @@ -803,16 +650,6 @@ public class EffectsBase { return this.cancelOnUnEquip; } - public String getDamageTypes() { - String text = ""; - if (!EffectsBase.EffectDamageTypes.containsKey(this.token)) - return text; - for (mbEnums.DamageType type : EffectsBase.EffectDamageTypes.get(this.token)) { - text += type.name() + ' '; - } - return text; - } - public String getName() { return name; @@ -822,4 +659,219 @@ public class EffectsBase { this.name = name; } + public static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, EffectModifier rs, EffectsBase effectBase, mbEnums.ModType modifier){ + switch (modifier) { + case AdjustAboveDmgCap: + abstractEffectModifier = new AdjustAboveDmgCapEffectModifier(rs); + break; + case Ambidexterity: + abstractEffectModifier = new AmbidexterityEffectModifier(rs); + break; + case AnimOverride: + break; + case ArmorPiercing: + abstractEffectModifier = new ArmorPiercingEffectModifier(rs); + break; + case AttackDelay: + abstractEffectModifier = new AttackDelayEffectModifier(rs); + break; + case Attr: + abstractEffectModifier = new AttributeEffectModifier(rs); + break; + case BlackMantle: + abstractEffectModifier = new BlackMantleEffectModifier(rs); + break; + case BladeTrails: + abstractEffectModifier = new BladeTrailsEffectModifier(rs); + break; + case Block: + abstractEffectModifier = new BlockEffectModifier(rs); + break; + case BlockedPowerType: + abstractEffectModifier = new BlockedPowerTypeEffectModifier(rs); + break; + case CannotAttack: + abstractEffectModifier = new CannotAttackEffectModifier(rs); + break; + case CannotCast: + abstractEffectModifier = new CannotCastEffectModifier(rs); + break; + case CannotMove: + abstractEffectModifier = new CannotMoveEffectModifier(rs); + break; + case CannotTrack: + abstractEffectModifier = new CannotTrackEffectModifier(rs); + break; + case Charmed: + abstractEffectModifier = new CharmedEffectModifier(rs); + break; + case ConstrainedAmbidexterity: + abstractEffectModifier = new ConstrainedAmbidexterityEffectModifier(rs); + break; + case DamageCap: + abstractEffectModifier = new DamageCapEffectModifier(rs); + break; + case DamageShield: + abstractEffectModifier = new DamageShieldEffectModifier(rs); + break; + case DCV: + abstractEffectModifier = new DCVEffectModifier(rs); + break; + case Dodge: + abstractEffectModifier = new DodgeEffectModifier(rs); + break; + case DR: + abstractEffectModifier = new DREffectModifier(rs); + break; + case Durability: + abstractEffectModifier = new DurabilityEffectModifier(rs); + break; + case ExclusiveDamageCap: + abstractEffectModifier = new ExclusiveDamageCapEffectModifier(rs); + break; + case Fade: + abstractEffectModifier = new FadeEffectModifier(rs); + break; + case Fly: + abstractEffectModifier = new FlyEffectModifier(rs); + break; + case Health: + abstractEffectModifier = new HealthEffectModifier(rs); + break; + case HealthFull: + abstractEffectModifier = new HealthFullEffectModifier(rs); + break; + case HealthRecoverRate: + abstractEffectModifier = new HealthRecoverRateEffectModifier(rs); + break; + case IgnoreDamageCap: + abstractEffectModifier = new IgnoreDamageCapEffectModifier(rs); + break; + case IgnorePassiveDefense: + abstractEffectModifier = new IgnorePassiveDefenseEffectModifier(rs); + break; + case ImmuneTo: + abstractEffectModifier = new ImmuneToEffectModifier(rs); + break; + case ImmuneToAttack: + abstractEffectModifier = new ImmuneToAttackEffectModifier(rs); + break; + case ImmuneToPowers: + abstractEffectModifier = new ImmuneToPowersEffectModifier(rs); + break; + case Invisible: + abstractEffectModifier = new InvisibleEffectModifier(rs); + break; + case ItemName: + abstractEffectModifier = new ItemNameEffectModifier(rs); + if (((ItemNameEffectModifier) abstractEffectModifier).name.isEmpty()) + break; + if (effectBase != null) + effectBase.setName((((ItemNameEffectModifier) abstractEffectModifier).name)); + break; + case Mana: + abstractEffectModifier = new ManaEffectModifier(rs); + break; + case ManaFull: + abstractEffectModifier = new ManaFullEffectModifier(rs); + break; + case ManaRecoverRate: + abstractEffectModifier = new ManaRecoverRateEffectModifier(rs); + break; + case MaxDamage: + abstractEffectModifier = new MaxDamageEffectModifier(rs); + break; + case MeleeDamageModifier: + abstractEffectModifier = new MeleeDamageEffectModifier(rs); + break; + case MinDamage: + abstractEffectModifier = new MinDamageEffectModifier(rs); + break; + case NoMod: + abstractEffectModifier = new NoModEffectModifier(rs); + break; + case OCV: + abstractEffectModifier = new OCVEffectModifier(rs); + break; + case Parry: + abstractEffectModifier = new ParryEffectModifier(rs); + break; + case PassiveDefense: + abstractEffectModifier = new PassiveDefenseEffectModifier(rs); + break; + case PowerCost: + abstractEffectModifier = new PowerCostEffectModifier(rs); + break; + case PowerCostHealth: + abstractEffectModifier = new PowerCostHealthEffectModifier(rs); + break; + case PowerDamageModifier: + abstractEffectModifier = new PowerDamageEffectModifier(rs); + break; + case ProtectionFrom: + abstractEffectModifier = new ProtectionFromEffectModifier(rs); + break; + case Resistance: + abstractEffectModifier = new ResistanceEffectModifier(rs); + break; + case ScaleHeight: + abstractEffectModifier = new ScaleHeightEffectModifier(rs); + break; + case ScaleWidth: + abstractEffectModifier = new ScaleWidthEffectModifier(rs); + break; + case ScanRange: + abstractEffectModifier = new ScanRangeEffectModifier(rs); + break; + case SeeInvisible: + abstractEffectModifier = new SeeInvisibleEffectModifier(rs); + break; + case Silenced: + abstractEffectModifier = new SilencedEffectModifier(rs); + break; + case Skill: + abstractEffectModifier = new SkillEffectModifier(rs); + break; + case Slay: + abstractEffectModifier = new SlayEffectModifier(rs); + break; + case Speed: + abstractEffectModifier = new SpeedEffectModifier(rs); + break; + case SpireBlock: + abstractEffectModifier = new SpireBlockEffectModifier(rs); + break; + case Stamina: + abstractEffectModifier = new StaminaEffectModifier(rs); + break; + case StaminaFull: + abstractEffectModifier = new StaminaFullEffectModifier(rs); + break; + case StaminaRecoverRate: + abstractEffectModifier = new StaminaRecoverRateEffectModifier(rs); + break; + case Stunned: + abstractEffectModifier = new StunnedEffectModifier(rs); + break; + case Value: + abstractEffectModifier = new ValueEffectModifier(rs); + if (effectBase != null) { + ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier; + effectBase.value = valueEffect.minMod; + } + break; + case WeaponProc: + abstractEffectModifier = new WeaponProcEffectModifier(rs); + break; + case WeaponRange: + abstractEffectModifier = new WeaponRangeEffectModifier(rs); + break; + case WeaponSpeed: + abstractEffectModifier = new WeaponSpeedEffectModifier(rs); + break; + + } + return abstractEffectModifier; + } + } diff --git a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java index e36d25c6..cac0175c 100644 --- a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java @@ -17,6 +17,7 @@ import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; import engine.powers.EffectsBase; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -57,6 +58,23 @@ public abstract class AbstractEffectModifier { this.string2 = rs.getString("string2"); } + public AbstractEffectModifier(EffectModifier mod) { + + this.IDString = mod.type.name(); + this.effectType = mod.type.name(); + this.modType = mod.type; + this.type = mod.type.name().replace("\"", ""); + this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", "")); + this.minMod = mod.min; + this.maxMod = mod.max; + this.percentMod = mod.scale; + this.ramp = (float)mod.compoundCurveType.getValue(); + this.useRampAdd = (float)mod.compoundCurveType.getValue() != 0; + + this.string1 = mod.arg1; + this.string2 = mod.arg2; + } + public int getUUID() { return this.UUID; diff --git a/src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java b/src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java index 20672b83..72c4e316 100644 --- a/src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class AdjustAboveDmgCapEffectModifier extends AbstractEffectModifier { super(rs); } + public AdjustAboveDmgCapEffectModifier(EffectModifier rs){ + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java b/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java index 0c617bec..9a107657 100644 --- a/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java @@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; import engine.mbEnums.ModType; import engine.mbEnums.SourceType; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -23,6 +24,9 @@ public class AmbidexterityEffectModifier extends AbstractEffectModifier { public AmbidexterityEffectModifier(ResultSet rs) throws SQLException { super(rs); } + public AmbidexterityEffectModifier(EffectModifier rs) { + super(rs); + } @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java b/src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java index aab12746..afe7dd5e 100644 --- a/src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class ArmorPiercingEffectModifier extends AbstractEffectModifier { super(rs); } + public ArmorPiercingEffectModifier(EffectModifier rs){ + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java b/src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java index 59af7200..ab657de1 100644 --- a/src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,9 @@ public class AttackDelayEffectModifier extends AbstractEffectModifier { public AttackDelayEffectModifier(ResultSet rs) throws SQLException { super(rs); } + public AttackDelayEffectModifier(EffectModifier rs){ + super(rs); + } @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/AttributeEffectModifier.java b/src/engine/powers/effectmodifiers/AttributeEffectModifier.java index 831d8a62..39782d6d 100644 --- a/src/engine/powers/effectmodifiers/AttributeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AttributeEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class AttributeEffectModifier extends AbstractEffectModifier { super(rs); } + public AttributeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java b/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java index 283a9545..75dcc308 100644 --- a/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java @@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; import engine.mbEnums.ModType; import engine.mbEnums.SourceType; import engine.objects.*; +import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -25,6 +26,10 @@ public class BlackMantleEffectModifier extends AbstractEffectModifier { super(rs); } + public BlackMantleEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java b/src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java index 5fd08bbc..8b678323 100644 --- a/src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class BladeTrailsEffectModifier extends AbstractEffectModifier { super(rs); } + public BladeTrailsEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/BlockEffectModifier.java b/src/engine/powers/effectmodifiers/BlockEffectModifier.java index feb9386c..5fc120ce 100644 --- a/src/engine/powers/effectmodifiers/BlockEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BlockEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class BlockEffectModifier extends AbstractEffectModifier { super(rs); } + public BlockEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java b/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java index 1af36449..bf792125 100644 --- a/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java @@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.mbEnums.ModType; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier { super(rs); } + public BlockedPowerTypeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java b/src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java index 67f72aaf..bba4c0cf 100644 --- a/src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class CannotAttackEffectModifier extends AbstractEffectModifier { super(rs); } + public CannotAttackEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java b/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java index 6114aaa3..f257d155 100644 --- a/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CannotCastEffectModifier.java @@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.mbEnums; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -23,6 +24,10 @@ public class CannotCastEffectModifier extends AbstractEffectModifier { super(rs); } + public CannotCastEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java b/src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java index 5cf0b8e7..9d819464 100644 --- a/src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class CannotMoveEffectModifier extends AbstractEffectModifier { super(rs); } + public CannotMoveEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java b/src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java index e5c235a9..40f604d3 100644 --- a/src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class CannotTrackEffectModifier extends AbstractEffectModifier { super(rs); } + public CannotTrackEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/CharmedEffectModifier.java b/src/engine/powers/effectmodifiers/CharmedEffectModifier.java index 0d464e94..4f05b967 100644 --- a/src/engine/powers/effectmodifiers/CharmedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/CharmedEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class CharmedEffectModifier extends AbstractEffectModifier { super(rs); } + public CharmedEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java b/src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java index 47e8047b..621294e3 100644 --- a/src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class ConstrainedAmbidexterityEffectModifier extends AbstractEffectModifi super(rs); } + public ConstrainedAmbidexterityEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DCVEffectModifier.java b/src/engine/powers/effectmodifiers/DCVEffectModifier.java index 16f0283c..f8d38253 100644 --- a/src/engine/powers/effectmodifiers/DCVEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DCVEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class DCVEffectModifier extends AbstractEffectModifier { super(rs); } + public DCVEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DREffectModifier.java b/src/engine/powers/effectmodifiers/DREffectModifier.java index 5ff9096f..d79a9463 100644 --- a/src/engine/powers/effectmodifiers/DREffectModifier.java +++ b/src/engine/powers/effectmodifiers/DREffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class DREffectModifier extends AbstractEffectModifier { super(rs); } + public DREffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DamageCapEffectModifier.java b/src/engine/powers/effectmodifiers/DamageCapEffectModifier.java index 403dc7dc..cc912f9b 100644 --- a/src/engine/powers/effectmodifiers/DamageCapEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DamageCapEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class DamageCapEffectModifier extends AbstractEffectModifier { super(rs); } + public DamageCapEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java b/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java index 788f5700..e9640a55 100644 --- a/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java @@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; import engine.mbEnums; import engine.objects.*; import engine.powers.DamageShield; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class DamageShieldEffectModifier extends AbstractEffectModifier { super(rs); } + public DamageShieldEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DodgeEffectModifier.java b/src/engine/powers/effectmodifiers/DodgeEffectModifier.java index 027a3335..a4308f39 100644 --- a/src/engine/powers/effectmodifiers/DodgeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DodgeEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class DodgeEffectModifier extends AbstractEffectModifier { super(rs); } + public DodgeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/DurabilityEffectModifier.java b/src/engine/powers/effectmodifiers/DurabilityEffectModifier.java index d69f9f6a..28b7cb82 100644 --- a/src/engine/powers/effectmodifiers/DurabilityEffectModifier.java +++ b/src/engine/powers/effectmodifiers/DurabilityEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class DurabilityEffectModifier extends AbstractEffectModifier { super(rs); } + public DurabilityEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java b/src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java index 1e53ae89..009221f7 100644 --- a/src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class ExclusiveDamageCapEffectModifier extends AbstractEffectModifier { super(rs); } + public ExclusiveDamageCapEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/FadeEffectModifier.java b/src/engine/powers/effectmodifiers/FadeEffectModifier.java index ede4cad9..1af0a9cd 100644 --- a/src/engine/powers/effectmodifiers/FadeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/FadeEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class FadeEffectModifier extends AbstractEffectModifier { super(rs); } + public FadeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/FlyEffectModifier.java b/src/engine/powers/effectmodifiers/FlyEffectModifier.java index a3dc0a49..651b73a6 100644 --- a/src/engine/powers/effectmodifiers/FlyEffectModifier.java +++ b/src/engine/powers/effectmodifiers/FlyEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class FlyEffectModifier extends AbstractEffectModifier { super(rs); } + public FlyEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/HealthEffectModifier.java b/src/engine/powers/effectmodifiers/HealthEffectModifier.java index 63be4cae..7232be25 100644 --- a/src/engine/powers/effectmodifiers/HealthEffectModifier.java +++ b/src/engine/powers/effectmodifiers/HealthEffectModifier.java @@ -20,6 +20,7 @@ import engine.net.AbstractNetMsg; import engine.net.client.msg.ModifyHealthKillMsg; import engine.net.client.msg.ModifyHealthMsg; import engine.objects.*; +import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -41,6 +42,10 @@ public class HealthEffectModifier extends AbstractEffectModifier { } } + public HealthEffectModifier(EffectModifier rs) { + super(rs); + } + public static float getMinDamage(float baseMin, float intelligence, float spirit, float focus) { float min = baseMin * (((float) Math.pow(intelligence, 0.75f) * 0.0311f) + (0.02f * (int) focus) + ((float) Math.pow(spirit, 0.75f) * 0.0416f)); return (float) ((int) (min + 0.5f)); //round to nearest whole number diff --git a/src/engine/powers/effectmodifiers/HealthFullEffectModifier.java b/src/engine/powers/effectmodifiers/HealthFullEffectModifier.java index 4dc68b0a..43dc595e 100644 --- a/src/engine/powers/effectmodifiers/HealthFullEffectModifier.java +++ b/src/engine/powers/effectmodifiers/HealthFullEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class HealthFullEffectModifier extends AbstractEffectModifier { super(rs); } + public HealthFullEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java b/src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java index f657a765..df6df373 100644 --- a/src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java +++ b/src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class HealthRecoverRateEffectModifier extends AbstractEffectModifier { super(rs); } + public HealthRecoverRateEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java b/src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java index 6eb71af7..129e9de2 100644 --- a/src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java +++ b/src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class IgnoreDamageCapEffectModifier extends AbstractEffectModifier { super(rs); } + public IgnoreDamageCapEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java b/src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java index c4092bbd..44912699 100644 --- a/src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java +++ b/src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class IgnorePassiveDefenseEffectModifier extends AbstractEffectModifier { super(rs); } + public IgnorePassiveDefenseEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java b/src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java index 003855f9..be454471 100644 --- a/src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ImmuneToAttackEffectModifier extends AbstractEffectModifier { super(rs); } + public ImmuneToAttackEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java b/src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java index f237a800..9b930e9d 100644 --- a/src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ImmuneToEffectModifier extends AbstractEffectModifier { super(rs); } + public ImmuneToEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java b/src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java index 9ee5df4f..381274ae 100644 --- a/src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ImmuneToPowersEffectModifier extends AbstractEffectModifier { super(rs); } + public ImmuneToPowersEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java b/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java index 5c79cabe..8666c38c 100644 --- a/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java +++ b/src/engine/powers/effectmodifiers/InvisibleEffectModifier.java @@ -16,6 +16,7 @@ import engine.net.client.ClientConnection; import engine.objects.*; import engine.powers.ActionsBase; import engine.powers.PowersBase; +import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -27,6 +28,10 @@ public class InvisibleEffectModifier extends AbstractEffectModifier { super(rs); } + public InvisibleEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ItemNameEffectModifier.java b/src/engine/powers/effectmodifiers/ItemNameEffectModifier.java index bf51fd3d..c4f39a8b 100644 --- a/src/engine/powers/effectmodifiers/ItemNameEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ItemNameEffectModifier.java @@ -15,6 +15,7 @@ import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; import engine.powers.EffectsBase; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -122,6 +123,10 @@ public class ItemNameEffectModifier extends AbstractEffectModifier { EffectsBase.addItemEffectsByName(n, IDString); } + public ItemNameEffectModifier(EffectModifier rs) { + super(rs); + } + public String getName() { return this.name; } diff --git a/src/engine/powers/effectmodifiers/ManaEffectModifier.java b/src/engine/powers/effectmodifiers/ManaEffectModifier.java index cfa30efe..ba73c920 100644 --- a/src/engine/powers/effectmodifiers/ManaEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ManaEffectModifier.java @@ -21,6 +21,7 @@ import engine.powers.ActionsBase; import engine.powers.poweractions.AbstractPowerAction; import engine.powers.poweractions.DamageOverTimePowerAction; import engine.powers.poweractions.DirectDamagePowerAction; +import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -43,6 +44,10 @@ public class ManaEffectModifier extends AbstractEffectModifier { } } + public ManaEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { if (awo == null) { diff --git a/src/engine/powers/effectmodifiers/ManaFullEffectModifier.java b/src/engine/powers/effectmodifiers/ManaFullEffectModifier.java index ad1fa6b4..5aa5e39e 100644 --- a/src/engine/powers/effectmodifiers/ManaFullEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ManaFullEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ManaFullEffectModifier extends AbstractEffectModifier { super(rs); } + public ManaFullEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java b/src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java index 7c657e61..cd43f5e9 100644 --- a/src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ManaRecoverRateEffectModifier extends AbstractEffectModifier { super(rs); } + public ManaRecoverRateEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java b/src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java index dafe263a..92a34848 100644 --- a/src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java +++ b/src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class MaxDamageEffectModifier extends AbstractEffectModifier { super(rs); } + public MaxDamageEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java b/src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java index 156cc502..801e8987 100644 --- a/src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java +++ b/src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class MeleeDamageEffectModifier extends AbstractEffectModifier { super(rs); } + public MeleeDamageEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/MinDamageEffectModifier.java b/src/engine/powers/effectmodifiers/MinDamageEffectModifier.java index 7eeae151..6d1d6fc4 100644 --- a/src/engine/powers/effectmodifiers/MinDamageEffectModifier.java +++ b/src/engine/powers/effectmodifiers/MinDamageEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class MinDamageEffectModifier extends AbstractEffectModifier { super(rs); } + public MinDamageEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/NoModEffectModifier.java b/src/engine/powers/effectmodifiers/NoModEffectModifier.java index 63c8cb90..0b31fa62 100644 --- a/src/engine/powers/effectmodifiers/NoModEffectModifier.java +++ b/src/engine/powers/effectmodifiers/NoModEffectModifier.java @@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.mbEnums.GameObjectType; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class NoModEffectModifier extends AbstractEffectModifier { super(rs); } + public NoModEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { //TODO check if anything needs removed. diff --git a/src/engine/powers/effectmodifiers/OCVEffectModifier.java b/src/engine/powers/effectmodifiers/OCVEffectModifier.java index 5d6cdc7b..5a00b584 100644 --- a/src/engine/powers/effectmodifiers/OCVEffectModifier.java +++ b/src/engine/powers/effectmodifiers/OCVEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class OCVEffectModifier extends AbstractEffectModifier { super(rs); } + public OCVEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ParryEffectModifier.java b/src/engine/powers/effectmodifiers/ParryEffectModifier.java index 386e9f5c..71835664 100644 --- a/src/engine/powers/effectmodifiers/ParryEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ParryEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ParryEffectModifier extends AbstractEffectModifier { super(rs); } + public ParryEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java b/src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java index b9ad4bb6..84f825f4 100644 --- a/src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java +++ b/src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class PassiveDefenseEffectModifier extends AbstractEffectModifier { super(rs); } + public PassiveDefenseEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/PowerCostEffectModifier.java b/src/engine/powers/effectmodifiers/PowerCostEffectModifier.java index 57c8216e..4a5c95b8 100644 --- a/src/engine/powers/effectmodifiers/PowerCostEffectModifier.java +++ b/src/engine/powers/effectmodifiers/PowerCostEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class PowerCostEffectModifier extends AbstractEffectModifier { super(rs); } + public PowerCostEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java b/src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java index ad80fdf7..26d3508b 100644 --- a/src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java +++ b/src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class PowerCostHealthEffectModifier extends AbstractEffectModifier { super(rs); } + public PowerCostHealthEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java b/src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java index 336bda4e..ade57340 100644 --- a/src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java +++ b/src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class PowerDamageEffectModifier extends AbstractEffectModifier { super(rs); } + public PowerDamageEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java b/src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java index 2b32aa95..afa750a9 100644 --- a/src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ProtectionFromEffectModifier extends AbstractEffectModifier { super(rs); } + public ProtectionFromEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ResistanceEffectModifier.java b/src/engine/powers/effectmodifiers/ResistanceEffectModifier.java index 341268e1..93a1ff1b 100644 --- a/src/engine/powers/effectmodifiers/ResistanceEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ResistanceEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ResistanceEffectModifier extends AbstractEffectModifier { super(rs); } + public ResistanceEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java b/src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java index e9872926..d5b4e5f3 100644 --- a/src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class ScaleHeightEffectModifier extends AbstractEffectModifier { super(rs); } + public ScaleHeightEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java b/src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java index 40339310..a4128ea3 100644 --- a/src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class ScaleWidthEffectModifier extends AbstractEffectModifier { super(rs); } + public ScaleWidthEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java b/src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java index 0b5f34a4..b2ed8aee 100644 --- a/src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class ScanRangeEffectModifier extends AbstractEffectModifier { super(rs); } + public ScanRangeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java b/src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java index ae779788..859429c8 100644 --- a/src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SeeInvisibleEffectModifier extends AbstractEffectModifier { super(rs); } + public SeeInvisibleEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/SilencedEffectModifier.java b/src/engine/powers/effectmodifiers/SilencedEffectModifier.java index 0bb0577b..1f2db5ff 100644 --- a/src/engine/powers/effectmodifiers/SilencedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SilencedEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SilencedEffectModifier extends AbstractEffectModifier { super(rs); } + public SilencedEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/SkillEffectModifier.java b/src/engine/powers/effectmodifiers/SkillEffectModifier.java index 1f3928c3..63af13a0 100644 --- a/src/engine/powers/effectmodifiers/SkillEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SkillEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SkillEffectModifier extends AbstractEffectModifier { super(rs); } + public SkillEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/SlayEffectModifier.java b/src/engine/powers/effectmodifiers/SlayEffectModifier.java index 9c149bdc..8c08a184 100644 --- a/src/engine/powers/effectmodifiers/SlayEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SlayEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SlayEffectModifier extends AbstractEffectModifier { super(rs); } + public SlayEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/SpeedEffectModifier.java b/src/engine/powers/effectmodifiers/SpeedEffectModifier.java index 153dad7a..e1dfb35c 100644 --- a/src/engine/powers/effectmodifiers/SpeedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SpeedEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SpeedEffectModifier extends AbstractEffectModifier { super(rs); } + public SpeedEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { //Logger.error(this.getSimpleClassName(), "Speed applied with " + trains + " trains"); diff --git a/src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java b/src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java index 7cd3620f..d4dc88be 100644 --- a/src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java +++ b/src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class SpireBlockEffectModifier extends AbstractEffectModifier { super(rs); } + public SpireBlockEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/StaminaEffectModifier.java b/src/engine/powers/effectmodifiers/StaminaEffectModifier.java index 9567cfd0..fa11ffef 100644 --- a/src/engine/powers/effectmodifiers/StaminaEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StaminaEffectModifier.java @@ -21,6 +21,7 @@ import engine.powers.ActionsBase; import engine.powers.poweractions.AbstractPowerAction; import engine.powers.poweractions.DamageOverTimePowerAction; import engine.powers.poweractions.DirectDamagePowerAction; +import engine.wpak.data.EffectModifier; import org.pmw.tinylog.Logger; import java.sql.ResultSet; @@ -43,6 +44,10 @@ public class StaminaEffectModifier extends AbstractEffectModifier { } } + public StaminaEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { if (awo == null) { diff --git a/src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java b/src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java index 475ce82a..3c33f4dc 100644 --- a/src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class StaminaFullEffectModifier extends AbstractEffectModifier { super(rs); } + public StaminaFullEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java b/src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java index b2847a8c..08ba57f0 100644 --- a/src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class StaminaRecoverRateEffectModifier extends AbstractEffectModifier { super(rs); } + public StaminaRecoverRateEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java index 58a7c1e0..60658abd 100644 --- a/src/engine/powers/effectmodifiers/StunnedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/StunnedEffectModifier.java @@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.mbEnums.GameObjectType; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -22,6 +23,10 @@ public class StunnedEffectModifier extends AbstractEffectModifier { super(rs); } + public StunnedEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/ValueEffectModifier.java b/src/engine/powers/effectmodifiers/ValueEffectModifier.java index 6b68cc83..6998bcdc 100644 --- a/src/engine/powers/effectmodifiers/ValueEffectModifier.java +++ b/src/engine/powers/effectmodifiers/ValueEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class ValueEffectModifier extends AbstractEffectModifier { super(rs); } + public ValueEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java b/src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java index 5ef4251b..9daaf43a 100644 --- a/src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java +++ b/src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java @@ -16,6 +16,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -26,6 +27,10 @@ public class WeaponProcEffectModifier extends AbstractEffectModifier { super(rs); } + public WeaponProcEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java b/src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java index 52d21e2a..9a7f2287 100644 --- a/src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java +++ b/src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java @@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; import engine.jobs.AbstractEffectJob; import engine.objects.*; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -21,6 +22,10 @@ public class WeaponRangeEffectModifier extends AbstractEffectModifier { super(rs); } + public WeaponRangeEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) { diff --git a/src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java b/src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java index b39958e0..fccd8338 100644 --- a/src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java +++ b/src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java @@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; import engine.objects.AbstractWorldObject; import engine.objects.Building; import engine.objects.Item; +import engine.wpak.data.EffectModifier; import java.sql.ResultSet; import java.sql.SQLException; @@ -24,6 +25,10 @@ public class WeaponSpeedEffectModifier extends AbstractEffectModifier { super(rs); } + public WeaponSpeedEffectModifier(EffectModifier rs) { + super(rs); + } + @Override protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {