Browse Source

All Effect Data Loaded From Parser

feature-config-usage
FatBoy-DOTC 3 months ago
parent
commit
3d96e6504e
  1. 282
      src/engine/db/handlers/dbEffectsBaseHandler.java
  2. 56
      src/engine/db/handlers/dbPowerHandler.java
  3. 2
      src/engine/gameManager/DbManager.java
  4. 11
      src/engine/gameManager/PowersManager.java
  5. 422
      src/engine/powers/EffectsBase.java
  6. 18
      src/engine/powers/effectmodifiers/AbstractEffectModifier.java
  7. 5
      src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java
  8. 4
      src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java
  9. 5
      src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java
  10. 4
      src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java
  11. 5
      src/engine/powers/effectmodifiers/AttributeEffectModifier.java
  12. 5
      src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java
  13. 5
      src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java
  14. 5
      src/engine/powers/effectmodifiers/BlockEffectModifier.java
  15. 5
      src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java
  16. 5
      src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java
  17. 5
      src/engine/powers/effectmodifiers/CannotCastEffectModifier.java
  18. 5
      src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java
  19. 5
      src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java
  20. 5
      src/engine/powers/effectmodifiers/CharmedEffectModifier.java
  21. 5
      src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java
  22. 5
      src/engine/powers/effectmodifiers/DCVEffectModifier.java
  23. 5
      src/engine/powers/effectmodifiers/DREffectModifier.java
  24. 5
      src/engine/powers/effectmodifiers/DamageCapEffectModifier.java
  25. 5
      src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java
  26. 5
      src/engine/powers/effectmodifiers/DodgeEffectModifier.java
  27. 5
      src/engine/powers/effectmodifiers/DurabilityEffectModifier.java
  28. 5
      src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java
  29. 5
      src/engine/powers/effectmodifiers/FadeEffectModifier.java
  30. 5
      src/engine/powers/effectmodifiers/FlyEffectModifier.java
  31. 5
      src/engine/powers/effectmodifiers/HealthEffectModifier.java
  32. 5
      src/engine/powers/effectmodifiers/HealthFullEffectModifier.java
  33. 5
      src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java
  34. 5
      src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java
  35. 5
      src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java
  36. 5
      src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java
  37. 5
      src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java
  38. 5
      src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java
  39. 5
      src/engine/powers/effectmodifiers/InvisibleEffectModifier.java
  40. 5
      src/engine/powers/effectmodifiers/ItemNameEffectModifier.java
  41. 5
      src/engine/powers/effectmodifiers/ManaEffectModifier.java
  42. 5
      src/engine/powers/effectmodifiers/ManaFullEffectModifier.java
  43. 5
      src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java
  44. 5
      src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java
  45. 5
      src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java
  46. 5
      src/engine/powers/effectmodifiers/MinDamageEffectModifier.java
  47. 5
      src/engine/powers/effectmodifiers/NoModEffectModifier.java
  48. 5
      src/engine/powers/effectmodifiers/OCVEffectModifier.java
  49. 5
      src/engine/powers/effectmodifiers/ParryEffectModifier.java
  50. 5
      src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java
  51. 5
      src/engine/powers/effectmodifiers/PowerCostEffectModifier.java
  52. 5
      src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java
  53. 5
      src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java
  54. 5
      src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java
  55. 5
      src/engine/powers/effectmodifiers/ResistanceEffectModifier.java
  56. 5
      src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java
  57. 5
      src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java
  58. 5
      src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java
  59. 5
      src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java
  60. 5
      src/engine/powers/effectmodifiers/SilencedEffectModifier.java
  61. 5
      src/engine/powers/effectmodifiers/SkillEffectModifier.java
  62. 5
      src/engine/powers/effectmodifiers/SlayEffectModifier.java
  63. 5
      src/engine/powers/effectmodifiers/SpeedEffectModifier.java
  64. 5
      src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java
  65. 5
      src/engine/powers/effectmodifiers/StaminaEffectModifier.java
  66. 5
      src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java
  67. 5
      src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java
  68. 5
      src/engine/powers/effectmodifiers/StunnedEffectModifier.java
  69. 5
      src/engine/powers/effectmodifiers/ValueEffectModifier.java
  70. 5
      src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java
  71. 5
      src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java
  72. 5
      src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java

282
src/engine/db/handlers/dbEffectsBaseHandler.java

@ -1,282 +0,0 @@ @@ -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;
}
}

56
src/engine/db/handlers/dbPowerHandler.java

@ -1,56 +0,0 @@ @@ -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);
}
}
}

2
src/engine/gameManager/DbManager.java

