Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c601ba36b8 | |||
| dd959e31cb | |||
| 9c57c4a379 | |||
| eae010069b | |||
| 7251c3aaec | |||
| fa2dd72798 | |||
| 8b4619f6ae | |||
| 837691aa2f | |||
| 3894007fdd | |||
| c1318b53eb | |||
| 3b4e8d92ea | |||
| ffae01955b | |||
| 94b6181ebe |
@@ -32,10 +32,14 @@ public class dbBuildingLocationHandler extends dbHandlerBase {
|
|||||||
ArrayList<BuildingLocation> buildingLocations = new ArrayList<>();
|
ArrayList<BuildingLocation> buildingLocations = new ArrayList<>();
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
try (Connection connection = DbManager.getConnection();
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("select `ID`, `BuildingID`, `type`, `slot`, `unknown`, `locX`, `locY`, `locZ`, `w`, `rotX`, `rotY`, `rotZ` from static_building_location " +
|
PreparedStatement preparedStatement = connection.prepareStatement(
|
||||||
"where type = 6 or type = 8 " +
|
"SELECT MIN(ID), BuildingID, slot, MIN(type), MIN(unknown), MIN(locX), MIN(locY), MIN(locZ), " +
|
||||||
"GROUP BY buildingID, slot " +
|
"MIN(w), MIN(rotX), MIN(rotY), MIN(rotZ) " +
|
||||||
"ORDER BY buildingID, slot ASC;")) {
|
"FROM static_building_location " +
|
||||||
|
"WHERE type IN (6, 8) " +
|
||||||
|
"GROUP BY BuildingID, slot " +
|
||||||
|
"ORDER BY BuildingID, slot ASC;"
|
||||||
|
)) {
|
||||||
|
|
||||||
ResultSet rs = preparedStatement.executeQuery();
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
buildingLocations = getObjectsFromRs(rs, 20);
|
buildingLocations = getObjectsFromRs(rs, 20);
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ public class dbCityHandler extends dbHandlerBase {
|
|||||||
public boolean updateSiegesWithstood(City city, int value) {
|
public boolean updateSiegesWithstood(City city, int value) {
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
try (Connection connection = DbManager.getConnection();
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_city` SET `name`=?"
|
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_city` SET `siegesWithstood`=?"
|
||||||
+ " WHERE `UID` = ?")) {
|
+ " WHERE `UID` = ?")) {
|
||||||
|
|
||||||
preparedStatement.setInt(1, value);
|
preparedStatement.setInt(1, value);
|
||||||
|
|||||||
@@ -0,0 +1,303 @@
|
|||||||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||||
|
// 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.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public class dbEffectsBaseHandler extends dbHandlerBase {
|
||||||
|
|
||||||
|
public dbEffectsBaseHandler() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ArrayList<EffectsBase> getAllEffectsBase() {
|
||||||
|
|
||||||
|
ArrayList<EffectsBase> effectList = new ArrayList<>();
|
||||||
|
|
||||||
|
try (Connection connection = DbManager.getConnection();
|
||||||
|
PreparedStatement prepareStatement = connection.prepareStatement("SELECT * FROM static_power_effectbase ORDER BY `IDString` DESC")) {
|
||||||
|
|
||||||
|
ResultSet rs = prepareStatement.executeQuery();
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
EffectsBase effectBase = new EffectsBase(rs);
|
||||||
|
effectList.add(effectBase);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
Logger.error(e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return effectList;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private 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.setValue(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,6 +58,9 @@ public abstract class dbHandlerBase {
|
|||||||
|
|
||||||
int id = rs.getInt(1);
|
int id = rs.getInt(1);
|
||||||
|
|
||||||
|
if (id == 883640)
|
||||||
|
Logger.info("hit");
|
||||||
|
|
||||||
if (DbManager.inCache(localObjectType, id)) {
|
if (DbManager.inCache(localObjectType, id)) {
|
||||||
objectList.add((T) DbManager.getFromCache(localObjectType, id));
|
objectList.add((T) DbManager.getFromCache(localObjectType, id));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -221,4 +221,20 @@ public class dbLootHandler extends dbHandlerBase {
|
|||||||
return bootySets;
|
return bootySets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LOAD_ENCHANT_VALUES() {
|
||||||
|
|
||||||
|
try (Connection connection = DbManager.getConnection();
|
||||||
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT `IDString`, `minMod` FROM `static_power_effectmod` WHERE `modType` = ?")) {
|
||||||
|
|
||||||
|
preparedStatement.setString(1, "Value");
|
||||||
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
|
|
||||||
|
while (rs.next())
|
||||||
|
Item.addEnchantValue(rs.getString("IDString"), rs.getInt("minMod"));
|
||||||
|
|
||||||
|
} catch (SQLException e) {
|
||||||
|
Logger.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||||
|
// 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 addAllSourceTypes() {
|
||||||
|
|
||||||
|
try (Connection connection = DbManager.getConnection();
|
||||||
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_sourcetype")) {
|
||||||
|
|
||||||
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
|
String IDString, source;
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
IDString = rs.getString("IDString");
|
||||||
|
int token = DbManager.hasher.SBStringHash(IDString);
|
||||||
|
|
||||||
|
source = rs.getString("source").replace("-", "").trim();
|
||||||
|
mbEnums.EffectSourceType effectSourceType = mbEnums.EffectSourceType.GetEffectSourceType(source);
|
||||||
|
|
||||||
|
if (EffectsBase.effectSourceTypeMap.containsKey(token) == false)
|
||||||
|
EffectsBase.effectSourceTypeMap.put(token, new HashSet<>());
|
||||||
|
|
||||||
|
EffectsBase.effectSourceTypeMap.get(token).add(effectSourceType);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||||
|
// Magicbane Emulator Project © 2013 - 2022
|
||||||
|
// www.magicbane.com
|
||||||
|
|
||||||
|
|
||||||
|
package engine.devcmd.cmds;
|
||||||
|
|
||||||
|
import engine.devcmd.AbstractDevCmd;
|
||||||
|
import engine.gameManager.ChatManager;
|
||||||
|
import engine.gameManager.PowersManager;
|
||||||
|
import engine.mbEnums.PowerActionType;
|
||||||
|
import engine.objects.AbstractGameObject;
|
||||||
|
import engine.objects.PlayerCharacter;
|
||||||
|
import engine.powers.ActionsBase;
|
||||||
|
import engine.powers.PowersBase;
|
||||||
|
import engine.powers.effectmodifiers.AbstractEffectModifier;
|
||||||
|
import engine.util.ThreadUtils;
|
||||||
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public class ApplyBonusCmd extends AbstractDevCmd {
|
||||||
|
|
||||||
|
public ApplyBonusCmd() {
|
||||||
|
super("applybonus");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void _doCmd(PlayerCharacter pcSender, String[] words,
|
||||||
|
AbstractGameObject target) {
|
||||||
|
|
||||||
|
String action = words[0];
|
||||||
|
|
||||||
|
PowerActionType actionType = null;
|
||||||
|
|
||||||
|
HashMap<String, HashSet<String>> appliedMods = new HashMap<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (action.equals("all") == false)
|
||||||
|
for (PowerActionType powerActionType : PowerActionType.values()) {
|
||||||
|
if (powerActionType.name().equalsIgnoreCase(action) == false)
|
||||||
|
continue;
|
||||||
|
actionType = powerActionType;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.throwbackError(pcSender, "Invalid power Action type for " + action);
|
||||||
|
this.throwbackInfo(pcSender, "Valid Types : " + this.getActionTypes());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (action.equals("all") == false)
|
||||||
|
if (actionType == null) {
|
||||||
|
this.throwbackError(pcSender, "Invalid power Action type for " + action);
|
||||||
|
this.throwbackInfo(pcSender, "Valid Types : " + this.getActionTypes());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (PowersBase pb : PowersManager.powersBaseByIDString.values()) {
|
||||||
|
if (pb.getActions() == null || pb.getActions().isEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (ActionsBase ab : pb.getActions()) {
|
||||||
|
if (ab.getPowerAction() == null)
|
||||||
|
continue;
|
||||||
|
if (action.equals("all") == false)
|
||||||
|
if (ab.getPowerAction().getType().equalsIgnoreCase(action) == false)
|
||||||
|
continue;
|
||||||
|
String effect1 = "";
|
||||||
|
String effect2 = "";
|
||||||
|
ChatManager.chatSystemInfo(pcSender, "Applying Power " + pb.getName() + " : " + pb.getDescription());
|
||||||
|
if (ab.getPowerAction().getEffectsBase() == null) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
ThreadUtils.sleep(500);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (ab.getPowerAction().getEffectsBase().getModifiers() == null || ab.getPowerAction().getEffectsBase().getModifiers().isEmpty()) {
|
||||||
|
try {
|
||||||
|
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean run = true;
|
||||||
|
for (AbstractEffectModifier mod : ab.getPowerAction().getEffectsBase().getModifiers()) {
|
||||||
|
if (appliedMods.containsKey(mod.modType.name()) == false) {
|
||||||
|
appliedMods.put(mod.modType.name(), new HashSet<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (appliedMods.get(mod.modType.name()).contains(mod.sourceType.name())){
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
|
appliedMods.get(mod.modType.name()).add(mod.sourceType.name());
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
PowersManager.runPowerAction(pcSender, pcSender, pcSender.getLoc(), ab, 1, pb);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.error(e);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String _getUsageString() {
|
||||||
|
return "' /bounds'";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String _getHelpString() {
|
||||||
|
return "Audits all the mobs in a zone.";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getActionTypes() {
|
||||||
|
String output = "";
|
||||||
|
|
||||||
|
for (PowerActionType actionType : PowerActionType.values()) {
|
||||||
|
output += actionType.name() + " | ";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.substring(0, output.length() - 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -798,7 +798,7 @@ public enum BuildingManager {
|
|||||||
// Attempt to write to database or delete the building
|
// Attempt to write to database or delete the building
|
||||||
// if we are destroying it.
|
// if we are destroying it.
|
||||||
|
|
||||||
if (rank < 0)
|
if (rank == -1)
|
||||||
success = DbManager.BuildingQueries.DELETE_FROM_DATABASE(building);
|
success = DbManager.BuildingQueries.DELETE_FROM_DATABASE(building);
|
||||||
else
|
else
|
||||||
success = DbManager.BuildingQueries.updateBuildingRank(building, rank);
|
success = DbManager.BuildingQueries.updateBuildingRank(building, rank);
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ package engine.gameManager;
|
|||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.server.login.LoginServer;
|
import engine.server.login.LoginServer;
|
||||||
import engine.server.world.WorldServer;
|
import engine.server.world.WorldServer;
|
||||||
import engine.wpak.EffectsParser;
|
|
||||||
import engine.wpak.PowerActionParser;
|
|
||||||
import engine.wpak.PowersParser;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@@ -167,13 +164,6 @@ public enum ConfigManager {
|
|||||||
Logger.info("Compiling regex");
|
Logger.info("Compiling regex");
|
||||||
|
|
||||||
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
||||||
|
|
||||||
Logger.info("Loading WPAK data");
|
|
||||||
|
|
||||||
//EffectsParser.parseWpakFile();
|
|
||||||
//PowersParser.parseWpakFile();
|
|
||||||
//PowerActionParser.parseWpakFile();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ public enum DbManager {
|
|||||||
public static final dbBlueprintHandler BlueprintQueries = new dbBlueprintHandler();
|
public static final dbBlueprintHandler BlueprintQueries = new dbBlueprintHandler();
|
||||||
public static final dbShrineHandler ShrineQueries = new dbShrineHandler();
|
public static final dbShrineHandler ShrineQueries = new dbShrineHandler();
|
||||||
public static final dbRunegateHandler RunegateQueries = new dbRunegateHandler();
|
public static final dbRunegateHandler RunegateQueries = new dbRunegateHandler();
|
||||||
|
|
||||||
|
public static final dbPowerHandler PowerQueries = new dbPowerHandler();
|
||||||
public static final dbPetitionHandler PetitionQueries = new dbPetitionHandler();
|
public static final dbPetitionHandler PetitionQueries = new dbPetitionHandler();
|
||||||
private static final EnumMap<GameObjectType, ConcurrentHashMap<Integer, AbstractGameObject>> objectCache = new EnumMap<>(GameObjectType.class);
|
private static final EnumMap<GameObjectType, ConcurrentHashMap<Integer, AbstractGameObject>> objectCache = new EnumMap<>(GameObjectType.class);
|
||||||
public static Hasher hasher;
|
public static Hasher hasher;
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ public enum DevCmdManager {
|
|||||||
DevCmdManager.registerDevCmd(new SetNpcNameCmd());
|
DevCmdManager.registerDevCmd(new SetNpcNameCmd());
|
||||||
DevCmdManager.registerDevCmd(new BoundsCmd());
|
DevCmdManager.registerDevCmd(new BoundsCmd());
|
||||||
DevCmdManager.registerDevCmd(new RegionCmd());
|
DevCmdManager.registerDevCmd(new RegionCmd());
|
||||||
|
DevCmdManager.registerDevCmd(new ApplyBonusCmd());
|
||||||
DevCmdManager.registerDevCmd(new SlotTestCmd());
|
DevCmdManager.registerDevCmd(new SlotTestCmd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ package engine.gameManager;
|
|||||||
|
|
||||||
import engine.InterestManagement.Terrain;
|
import engine.InterestManagement.Terrain;
|
||||||
import engine.InterestManagement.WorldGrid;
|
import engine.InterestManagement.WorldGrid;
|
||||||
|
import engine.db.handlers.dbEffectsBaseHandler;
|
||||||
|
import engine.db.handlers.dbPowerHandler;
|
||||||
import engine.db.handlers.dbSkillReqHandler;
|
import engine.db.handlers.dbSkillReqHandler;
|
||||||
import engine.job.AbstractJob;
|
import engine.job.AbstractJob;
|
||||||
import engine.job.AbstractScheduleJob;
|
import engine.job.AbstractScheduleJob;
|
||||||
@@ -27,14 +29,8 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.*;
|
import engine.net.client.msg.*;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.*;
|
import engine.powers.*;
|
||||||
import engine.powers.poweractions.*;
|
import engine.powers.poweractions.AbstractPowerAction;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
import engine.wpak.EffectsParser;
|
|
||||||
import engine.wpak.PowerActionParser;
|
|
||||||
import engine.wpak.PowersParser;
|
|
||||||
import engine.wpak.data.Effect;
|
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -57,6 +53,7 @@ public enum PowersManager {
|
|||||||
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
|
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
|
||||||
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
|
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
|
||||||
public static HashMap<String, Integer> ActionTokenByIDString = 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<RunePowerEntry>> _allRunePowers;
|
||||||
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
|
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
|
||||||
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
|
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
|
||||||
@@ -64,12 +61,10 @@ public enum PowersManager {
|
|||||||
|
|
||||||
public static void initPowersManager(boolean fullPowersLoad) {
|
public static void initPowersManager(boolean fullPowersLoad) {
|
||||||
|
|
||||||
if (fullPowersLoad) {
|
if (fullPowersLoad)
|
||||||
//PowersManager.InitializePowers();
|
PowersManager.InitializePowers();
|
||||||
WpakPowerManager.init();
|
else
|
||||||
}else {
|
|
||||||
PowersManager.InitializeLoginPowers();
|
PowersManager.InitializeLoginPowers();
|
||||||
}
|
|
||||||
|
|
||||||
PowersManager.js = JobScheduler.getInstance();
|
PowersManager.js = JobScheduler.getInstance();
|
||||||
|
|
||||||
@@ -117,138 +112,33 @@ public enum PowersManager {
|
|||||||
return powerEntries;
|
return powerEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void InitializeEffects(){
|
|
||||||
// Add EffectsBase
|
|
||||||
ArrayList<EffectsBase> effectList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (Effect entry : WpakPowerManager._effectsLookup.values()) {
|
|
||||||
EffectsBase effectBase = new EffectsBase(entry);
|
|
||||||
effectList.add(effectBase);
|
|
||||||
PowersManager.effectsBaseByToken.put(effectBase.getToken(), effectBase);
|
|
||||||
PowersManager.effectsBaseByIDString.put(effectBase.getIDString(), effectBase);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void InitializePowerActions(){
|
|
||||||
// Add PowerActions
|
|
||||||
//AbstractPowerAction.getAllPowerActions(PowersManager.powerActionsByIDString, PowersManager.powerActionsByID, PowersManager.effectsBaseByIDString);
|
|
||||||
|
|
||||||
HashMap<String, EffectsBase> effects = PowersManager.effectsBaseByIDString;
|
|
||||||
|
|
||||||
for (PowerAction powerAction : WpakPowerManager._powerActionLookup.values()) {
|
|
||||||
AbstractPowerAction apa;
|
|
||||||
PowerActionType type = powerAction.action_type;
|
|
||||||
String IDString = powerAction.action_id;
|
|
||||||
int token = DbManager.hasher.SBStringHash(IDString);
|
|
||||||
//cache token, used for applying effects.
|
|
||||||
PowersManager.ActionTokenByIDString.put(IDString, token);
|
|
||||||
apa = null;
|
|
||||||
switch (type) {
|
|
||||||
default:
|
|
||||||
Logger.error("valid type not found for poweraction of ID" + IDString);
|
|
||||||
break;
|
|
||||||
case ApplyEffect:
|
|
||||||
apa = new ApplyEffectPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case ApplyEffects:
|
|
||||||
apa = new ApplyEffectsPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case DeferredPower:
|
|
||||||
apa = new DeferredPowerPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case DamageOverTime:
|
|
||||||
apa = new DamageOverTimePowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case Peek:
|
|
||||||
apa = new PeekPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Charm:
|
|
||||||
apa = new CharmPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case RemoveEffect:
|
|
||||||
apa = new RemoveEffectPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Track:
|
|
||||||
apa = new TrackPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case DirectDamage:
|
|
||||||
apa = new DirectDamagePowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case Transform:
|
|
||||||
apa = new TransformPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case CreateMob:
|
|
||||||
apa = new CreateMobPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Invis:
|
|
||||||
apa = new InvisPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case ClearNearbyAggro:
|
|
||||||
apa = new ClearNearbyAggroPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case MobRecall:
|
|
||||||
apa = new MobRecallPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case SetItemFlag:
|
|
||||||
apa = new SetItemFlagPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case SimpleDamage:
|
|
||||||
apa = new SimpleDamagePowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case TransferStatOT:
|
|
||||||
apa = new TransferStatOTPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case TransferStat:
|
|
||||||
apa = new TransferStatPowerAction(powerAction, effects);
|
|
||||||
break;
|
|
||||||
case Teleport:
|
|
||||||
apa = new TeleportPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case TreeChoke:
|
|
||||||
apa = new TreeChokePowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Block:
|
|
||||||
apa = new BlockPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Resurrect:
|
|
||||||
apa = new ResurrectPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case ClaimMine:
|
|
||||||
apa = new ClaimMinePowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Recall:
|
|
||||||
apa = new RecallPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case SpireDisable:
|
|
||||||
apa = new SpireDisablePowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Steal:
|
|
||||||
apa = new StealPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case Summon:
|
|
||||||
apa = new SummonPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
case RunegateTeleport:
|
|
||||||
apa = new RunegateTeleportPowerAction(powerAction);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
PowersManager.powerActionsByIDString.put(IDString, apa);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This pre-loads all powers and effects
|
// This pre-loads all powers and effects
|
||||||
public static void InitializePowers() {
|
public static void InitializePowers() {
|
||||||
|
|
||||||
EffectsParser.parseWpakFile();
|
// Add EffectsBase
|
||||||
PowersParser.parseWpakFile();
|
ArrayList<EffectsBase> ebList = dbEffectsBaseHandler.getAllEffectsBase();
|
||||||
PowerActionParser.parseWpakFile();
|
|
||||||
|
|
||||||
//Initialize Effects Data
|
for (EffectsBase eb : ebList) {
|
||||||
InitializeEffects();
|
PowersManager.effectsBaseByToken.put(eb.getToken(), eb);
|
||||||
|
PowersManager.effectsBaseByIDString.put(eb.getIDString(), eb);
|
||||||
|
|
||||||
//Initialize Power Actions
|
}
|
||||||
InitializePowerActions();
|
|
||||||
|
// Add Fail Conditions
|
||||||
|
EffectsBase.getFailConditions(PowersManager.effectsBaseByIDString);
|
||||||
|
|
||||||
|
// Add Modifiers to Effects
|
||||||
|
dbEffectsBaseHandler.cacheAllEffectModifiers();
|
||||||
|
|
||||||
|
// Add Source Types to Effects
|
||||||
|
dbPowerHandler.addAllSourceTypes();
|
||||||
|
dbPowerHandler.addAllAnimationOverrides();
|
||||||
|
|
||||||
|
// Add PowerActions
|
||||||
|
AbstractPowerAction.getAllPowerActions(PowersManager.powerActionsByIDString, PowersManager.powerActionsByID, PowersManager.effectsBaseByIDString);
|
||||||
|
|
||||||
|
// Load valid Item Flags
|
||||||
|
// AbstractPowerAction.loadValidItemFlags(PowersManager.powerActionsByIDString);
|
||||||
|
|
||||||
// get all PowersBase
|
// get all PowersBase
|
||||||
ArrayList<PowersBase> pbList = dbSkillReqHandler.getAllPowersBase();
|
ArrayList<PowersBase> pbList = dbSkillReqHandler.getAllPowersBase();
|
||||||
@@ -269,6 +159,16 @@ public enum PowersManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static EffectsBase setEffectToken(int ID, int token) {
|
||||||
|
for (EffectsBase eb : PowersManager.effectsBaseByIDString.values()) {
|
||||||
|
if (eb.getUUID() == ID) {
|
||||||
|
eb.setToken(token);
|
||||||
|
return eb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static void usePower(final PerformActionMsg msg, ClientConnection origin,
|
public static void usePower(final PerformActionMsg msg, ClientConnection origin,
|
||||||
boolean sendCastToSelf) {
|
boolean sendCastToSelf) {
|
||||||
|
|
||||||
@@ -1057,7 +957,7 @@ public enum PowersManager {
|
|||||||
// if (!stackType.equals("IgnoreStack")) {
|
// if (!stackType.equals("IgnoreStack")) {
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
engine.objects.Effect ef = target.getEffects().get(stackType);
|
Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1229,7 +1129,7 @@ public enum PowersManager {
|
|||||||
// if (!stackType.equals("IgnoreStack")) {
|
// if (!stackType.equals("IgnoreStack")) {
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
engine.objects.Effect ef = target.getEffects().get(stackType);
|
Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1543,7 +1443,7 @@ public enum PowersManager {
|
|||||||
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(ab.getUUID()) : stackType;
|
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(ab.getUUID()) : stackType;
|
||||||
if (target.getEffects().containsKey(stackType)) {
|
if (target.getEffects().containsKey(stackType)) {
|
||||||
// remove any existing power that overrides
|
// remove any existing power that overrides
|
||||||
engine.objects.Effect ef = target.getEffects().get(stackType);
|
Effect ef = target.getEffects().get(stackType);
|
||||||
AbstractEffectJob effect = null;
|
AbstractEffectJob effect = null;
|
||||||
if (ef != null) {
|
if (ef != null) {
|
||||||
JobContainer jc = ef.getJobContainer();
|
JobContainer jc = ef.getJobContainer();
|
||||||
@@ -1990,7 +1890,7 @@ public enum PowersManager {
|
|||||||
stackType = (stackType.equals("IgnoreStack")) ? Integer
|
stackType = (stackType.equals("IgnoreStack")) ? Integer
|
||||||
.toString(toRemove.getUUID()) : stackType;
|
.toString(toRemove.getUUID()) : stackType;
|
||||||
if (fromChant) {
|
if (fromChant) {
|
||||||
engine.objects.Effect eff = awo.getEffects().get(stackType);
|
Effect eff = awo.getEffects().get(stackType);
|
||||||
if (eff != null)
|
if (eff != null)
|
||||||
eff.cancelJob(true);
|
eff.cancelJob(true);
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.job.AbstractScheduleJob;
|
|||||||
import engine.net.client.msg.PerformActionMsg;
|
import engine.net.client.msg.PerformActionMsg;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.Power;
|
|
||||||
|
|
||||||
public class UsePowerJob extends AbstractScheduleJob {
|
public class UsePowerJob extends AbstractScheduleJob {
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
||||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
||||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
||||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
||||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
||||||
// Magicbane Emulator Project © 2013 - 2022
|
|
||||||
// www.magicbane.com
|
|
||||||
|
|
||||||
|
|
||||||
package engine.jobs;
|
|
||||||
|
|
||||||
import engine.gameManager.PowersManager;
|
|
||||||
import engine.job.AbstractScheduleJob;
|
|
||||||
import engine.net.client.msg.PerformActionMsg;
|
|
||||||
import engine.objects.AbstractWorldObject;
|
|
||||||
import engine.objects.PlayerCharacter;
|
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
|
|
||||||
public class WpakUsePowerJob extends AbstractScheduleJob {
|
|
||||||
|
|
||||||
private final PlayerCharacter pc;
|
|
||||||
private final PerformActionMsg msg;
|
|
||||||
private AbstractWorldObject target;
|
|
||||||
|
|
||||||
public WpakUsePowerJob(PlayerCharacter pc, PerformActionMsg msg, AbstractWorldObject tar) {
|
|
||||||
super();
|
|
||||||
this.pc = pc;
|
|
||||||
this.msg = msg;
|
|
||||||
this.target = tar;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doJob() {
|
|
||||||
WpakPowerManager.finishUsePower(this.msg, this.pc,this.target);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void _cancelJob() {
|
|
||||||
//cast stopped early, reset recycle timer
|
|
||||||
PowersManager.finishRecycleTime(this.msg, this.pc, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+447
-587
File diff suppressed because it is too large
Load Diff
@@ -17,9 +17,8 @@ import engine.mbEnums.BuildingGroup;
|
|||||||
import engine.net.client.ClientConnection;
|
import engine.net.client.ClientConnection;
|
||||||
import engine.net.client.msg.ClaimAssetMsg;
|
import engine.net.client.msg.ClaimAssetMsg;
|
||||||
import engine.net.client.msg.ClientNetMsg;
|
import engine.net.client.msg.ClientNetMsg;
|
||||||
import engine.objects.Blueprint;
|
import engine.net.client.msg.ErrorPopupMsg;
|
||||||
import engine.objects.Building;
|
import engine.objects.*;
|
||||||
import engine.objects.PlayerCharacter;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
@@ -111,9 +110,9 @@ public class ClaimAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
// Can't claim a tree if your guild already owns one
|
// Can't claim a tree if your guild already owns one
|
||||||
// *** Refactor : Send error to player here
|
// *** Refactor : Send error to player here
|
||||||
|
|
||||||
if ((sourcePlayer.getGuild().isNation()) &&
|
if(blueprint.getBuildingGroup() == BuildingGroup.TOL && !validateTreeClaim(sourcePlayer)){
|
||||||
(blueprint.getBuildingGroup() == BuildingGroup.TOL))
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Process the transfer of the building(s)
|
// Process the transfer of the building(s)
|
||||||
|
|
||||||
@@ -135,4 +134,24 @@ public class ClaimAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean validateTreeClaim(PlayerCharacter sourcePlayer) {
|
||||||
|
|
||||||
|
if(sourcePlayer.guild.equals(Guild.getErrantGuild())) {
|
||||||
|
ErrorPopupMsg.sendErrorMsg(sourcePlayer, "Errant Players Cannot Claim Cities!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sourcePlayer.guild.getOwnedCity() != null) {
|
||||||
|
ErrorPopupMsg.sendErrorMsg(sourcePlayer, "Your Guild Already Owns A City!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!GuildStatusController.isGuildLeader(sourcePlayer.getGuildStatus())) {
|
||||||
|
ErrorPopupMsg.sendErrorMsg(sourcePlayer, "Only A Guild Leader Can Claim A Tree Of Life!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
package engine.net.client.handlers;
|
package engine.net.client.handlers;
|
||||||
|
|
||||||
|
import engine.gameManager.PowersManager;
|
||||||
import engine.net.client.ClientConnection;
|
import engine.net.client.ClientConnection;
|
||||||
import engine.net.client.msg.ClientNetMsg;
|
import engine.net.client.msg.ClientNetMsg;
|
||||||
import engine.net.client.msg.PerformActionMsg;
|
import engine.net.client.msg.PerformActionMsg;
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
|
|
||||||
public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
||||||
|
|
||||||
@@ -23,8 +23,7 @@ public class PerformActionMsgHandler extends AbstractClientMsgHandler {
|
|||||||
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) {
|
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) {
|
||||||
|
|
||||||
PerformActionMsg msg = (PerformActionMsg) baseMsg;
|
PerformActionMsg msg = (PerformActionMsg) baseMsg;
|
||||||
//PowersManager.beginCast(msg, origin, false); // Wtf ?
|
PowersManager.usePower(msg, origin, false); // Wtf ?
|
||||||
WpakPowerManager.beginCast(msg, origin, false);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,8 +528,15 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (cityObject.warehouse != null) {
|
if (cityObject.warehouse != null) {
|
||||||
PlaceAssetMsg.sendPlaceAssetError(origin, 50, ""); //"You can only have one warehouse"
|
if(cityObject.warehouse.building != null) {
|
||||||
return false;
|
//warehosue has a building already, warehouse still should exist
|
||||||
|
PlaceAssetMsg.sendPlaceAssetError(origin, 50, ""); //"You can only have one warehouse"
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
//warehouse has no building and needs a cleanup
|
||||||
|
DbManager.WarehouseQueries.DELETE_WAREHOUSE(cityObject.warehouse);
|
||||||
|
cityObject.warehouse = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the warehouse object and it's entry in the database
|
// Create the warehouse object and it's entry in the database
|
||||||
|
|||||||
@@ -17,10 +17,8 @@ import engine.net.client.msg.PerformActionMsg;
|
|||||||
import engine.net.client.msg.SendSummonsMsg;
|
import engine.net.client.msg.SendSummonsMsg;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
|
|
||||||
import static engine.gameManager.PowersManager.sendPowerMsg;
|
import static engine.gameManager.PowersManager.*;
|
||||||
import static engine.gameManager.PowersManager.sendRecyclePower;
|
|
||||||
|
|
||||||
public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
||||||
|
|
||||||
@@ -83,8 +81,7 @@ public class SendSummonsMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
// Client removes 200 mana on summon use.. so don't send message to self
|
// Client removes 200 mana on summon use.. so don't send message to self
|
||||||
target.addSummoner(playerCharacter.getObjectUUID(), System.currentTimeMillis() + MBServerStatics.FOURTYFIVE_SECONDS);
|
target.addSummoner(playerCharacter.getObjectUUID(), System.currentTimeMillis() + MBServerStatics.FOURTYFIVE_SECONDS);
|
||||||
//beginCast(pam, origin, false);
|
usePower(pam, origin, false);
|
||||||
WpakPowerManager.beginCast(pam, origin, false);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,15 +86,15 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (ablist == null)
|
if (ablist == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TrackPowerAction trackPowerAction = null;
|
TrackPowerAction tpa = null;
|
||||||
|
|
||||||
for (ActionsBase ab : ablist) {
|
for (ActionsBase ab : ablist) {
|
||||||
AbstractPowerAction apa = ab.getPowerAction();
|
AbstractPowerAction apa = ab.getPowerAction();
|
||||||
if (apa != null && apa instanceof TrackPowerAction)
|
if (apa != null && apa instanceof TrackPowerAction)
|
||||||
trackPowerAction = (TrackPowerAction) apa;
|
tpa = (TrackPowerAction) apa;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackPowerAction == null)
|
if (tpa == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Check powers for normal users
|
// Check powers for normal users
|
||||||
@@ -111,16 +111,16 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler {
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
|
|
||||||
if (pb.targetPlayer())
|
if (pb.targetPlayer())
|
||||||
if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.Vampire)) // track vampires
|
if (tpa.trackVampire()) // track vampires
|
||||||
mask = MBServerStatics.MASK_PLAYER | MBServerStatics.MASK_UNDEAD;
|
mask = MBServerStatics.MASK_PLAYER | MBServerStatics.MASK_UNDEAD;
|
||||||
else
|
else
|
||||||
// track all players
|
// track all players
|
||||||
mask = MBServerStatics.MASK_PLAYER;
|
mask = MBServerStatics.MASK_PLAYER;
|
||||||
else if (pb.targetCorpse()) // track corpses
|
else if (pb.targetCorpse()) // track corpses
|
||||||
mask = MBServerStatics.MASK_CORPSE;
|
mask = MBServerStatics.MASK_CORPSE;
|
||||||
else if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.NPC)) // Track NPCs
|
else if (tpa.trackNPC()) // Track NPCs
|
||||||
mask = MBServerStatics.MASK_NPC;
|
mask = MBServerStatics.MASK_NPC;
|
||||||
else if (trackPowerAction.powerAction.trackEntry.filter.equals(mbEnums.MonsterType.Undead)) // Track Undead
|
else if (tpa.trackUndead()) // Track Undead
|
||||||
mask = MBServerStatics.MASK_MOB | MBServerStatics.MASK_UNDEAD;
|
mask = MBServerStatics.MASK_MOB | MBServerStatics.MASK_UNDEAD;
|
||||||
else
|
else
|
||||||
// Track All
|
// Track All
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.UpdateEffectsMsg;
|
import engine.net.client.msg.UpdateEffectsMsg;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
import engine.wpakpowers.AppliedEffect;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -61,10 +60,6 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
|||||||
private int objectTypeMask = 0;
|
private int objectTypeMask = 0;
|
||||||
private Bounds bounds;
|
private Bounds bounds;
|
||||||
|
|
||||||
// Effects collection for wpak power manager
|
|
||||||
|
|
||||||
public ConcurrentHashMap<engine.wpak.data.Effect, AppliedEffect> _effects = new ConcurrentHashMap<>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No Id Constructor
|
* No Id Constructor
|
||||||
*/
|
*/
|
||||||
@@ -380,7 +375,7 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
|||||||
if (eff == null) {
|
if (eff == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (eff.getEffectsBase().effectSources.contains(source) && trains >= eff.getTrains()) {
|
if (eff.containsSource(source) && trains >= eff.getTrains()) {
|
||||||
if (removeAll) {
|
if (removeAll) {
|
||||||
//remove all effects of source type
|
//remove all effects of source type
|
||||||
if (eff.cancel()) {
|
if (eff.cancel()) {
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ public class Building extends AbstractWorldObject {
|
|||||||
BuildingManager.setRank(barracksBuilding, -1);
|
BuildingManager.setRank(barracksBuilding, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the tree is R8 and deranking, we need to update the
|
// If the tree is R8 and deranking, we need to update it's
|
||||||
// mesh along with buildings losing their health bonus
|
// mesh along with buildings losing their health bonus
|
||||||
|
|
||||||
if (this.rank == 8) {
|
if (this.rank == 8) {
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ import java.util.HashSet;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
public class City extends AbstractWorldObject {
|
public class City extends AbstractWorldObject {
|
||||||
@@ -81,7 +80,6 @@ public class City extends AbstractWorldObject {
|
|||||||
private String hash;
|
private String hash;
|
||||||
public Warehouse warehouse;
|
public Warehouse warehouse;
|
||||||
public Realm realm;
|
public Realm realm;
|
||||||
public AtomicBoolean isDestroyed = new AtomicBoolean(false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ResultSet Constructor
|
* ResultSet Constructor
|
||||||
@@ -308,21 +306,6 @@ public class City extends AbstractWorldObject {
|
|||||||
if (city.parentZone == null)
|
if (city.parentZone == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Can't teleport to something without a tree
|
|
||||||
|
|
||||||
if (city.getTOL() == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// No abandoned cities
|
|
||||||
|
|
||||||
if (city.getTOL().getGuild().isEmptyGuild())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// No destroyed cities
|
|
||||||
|
|
||||||
if (city.getTOL().getRank() == -1)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
//can't repledge to a guild you're already part of
|
//can't repledge to a guild you're already part of
|
||||||
|
|
||||||
if (repledge && city.getGuild().equals(playerCharacter.guild))
|
if (repledge && city.getGuild().equals(playerCharacter.guild))
|
||||||
@@ -1119,21 +1102,17 @@ public class City extends AbstractWorldObject {
|
|||||||
|
|
||||||
public final void destroy() {
|
public final void destroy() {
|
||||||
|
|
||||||
if (this.isDestroyed.compareAndSet(false, true)) {
|
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
||||||
|
|
||||||
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
destroyCityThread.setName("destroyCity:" + this.getName());
|
||||||
|
destroyCityThread.start();
|
||||||
destroyCityThread.setName("destroyCity:" + this.getParent().zoneName);
|
|
||||||
destroyCityThread.start();
|
|
||||||
} else
|
|
||||||
Logger.error("Attempt to destroy destroyed city");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void transfer(AbstractCharacter newOwner) {
|
public final void transfer(AbstractCharacter newOwner) {
|
||||||
|
|
||||||
Thread transferCityThread = new Thread(new TransferCityThread(this, newOwner));
|
Thread transferCityThread = new Thread(new TransferCityThread(this, newOwner));
|
||||||
|
|
||||||
transferCityThread.setName("TransferCity:" + this.getParent().zoneName);
|
transferCityThread.setName("TransferCity:" + this.getName());
|
||||||
transferCityThread.start();
|
transferCityThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -433,6 +433,12 @@ public class Effect {
|
|||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean containsSource(EffectSourceType source) {
|
||||||
|
if (this.eb != null)
|
||||||
|
return this.eb.containsSource(source);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public JobContainer getJobContainer() {
|
public JobContainer getJobContainer() {
|
||||||
return this.jc;
|
return this.jc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,8 @@ public class Mine extends AbstractGameObject {
|
|||||||
// Only inactive mines are returned.
|
// Only inactive mines are returned.
|
||||||
|
|
||||||
for (Mine mine : Mine.mineMap.keySet()) {
|
for (Mine mine : Mine.mineMap.keySet()) {
|
||||||
if (mine.owningGuild.getObjectUUID() == guildID)
|
if (mine.owningGuild.getObjectUUID() == guildID &&
|
||||||
|
mine.isActive == false)
|
||||||
mineList.add(mine);
|
mineList.add(mine);
|
||||||
}
|
}
|
||||||
return mineList;
|
return mineList;
|
||||||
|
|||||||
+208
-366
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
package engine.powers;
|
package engine.powers;
|
||||||
|
|
||||||
|
import engine.gameManager.DbManager;
|
||||||
import engine.gameManager.DispatchManager;
|
import engine.gameManager.DispatchManager;
|
||||||
import engine.gameManager.PowersManager;
|
import engine.gameManager.PowersManager;
|
||||||
import engine.job.JobContainer;
|
import engine.job.JobContainer;
|
||||||
@@ -25,60 +26,63 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.net.client.msg.ApplyEffectMsg;
|
import engine.net.client.msg.ApplyEffectMsg;
|
||||||
import engine.objects.AbstractCharacter;
|
import engine.objects.AbstractCharacter;
|
||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Item;
|
import engine.objects.Effect;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.effectmodifiers.*;
|
import engine.powers.effectmodifiers.AbstractEffectModifier;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
import engine.util.Hasher;
|
|
||||||
import engine.wpak.data.ConditionEntry;
|
|
||||||
import engine.wpak.data.Effect;
|
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class EffectsBase {
|
public class EffectsBase {
|
||||||
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 static HashMap<Integer, HashSet<EffectSourceType>> effectSourceTypeMap = new HashMap<>();
|
||||||
public int UUID;
|
public static HashMap<String, HashSet<AbstractEffectModifier>> modifiersMap = new HashMap<>();
|
||||||
public String IDString;
|
public static HashMap<String, HashMap<String, ArrayList<String>>> OldEffectsMap = new HashMap<>();
|
||||||
// public String name;
|
public static HashMap<String, HashMap<String, ArrayList<String>>> NewEffectsMap = new HashMap<>();
|
||||||
public int token;
|
public static HashMap<String, HashMap<String, ArrayList<String>>> ChangedEffectsMap = new HashMap<>();
|
||||||
public float amount;
|
public static HashMap<String, HashSet<PowerFailCondition>> EffectFailConditions = new HashMap<>();
|
||||||
public float amountRamp;
|
public static HashMap<Integer, HashSet<mbEnums.DamageType>> EffectDamageTypes = new HashMap<>();
|
||||||
|
public static HashSet<AbstractEffectModifier> DefaultModifiers = new HashSet<>();
|
||||||
|
private static ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||||
|
private static int NewID = 3000;
|
||||||
|
private int UUID;
|
||||||
|
private String IDString;
|
||||||
|
// private String name;
|
||||||
|
private int token;
|
||||||
|
private float amount;
|
||||||
|
private float amountRamp;
|
||||||
// flags
|
// flags
|
||||||
public boolean isItemEffect;
|
private boolean isItemEffect;
|
||||||
public boolean isSpireEffect;
|
private boolean isSpireEffect;
|
||||||
public boolean ignoreNoMod;
|
private boolean ignoreMod;
|
||||||
public boolean dontSave;
|
private boolean dontSave;
|
||||||
public boolean cancelOnAttack = false;
|
private boolean cancelOnAttack = false;
|
||||||
public boolean cancelOnAttackSwing = false;
|
private boolean cancelOnAttackSwing = false;
|
||||||
public boolean cancelOnCast = false;
|
private boolean cancelOnCast = false;
|
||||||
public boolean cancelOnCastSpell = false;
|
private boolean cancelOnCastSpell = false;
|
||||||
public boolean cancelOnEquipChange = false;
|
private boolean cancelOnEquipChange = false;
|
||||||
public boolean cancelOnLogout = false;
|
private boolean cancelOnLogout = false;
|
||||||
public boolean cancelOnMove = false;
|
private boolean cancelOnMove = false;
|
||||||
public boolean cancelOnNewCharm = false;
|
private boolean cancelOnNewCharm = false;
|
||||||
public boolean cancelOnSit = false;
|
private boolean cancelOnSit = false;
|
||||||
public boolean cancelOnTakeDamage = false;
|
private boolean cancelOnTakeDamage = false;
|
||||||
public boolean cancelOnTerritoryClaim = false;
|
private boolean cancelOnTerritoryClaim = false;
|
||||||
public boolean cancelOnUnEquip = false;
|
private boolean cancelOnUnEquip = false;
|
||||||
public boolean useRampAdd;
|
private boolean useRampAdd;
|
||||||
public boolean isPrefix = false; //used by items
|
private boolean isPrefix = false; //used by items
|
||||||
public boolean isSuffix = false; //used by items
|
private boolean isSuffix = false; //used by items
|
||||||
public String name = "";
|
private String name = "";
|
||||||
public float value = 0;
|
private float value = 0;
|
||||||
private ConcurrentHashMap<mbEnums.ResourceType, Integer> resourceCosts = new ConcurrentHashMap<>();
|
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<AbstractEffectModifier> effectModifiers = new HashSet<>();
|
|
||||||
public HashSet<PowerFailCondition> effectFailCondition = new HashSet<>();
|
|
||||||
|
|
||||||
public HashSet<mbEnums.DamageType> effectDamageTypes = new HashSet<>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No Table ID Constructor
|
* No Table ID Constructor
|
||||||
@@ -87,110 +91,6 @@ public class EffectsBase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* EffectEntry Constructor
|
|
||||||
*/
|
|
||||||
|
|
||||||
public EffectsBase(Effect entry) {
|
|
||||||
this.IDString = entry.effect_id;
|
|
||||||
this.name = entry.effect_name;
|
|
||||||
this.token = Hasher.SBStringHash(entry.effect_name);
|
|
||||||
|
|
||||||
//override tokens for some effects like Safemode that use the Action Token instead of the effect Token,
|
|
||||||
switch (this.IDString) {
|
|
||||||
case "INVIS-D":
|
|
||||||
this.token = -1661751254;
|
|
||||||
break;
|
|
||||||
case "SafeMode":
|
|
||||||
this.token = -1661750486;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
this.isItemEffect = entry.isItemEffect;
|
|
||||||
this.isSpireEffect = entry.isSpireEffect;
|
|
||||||
this.ignoreNoMod = entry.ignoreNoMod;
|
|
||||||
this.dontSave = entry.dontSave;
|
|
||||||
|
|
||||||
if (this.IDString.startsWith("PRE-"))
|
|
||||||
this.isPrefix = true;
|
|
||||||
else if (this.IDString.startsWith("SUF-"))
|
|
||||||
this.isSuffix = true;
|
|
||||||
|
|
||||||
//load effect modifiers
|
|
||||||
for (ModifierEntry mod : entry.mods)
|
|
||||||
this.effectModifiers.add(getCombinedModifiers(null, mod, this, mod.type));
|
|
||||||
|
|
||||||
//load sources
|
|
||||||
for (String source : entry.sources)
|
|
||||||
this.effectSources.add(EffectSourceType.GetEffectSourceType(source));
|
|
||||||
|
|
||||||
//load fail conditions
|
|
||||||
for (ConditionEntry condition : entry.conditions) {
|
|
||||||
PowerFailCondition failCondition = PowerFailCondition.valueOf(condition.condition);
|
|
||||||
this.effectFailCondition.add(failCondition);
|
|
||||||
loadFailConditions(failCondition, this, condition);
|
|
||||||
|
|
||||||
//add all damage types
|
|
||||||
if(!condition.damageTypes.isEmpty())
|
|
||||||
this.effectDamageTypes.addAll(condition.damageTypes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void loadFailConditions(PowerFailCondition failCondition, EffectsBase eb, ConditionEntry entry) {
|
|
||||||
|
|
||||||
if (failCondition == null || eb == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (failCondition) {
|
|
||||||
|
|
||||||
case TakeDamage:
|
|
||||||
|
|
||||||
eb.cancelOnTakeDamage = true;
|
|
||||||
|
|
||||||
|
|
||||||
eb.amount = entry.arg;
|
|
||||||
eb.amountRamp = (float) entry.curveType.value;
|
|
||||||
eb.useRampAdd = (float) entry.curveType.value != 0;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectsBase(EffectsBase copyEffect, int newToken, String IDString) {
|
public EffectsBase(EffectsBase copyEffect, int newToken, String IDString) {
|
||||||
|
|
||||||
UUID = NewID++;
|
UUID = NewID++;
|
||||||
@@ -202,7 +102,7 @@ public class EffectsBase {
|
|||||||
int flags = 0;
|
int flags = 0;
|
||||||
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
||||||
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
||||||
this.ignoreNoMod = ((flags & 4) != 0) ? true : false;
|
this.ignoreMod = ((flags & 4) != 0) ? true : false;
|
||||||
this.dontSave = ((flags & 8) != 0) ? true : false;
|
this.dontSave = ((flags & 8) != 0) ? true : false;
|
||||||
|
|
||||||
if (this.IDString.startsWith("PRE-"))
|
if (this.IDString.startsWith("PRE-"))
|
||||||
@@ -217,7 +117,7 @@ public class EffectsBase {
|
|||||||
this.amountRamp = copyEffect.amountRamp;
|
this.amountRamp = copyEffect.amountRamp;
|
||||||
this.isItemEffect = copyEffect.isItemEffect;
|
this.isItemEffect = copyEffect.isItemEffect;
|
||||||
this.isSpireEffect = copyEffect.isSpireEffect;
|
this.isSpireEffect = copyEffect.isSpireEffect;
|
||||||
this.ignoreNoMod = copyEffect.ignoreNoMod;
|
this.ignoreMod = copyEffect.ignoreMod;
|
||||||
this.dontSave = copyEffect.dontSave;
|
this.dontSave = copyEffect.dontSave;
|
||||||
this.cancelOnAttack = copyEffect.cancelOnAttack;
|
this.cancelOnAttack = copyEffect.cancelOnAttack;
|
||||||
this.cancelOnAttackSwing = copyEffect.cancelOnAttackSwing;
|
this.cancelOnAttackSwing = copyEffect.cancelOnAttackSwing;
|
||||||
@@ -263,7 +163,7 @@ public class EffectsBase {
|
|||||||
int flags = rs.getInt("flags");
|
int flags = rs.getInt("flags");
|
||||||
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
this.isItemEffect = ((flags & 1) != 0) ? true : false;
|
||||||
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
|
||||||
this.ignoreNoMod = ((flags & 4) != 0) ? true : false;
|
this.ignoreMod = ((flags & 4) != 0) ? true : false;
|
||||||
this.dontSave = ((flags & 8) != 0) ? true : false;
|
this.dontSave = ((flags & 8) != 0) ? true : false;
|
||||||
|
|
||||||
if (this.IDString.startsWith("PRE-"))
|
if (this.IDString.startsWith("PRE-"))
|
||||||
@@ -273,6 +173,113 @@ public class EffectsBase {
|
|||||||
// getFailConditions();
|
// getFailConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void getFailConditions(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;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EffectsBase.EffectFailConditions.get(IDString) == null) {
|
||||||
|
EffectsBase.EffectFailConditions.put(IDString, new HashSet<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
EffectsBase.EffectFailConditions.get(IDString).add(failCondition);
|
||||||
|
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) {
|
public static String getItemEffectsByName(String string) {
|
||||||
if (EffectsBase.itemEffectsByName.containsKey(string))
|
if (EffectsBase.itemEffectsByName.containsKey(string))
|
||||||
return EffectsBase.itemEffectsByName.get(string);
|
return EffectsBase.itemEffectsByName.get(string);
|
||||||
@@ -296,12 +303,14 @@ public class EffectsBase {
|
|||||||
|
|
||||||
public boolean damageTypeSpecific() {
|
public boolean damageTypeSpecific() {
|
||||||
|
|
||||||
return !this.effectDamageTypes.isEmpty();
|
return EffectsBase.EffectDamageTypes.containsKey(this.token);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsDamageType(mbEnums.DamageType dt) {
|
public boolean containsDamageType(mbEnums.DamageType dt) {
|
||||||
return this.effectDamageTypes.contains(dt);
|
if (!EffectsBase.EffectDamageTypes.containsKey(this.token))
|
||||||
|
return false;
|
||||||
|
return EffectsBase.EffectDamageTypes.get(this.token).contains(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUUID() {
|
public int getUUID() {
|
||||||
@@ -321,8 +330,32 @@ public class EffectsBase {
|
|||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConcurrentHashMap<String, Boolean> getSourceTypes() {
|
||||||
|
return this.sourceTypes;
|
||||||
|
}
|
||||||
|
|
||||||
public HashSet<AbstractEffectModifier> getModifiers() {
|
public HashSet<AbstractEffectModifier> getModifiers() {
|
||||||
return this.effectModifiers;
|
|
||||||
|
if (EffectsBase.modifiersMap.containsKey(this.IDString) == false)
|
||||||
|
return EffectsBase.DefaultModifiers;
|
||||||
|
|
||||||
|
return EffectsBase.modifiersMap.get(this.IDString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isItemEffect() {
|
||||||
|
return this.isItemEffect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSpireEffect() {
|
||||||
|
return this.isSpireEffect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean ignoreMod() {
|
||||||
|
return this.ignoreMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean dontSave() {
|
||||||
|
return this.dontSave;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrefix() {
|
public boolean isPrefix() {
|
||||||
@@ -371,7 +404,7 @@ public class EffectsBase {
|
|||||||
float duration = ab.getDurationInSeconds(trains);
|
float duration = ab.getDurationInSeconds(trains);
|
||||||
if (pb.getToken() == 1672601862) {
|
if (pb.getToken() == 1672601862) {
|
||||||
|
|
||||||
engine.objects.Effect eff = awo.getEffects().get("DeathShroud");
|
Effect eff = awo.getEffects().get("DeathShroud");
|
||||||
|
|
||||||
|
|
||||||
if (eff != null) {
|
if (eff != null) {
|
||||||
@@ -606,6 +639,13 @@ public class EffectsBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean containsSource(EffectSourceType sourceType) {
|
||||||
|
if (EffectsBase.effectSourceTypeMap.containsKey(this.token) == false)
|
||||||
|
return false;
|
||||||
|
return EffectsBase.effectSourceTypeMap.get(this.token).contains(sourceType);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public boolean cancelOnAttack() {
|
public boolean cancelOnAttack() {
|
||||||
return this.cancelOnAttack;
|
return this.cancelOnAttack;
|
||||||
}
|
}
|
||||||
@@ -654,6 +694,16 @@ public class EffectsBase {
|
|||||||
return this.cancelOnUnEquip;
|
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() {
|
public String getName() {
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
@@ -663,220 +713,12 @@ public class EffectsBase {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AbstractEffectModifier getCombinedModifiers(AbstractEffectModifier abstractEffectModifier, ModifierEntry rs, EffectsBase effectBase, mbEnums.ModType modifier){
|
public float getValue() {
|
||||||
switch (modifier) {
|
return value;
|
||||||
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;
|
|
||||||
Item.addEnchantValue(effectBase.getIDString(), (int)valueEffect.minMod);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WeaponProc:
|
|
||||||
abstractEffectModifier = new WeaponProcEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case WeaponRange:
|
|
||||||
abstractEffectModifier = new WeaponRangeEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
case WeaponSpeed:
|
|
||||||
abstractEffectModifier = new WeaponSpeedEffectModifier(rs);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
public void setValue(float Value) {
|
||||||
return abstractEffectModifier;
|
this.value = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
public abstract class AbstractEffectModifier {
|
public abstract class AbstractEffectModifier {
|
||||||
@@ -39,24 +39,22 @@ public abstract class AbstractEffectModifier {
|
|||||||
protected String string1;
|
protected String string1;
|
||||||
protected String string2;
|
protected String string2;
|
||||||
|
|
||||||
public AbstractEffectModifier(ResultSet rs){
|
public AbstractEffectModifier(ResultSet rs) throws SQLException {
|
||||||
|
|
||||||
}
|
this.UUID = rs.getInt("ID");
|
||||||
public AbstractEffectModifier(ModifierEntry mod) {
|
this.IDString = rs.getString("IDString");
|
||||||
|
this.effectType = rs.getString("modType");
|
||||||
this.IDString = mod.type.name();
|
this.modType = ModType.GetModType(this.effectType);
|
||||||
this.effectType = mod.type.name();
|
this.type = rs.getString("type").replace("\"", "");
|
||||||
this.modType = mod.type;
|
|
||||||
this.type = mod.type.name().replace("\"", "");
|
|
||||||
this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", ""));
|
this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", ""));
|
||||||
this.minMod = mod.min;
|
this.minMod = rs.getFloat("minMod");
|
||||||
this.maxMod = mod.max;
|
this.maxMod = rs.getFloat("maxMod");
|
||||||
this.percentMod = mod.percentage;
|
this.percentMod = rs.getFloat("percentMod");
|
||||||
this.ramp = (float) mod.compoundCurveType.value;
|
this.ramp = rs.getFloat("ramp");
|
||||||
this.useRampAdd = (float) mod.compoundCurveType.value != 0;
|
this.useRampAdd = (rs.getInt("useRampAdd") == 1) ? true : false;
|
||||||
|
|
||||||
this.string1 = mod.arg1;
|
this.string1 = rs.getString("string1");
|
||||||
this.string2 = mod.arg2;
|
this.string2 = rs.getString("string2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -19,7 +18,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class AdjustAboveDmgCapEffectModifier extends AbstractEffectModifier {
|
public class AdjustAboveDmgCapEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public AdjustAboveDmgCapEffectModifier(ModifierEntry rs){
|
public AdjustAboveDmgCapEffectModifier(ResultSet rs) throws SQLException {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.mbEnums.SourceType;
|
import engine.mbEnums.SourceType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -21,7 +20,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class AmbidexterityEffectModifier extends AbstractEffectModifier {
|
public class AmbidexterityEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public AmbidexterityEffectModifier(ModifierEntry rs) {
|
public AmbidexterityEffectModifier(ResultSet rs) throws SQLException {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -19,7 +18,7 @@ import java.sql.SQLException;
|
|||||||
|
|
||||||
public class ArmorPiercingEffectModifier extends AbstractEffectModifier {
|
public class ArmorPiercingEffectModifier extends AbstractEffectModifier {
|
||||||
|
|
||||||
public ArmorPiercingEffectModifier(ModifierEntry rs){
|
public ArmorPiercingEffectModifier(ResultSet rs) throws SQLException {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,9 +21,6 @@ public class AttackDelayEffectModifier extends AbstractEffectModifier {
|
|||||||
public AttackDelayEffectModifier(ResultSet rs) throws SQLException {
|
public AttackDelayEffectModifier(ResultSet rs) throws SQLException {
|
||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
public AttackDelayEffectModifier(ModifierEntry rs){
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class AttributeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AttributeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.mbEnums.SourceType;
|
import engine.mbEnums.SourceType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -27,10 +25,6 @@ public class BlackMantleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlackMantleEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class BladeTrailsEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BladeTrailsEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class BlockEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.ModType;
|
import engine.mbEnums.ModType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockedPowerTypeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
@@ -42,7 +37,7 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
|
|
||||||
for (String effect : ac.getEffects().keySet()) {
|
for (String effect : ac.getEffects().keySet()) {
|
||||||
Effect eff = ac.getEffects().get(effect);
|
Effect eff = ac.getEffects().get(effect);
|
||||||
ModType toBlock = null;
|
ModType toBlock = ModType.None;
|
||||||
|
|
||||||
switch (this.sourceType) {
|
switch (this.sourceType) {
|
||||||
case Invisible:
|
case Invisible:
|
||||||
@@ -50,10 +45,6 @@ public class BlockedPowerTypeEffectModifier extends AbstractEffectModifier {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toBlock == null)
|
|
||||||
return;
|
|
||||||
;
|
|
||||||
|
|
||||||
HashSet<AbstractEffectModifier> aemList = eff.getEffectModifiers();
|
HashSet<AbstractEffectModifier> aemList = eff.getEffectModifiers();
|
||||||
for (AbstractEffectModifier aem : aemList) {
|
for (AbstractEffectModifier aem : aemList) {
|
||||||
if (aem.modType.equals(toBlock)) {
|
if (aem.modType.equals(toBlock)) {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class CannotAttackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CannotAttackEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -24,10 +23,6 @@ public class CannotCastEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CannotCastEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class CannotMoveEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CannotMoveEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class CannotTrackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CannotTrackEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class CharmedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CharmedEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class ConstrainedAmbidexterityEffectModifier extends AbstractEffectModifi
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConstrainedAmbidexterityEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class DCVEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DCVEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class DREffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DREffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class DamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DamageCapEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import engine.jobs.AbstractEffectJob;
|
|||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.DamageShield;
|
import engine.powers.DamageShield;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class DamageShieldEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DamageShieldEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class DodgeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DodgeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class DurabilityEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DurabilityEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class ExclusiveDamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExclusiveDamageCapEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class FadeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FadeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class FlyEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlyEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import engine.net.AbstractNetMsg;
|
|||||||
import engine.net.client.msg.ModifyHealthKillMsg;
|
import engine.net.client.msg.ModifyHealthKillMsg;
|
||||||
import engine.net.client.msg.ModifyHealthMsg;
|
import engine.net.client.msg.ModifyHealthMsg;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -42,10 +41,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public HealthEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static float getMinDamage(float baseMin, float intelligence, float spirit, float focus) {
|
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));
|
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
|
return (float) ((int) (min + 0.5f)); //round to nearest whole number
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class HealthFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HealthFullEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class HealthRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HealthRecoverRateEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class IgnoreDamageCapEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IgnoreDamageCapEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class IgnorePassiveDefenseEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IgnorePassiveDefenseEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ImmuneToAttackEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImmuneToAttackEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ImmuneToEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImmuneToEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ImmuneToPowersEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImmuneToPowersEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import engine.net.client.ClientConnection;
|
|||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -28,10 +27,6 @@ public class InvisibleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InvisibleEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -123,10 +122,6 @@ public class ItemNameEffectModifier extends AbstractEffectModifier {
|
|||||||
EffectsBase.addItemEffectsByName(n, IDString);
|
EffectsBase.addItemEffectsByName(n, IDString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemNameEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.poweractions.AbstractPowerAction;
|
import engine.powers.poweractions.AbstractPowerAction;
|
||||||
import engine.powers.poweractions.DamageOverTimePowerAction;
|
import engine.powers.poweractions.DamageOverTimePowerAction;
|
||||||
import engine.powers.poweractions.DirectDamagePowerAction;
|
import engine.powers.poweractions.DirectDamagePowerAction;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -44,10 +43,6 @@ public class ManaEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManaEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
if (awo == null) {
|
if (awo == null) {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ManaFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManaFullEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ManaRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManaRecoverRateEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class MaxDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MaxDamageEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class MeleeDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MeleeDamageEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class MinDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MinDamageEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.GameObjectType;
|
import engine.mbEnums.GameObjectType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class NoModEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NoModEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
//TODO check if anything needs removed.
|
//TODO check if anything needs removed.
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class OCVEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OCVEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ParryEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParryEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class PassiveDefenseEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PassiveDefenseEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class PowerCostEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PowerCostEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class PowerCostHealthEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PowerCostHealthEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class PowerDamageEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PowerDamageEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ProtectionFromEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProtectionFromEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ResistanceEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResistanceEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class ScaleHeightEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScaleHeightEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class ScaleWidthEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScaleWidthEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class ScanRangeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScanRangeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SeeInvisibleEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SeeInvisibleEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SilencedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SilencedEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SkillEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SkillEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SlayEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlayEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SpeedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpeedEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
//Logger.error(this.getSimpleClassName(), "Speed applied with " + trains + " trains");
|
//Logger.error(this.getSimpleClassName(), "Speed applied with " + trains + " trains");
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class SpireBlockEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpireBlockEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.poweractions.AbstractPowerAction;
|
import engine.powers.poweractions.AbstractPowerAction;
|
||||||
import engine.powers.poweractions.DamageOverTimePowerAction;
|
import engine.powers.poweractions.DamageOverTimePowerAction;
|
||||||
import engine.powers.poweractions.DirectDamagePowerAction;
|
import engine.powers.poweractions.DirectDamagePowerAction;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -44,10 +43,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public StaminaEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
if (awo == null) {
|
if (awo == null) {
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class StaminaFullEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public StaminaFullEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class StaminaRecoverRateEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public StaminaRecoverRateEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ package engine.powers.effectmodifiers;
|
|||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.mbEnums.GameObjectType;
|
import engine.mbEnums.GameObjectType;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -23,10 +22,6 @@ public class StunnedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public StunnedEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class ValueEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValueEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -27,10 +26,6 @@ public class WeaponProcEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeaponProcEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package engine.powers.effectmodifiers;
|
|||||||
|
|
||||||
import engine.jobs.AbstractEffectJob;
|
import engine.jobs.AbstractEffectJob;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -22,10 +21,6 @@ public class WeaponRangeEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeaponRangeEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Building;
|
import engine.objects.Building;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.wpak.data.ModifierEntry;
|
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@@ -25,10 +24,6 @@ public class WeaponSpeedEffectModifier extends AbstractEffectModifier {
|
|||||||
super(rs);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeaponSpeedEffectModifier(ModifierEntry rs) {
|
|
||||||
super(rs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
|
||||||
|
|
||||||
|
|||||||
@@ -9,15 +9,22 @@
|
|||||||
|
|
||||||
package engine.powers.poweractions;
|
package engine.powers.poweractions;
|
||||||
|
|
||||||
|
import engine.gameManager.DbManager;
|
||||||
|
import engine.gameManager.PowersManager;
|
||||||
import engine.math.Vector3fImmutable;
|
import engine.math.Vector3fImmutable;
|
||||||
import engine.mbEnums;
|
|
||||||
import engine.objects.AbstractCharacter;
|
import engine.objects.AbstractCharacter;
|
||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.objects.Item;
|
import engine.objects.Item;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
public abstract class AbstractPowerAction {
|
public abstract class AbstractPowerAction {
|
||||||
@@ -25,7 +32,7 @@ public abstract class AbstractPowerAction {
|
|||||||
protected PowersBase parent;
|
protected PowersBase parent;
|
||||||
protected int UUID;
|
protected int UUID;
|
||||||
protected String IDString;
|
protected String IDString;
|
||||||
protected mbEnums.PowerActionType type;
|
protected String type;
|
||||||
protected boolean isAggressive;
|
protected boolean isAggressive;
|
||||||
protected long validItemFlags;
|
protected long validItemFlags;
|
||||||
|
|
||||||
@@ -39,15 +46,16 @@ public abstract class AbstractPowerAction {
|
|||||||
/**
|
/**
|
||||||
* ResultSet Constructor
|
* ResultSet Constructor
|
||||||
*/
|
*/
|
||||||
public AbstractPowerAction(PowerAction powerAction) {
|
public AbstractPowerAction(ResultSet rs) throws SQLException {
|
||||||
|
|
||||||
this.IDString = powerAction.action_id;
|
this.UUID = rs.getInt("ID");
|
||||||
this.type = powerAction.action_type;
|
this.IDString = rs.getString("IDString");
|
||||||
int flags = powerAction.itemFlag.ordinal();
|
this.type = rs.getString("type");
|
||||||
this.isAggressive = powerAction.isAggressive;
|
int flags = rs.getInt("flags");
|
||||||
|
this.isAggressive = ((flags & 128) != 0) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractPowerAction(int uUID, String iDString, mbEnums.PowerActionType type, boolean isAggressive,
|
public AbstractPowerAction(int uUID, String iDString, String type, boolean isAggressive,
|
||||||
long validItemFlags) {
|
long validItemFlags) {
|
||||||
super();
|
super();
|
||||||
UUID = uUID;
|
UUID = uUID;
|
||||||
@@ -56,6 +64,139 @@ public abstract class AbstractPowerAction {
|
|||||||
this.isAggressive = false;
|
this.isAggressive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void getAllPowerActions(HashMap<String, AbstractPowerAction> powerActions, HashMap<Integer, AbstractPowerAction> powerActionsByID, HashMap<String, EffectsBase> effects) {
|
||||||
|
|
||||||
|
|
||||||
|
try (Connection connection = DbManager.getConnection();
|
||||||
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_power_poweraction")) {
|
||||||
|
|
||||||
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
|
String IDString, type;
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
AbstractPowerAction apa;
|
||||||
|
type = rs.getString("type");
|
||||||
|
IDString = rs.getString("IDString");
|
||||||
|
int token = DbManager.hasher.SBStringHash(IDString);
|
||||||
|
//cache token, used for applying effects.
|
||||||
|
PowersManager.ActionTokenByIDString.put(IDString, token);
|
||||||
|
apa = null;
|
||||||
|
switch (type) {
|
||||||
|
default:
|
||||||
|
Logger.error("valid type not found for poweraction of ID" + rs.getInt("ID"));
|
||||||
|
break;
|
||||||
|
case "ApplyEffect":
|
||||||
|
apa = new ApplyEffectPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "ApplyEffects":
|
||||||
|
apa = new ApplyEffectsPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "DeferredPower":
|
||||||
|
apa = new DeferredPowerPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "DamageOverTime":
|
||||||
|
apa = new DamageOverTimePowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "Peek":
|
||||||
|
apa = new PeekPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Charm":
|
||||||
|
apa = new CharmPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Fear":
|
||||||
|
apa = new FearPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Confusion":
|
||||||
|
apa = new ConfusionPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "RemoveEffect":
|
||||||
|
apa = new RemoveEffectPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Track":
|
||||||
|
apa = new TrackPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "DirectDamage":
|
||||||
|
apa = new DirectDamagePowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "Transform":
|
||||||
|
apa = new TransformPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "CreateMob":
|
||||||
|
apa = new CreateMobPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Invis":
|
||||||
|
apa = new InvisPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "ClearNearbyAggro":
|
||||||
|
apa = new ClearNearbyAggroPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "MobRecall":
|
||||||
|
apa = new MobRecallPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "SetItemFlag":
|
||||||
|
apa = new SetItemFlagPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "SimpleDamage":
|
||||||
|
apa = new SimpleDamagePowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "TransferStatOT":
|
||||||
|
apa = new TransferStatOTPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "TransferStat":
|
||||||
|
apa = new TransferStatPowerAction(rs, effects);
|
||||||
|
break;
|
||||||
|
case "Teleport":
|
||||||
|
apa = new TeleportPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "TreeChoke":
|
||||||
|
apa = new TreeChokePowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Block":
|
||||||
|
apa = new BlockPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Resurrect":
|
||||||
|
apa = new ResurrectPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "ClearAggro":
|
||||||
|
apa = new ClearAggroPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "ClaimMine":
|
||||||
|
apa = new ClaimMinePowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Recall":
|
||||||
|
apa = new RecallPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "SpireDisable":
|
||||||
|
apa = new SpireDisablePowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Steal":
|
||||||
|
apa = new StealPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "Summon":
|
||||||
|
apa = new SummonPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "RunegateTeleport":
|
||||||
|
apa = new RunegateTeleportPowerAction(rs);
|
||||||
|
break;
|
||||||
|
case "OpenGate":
|
||||||
|
apa = new OpenGatePowerAction(rs);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
powerActions.put(IDString, apa);
|
||||||
|
powerActionsByID.put(apa.UUID, apa);
|
||||||
|
apa.validItemFlags = 0;
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.error(e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add OpenGatePowerAction
|
||||||
|
AbstractPowerAction openGateAction = new OpenGatePowerAction(5000, "OPENGATE", "OpenGate", false, 0);
|
||||||
|
powerActions.put("OPENGATE", openGateAction);
|
||||||
|
powerActionsByID.put(openGateAction.UUID, openGateAction);
|
||||||
|
}
|
||||||
|
|
||||||
public void startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int numTrains, ActionsBase ab, PowersBase pb) {
|
public void startAction(AbstractCharacter source, AbstractWorldObject awo, Vector3fImmutable targetLoc, int numTrains, ActionsBase ab, PowersBase pb) {
|
||||||
this._startAction(source, awo, targetLoc, numTrains, ab, pb);
|
this._startAction(source, awo, targetLoc, numTrains, ab, pb);
|
||||||
}
|
}
|
||||||
@@ -131,7 +272,7 @@ public abstract class AbstractPowerAction {
|
|||||||
return this.validItemFlags;
|
return this.validItemFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public mbEnums.PowerActionType getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ import engine.powers.ActionsBase;
|
|||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.server.MBServerStatics;
|
import engine.server.MBServerStatics;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ApplyEffectPowerAction extends AbstractPowerAction {
|
public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||||
@@ -37,11 +38,11 @@ public class ApplyEffectPowerAction extends AbstractPowerAction {
|
|||||||
private String effectParentID;
|
private String effectParentID;
|
||||||
private EffectsBase effectParent;
|
private EffectsBase effectParent;
|
||||||
|
|
||||||
public ApplyEffectPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
public ApplyEffectPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
this.effectParentID = powerAction.effects.get(0).effect_id;
|
this.effectParentID = rs.getString("IDString");
|
||||||
this.effectParent = effects.get(this.effectParentID);
|
this.effectParent = effects.get(this.effectParentID);
|
||||||
this.effectID = powerAction.effects.get(0).effect_id;
|
this.effectID = rs.getString("effectID");
|
||||||
this.effect = effects.get(this.effectID);
|
this.effect = effects.get(this.effectID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ import engine.objects.Item;
|
|||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
@@ -31,11 +32,11 @@ public class ApplyEffectsPowerAction extends AbstractPowerAction {
|
|||||||
private EffectsBase effect2;
|
private EffectsBase effect2;
|
||||||
private EffectsBase effectParent;
|
private EffectsBase effectParent;
|
||||||
|
|
||||||
public ApplyEffectsPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
|
public ApplyEffectsPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
this.IDString = powerAction.action_id;
|
this.IDString = rs.getString("IDString");
|
||||||
this.effectID = powerAction.effects.get(0).effect_id;
|
this.effectID = rs.getString("effectID");
|
||||||
this.effectID2 = powerAction.effects.get(2).effect_id;
|
this.effectID2 = rs.getString("effectID2");
|
||||||
this.effect = effects.get(this.effectID);
|
this.effect = effects.get(this.effectID);
|
||||||
this.effect2 = effects.get(this.effectID2);
|
this.effect2 = effects.get(this.effectID2);
|
||||||
this.effectParent = effects.get(this.IDString);
|
this.effectParent = effects.get(this.IDString);
|
||||||
|
|||||||
@@ -14,13 +14,15 @@ import engine.objects.AbstractCharacter;
|
|||||||
import engine.objects.AbstractWorldObject;
|
import engine.objects.AbstractWorldObject;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
public class BlockPowerAction extends AbstractPowerAction {
|
public class BlockPowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public BlockPowerAction(PowerAction powerAction) {
|
public BlockPowerAction(ResultSet rs) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ import engine.objects.Mob;
|
|||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
public class CharmPowerAction extends AbstractPowerAction {
|
public class CharmPowerAction extends AbstractPowerAction {
|
||||||
@@ -26,10 +28,10 @@ public class CharmPowerAction extends AbstractPowerAction {
|
|||||||
private int levelCap;
|
private int levelCap;
|
||||||
private int levelCapRamp;
|
private int levelCapRamp;
|
||||||
|
|
||||||
public CharmPowerAction(PowerAction powerAction) {
|
public CharmPowerAction(ResultSet rs) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
this.levelCap = powerAction.levelCap;
|
this.levelCap = rs.getInt("levelCap");
|
||||||
this.levelCapRamp = powerAction.levelCapCurve.ordinal();
|
this.levelCapRamp = rs.getInt("levelCapRamp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -15,13 +15,15 @@ import engine.mbEnums;
|
|||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
public class ClaimMinePowerAction extends AbstractPowerAction {
|
public class ClaimMinePowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public ClaimMinePowerAction(PowerAction powerAction) {
|
public ClaimMinePowerAction(ResultSet rs) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,13 +16,15 @@ import engine.objects.AbstractWorldObject;
|
|||||||
import engine.objects.Mob;
|
import engine.objects.Mob;
|
||||||
import engine.powers.ActionsBase;
|
import engine.powers.ActionsBase;
|
||||||
import engine.powers.PowersBase;
|
import engine.powers.PowersBase;
|
||||||
import engine.wpak.data.PowerAction;
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
public class ClearAggroPowerAction extends AbstractPowerAction {
|
public class ClearAggroPowerAction extends AbstractPowerAction {
|
||||||
|
|
||||||
public ClearAggroPowerAction(PowerAction powerAction) {
|
public ClearAggroPowerAction(ResultSet rs) throws SQLException {
|
||||||
super(powerAction);
|
super(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user