@ -69,8 +69,6 @@ public enum DbManager { @@ -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<GameObjectType, ConcurrentHashMap<Integer, AbstractGameObject>> objectCache = new EnumMap<>(GameObjectType.class);
public static Hasher hasher;

11
src/engine/gameManager/PowersManager.java

@ -10,8 +10,6 @@ package engine.gameManager; @@ -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; @@ -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; @@ -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 { @@ -58,7 +56,6 @@ public enum PowersManager {
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
public static HashMap<String, Integer> ActionTokenByIDString = new HashMap<>();
public static HashMap<String, Integer> AnimationOverrides = new HashMap<>();
public static HashMap<Integer, ArrayList<RunePowerEntry>> _allRunePowers;
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
@ -128,12 +125,6 @@ public enum PowersManager { @@ -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

422
src/engine/powers/EffectsBase.java

@ -9,7 +9,6 @@ @@ -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; @@ -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<String, HashSet<AbstractEffectModifier>> modifiersMap = new HashMap<>();
public static HashMap<Integer, HashSet<mbEnums.DamageType>> EffectDamageTypes = new HashMap<>();
private static ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
private static final ConcurrentHashMap<String, String> 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 { @@ -80,13 +71,13 @@ public class EffectsBase {
public String name = "";
public float value = 0;
private ConcurrentHashMap<mbEnums.ResourceType, Integer> resourceCosts = new ConcurrentHashMap<>();
private ConcurrentHashMap<String, Boolean> sourceTypes = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
//loaded values from parser
public HashSet<EffectSourceType> effectSources = new HashSet<>();
public HashSet<EffectModifier> effectModifiers = new HashSet<>();
public HashSet<PowerFailCondition> effectFailCondition = new HashSet<>();
public HashSet<mbEnums.DamageType> effectDamageType = new HashSet<>();
public HashSet<EffectSourceType> effectSources = new HashSet<>();
public HashSet<AbstractEffectModifier> effectModifiers = new HashSet<>();
public HashSet<PowerFailCondition> effectFailCondition = new HashSet<>();
public HashSet<mbEnums.DamageType> effectDamageTypes = new HashSet<>();
/**
* No Table ID Constructor
@ -122,23 +113,28 @@ public class EffectsBase { @@ -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 { @@ -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<String> 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 { @@ -313,109 +269,6 @@ public class EffectsBase {
// getFailConditions();
}
public static void loadFailConditions(HashMap<String, EffectsBase> 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 { @@ -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 { @@ -467,11 +318,7 @@ public class EffectsBase {
}
public HashSet<AbstractEffectModifier> 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 { @@ -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 { @@ -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;
}
}

18
src/engine/powers/effectmodifiers/AbstractEffectModifier.java

@ -17,6 +17,7 @@ import engine.objects.AbstractWorldObject; @@ -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 { @@ -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;

5
src/engine/powers/effectmodifiers/AdjustAboveDmgCapEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

4
src/engine/powers/effectmodifiers/AmbidexterityEffectModifier.java

@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ArmorPiercingEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

4
src/engine/powers/effectmodifiers/AttackDelayEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/AttributeEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java

@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/BladeTrailsEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/BlockEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/BlockedPowerTypeEffectModifier.java

@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/CannotAttackEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/CannotCastEffectModifier.java

@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/CannotMoveEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/CannotTrackEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/CharmedEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ConstrainedAmbidexterityEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 @@ -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) {

5
src/engine/powers/effectmodifiers/DCVEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/DREffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/DamageCapEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/DamageShieldEffectModifier.java

@ -13,6 +13,7 @@ import engine.jobs.AbstractEffectJob; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/DodgeEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/DurabilityEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ExclusiveDamageCapEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/FadeEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/FlyEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/HealthEffectModifier.java

@ -20,6 +20,7 @@ import engine.net.AbstractNetMsg; @@ -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 { @@ -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

5
src/engine/powers/effectmodifiers/HealthFullEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/HealthRecoverRateEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/IgnoreDamageCapEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/IgnorePassiveDefenseEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ImmuneToAttackEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ImmuneToEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ImmuneToPowersEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/InvisibleEffectModifier.java

@ -16,6 +16,7 @@ import engine.net.client.ClientConnection; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ItemNameEffectModifier.java

@ -15,6 +15,7 @@ import engine.objects.AbstractWorldObject; @@ -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 { @@ -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;
}

5
src/engine/powers/effectmodifiers/ManaEffectModifier.java

@ -21,6 +21,7 @@ import engine.powers.ActionsBase; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ManaFullEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ManaRecoverRateEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/MaxDamageEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/MinDamageEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/NoModEffectModifier.java

@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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.

5
src/engine/powers/effectmodifiers/OCVEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ParryEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/PassiveDefenseEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/PowerCostEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/PowerCostHealthEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/PowerDamageEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ProtectionFromEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ResistanceEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ScaleHeightEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ScaleWidthEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ScanRangeEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/SeeInvisibleEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/SilencedEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/SkillEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/SlayEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/SpeedEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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");

5
src/engine/powers/effectmodifiers/SpireBlockEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/StaminaEffectModifier.java

@ -21,6 +21,7 @@ import engine.powers.ActionsBase; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/StaminaFullEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/StaminaRecoverRateEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/StunnedEffectModifier.java

@ -12,6 +12,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/ValueEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/WeaponProcEffectModifier.java

@ -16,6 +16,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/WeaponRangeEffectModifier.java

@ -11,6 +11,7 @@ package engine.powers.effectmodifiers; @@ -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 { @@ -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) {

5
src/engine/powers/effectmodifiers/WeaponSpeedEffectModifier.java

@ -14,6 +14,7 @@ import engine.objects.AbstractCharacter; @@ -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 { @@ -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) {

Loading…
Cancel
Save