Remove the dead power animation override and valid item flag code
PowersManager.AnimationOverrides was loaded from static_power_animation_override and never read. validItemFlags on AbstractPowerAction was always 0 and its getter had no callers; its loader (static_power_effect_allowed_item) was already commented out. No value change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
637a798191
commit
337cc3d360
4 files changed
+4
-44
No files matched your search
@@ -10,7 +10,6 @@
|
||||
package engine.db.handlers;
|
||||
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.mbEnums;
|
||||
import engine.objects.Mob;
|
||||
import engine.powers.EffectsBase;
|
||||
@@ -53,30 +52,4 @@ public class dbPowerHandler extends dbHandlerBase {
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,7 +56,6 @@ public enum PowersManager {
|
||||
public static HashMap<String, AbstractPowerAction> powerActionsByIDString = new HashMap<>();
|
||||
public static HashMap<Integer, AbstractPowerAction> powerActionsByID = new HashMap<>();
|
||||
public static HashMap<String, Integer> ActionTokenByIDString = new HashMap<>();
|
||||
public static HashMap<String, Integer> AnimationOverrides = new HashMap<>();
|
||||
public static HashMap<Integer, ArrayList<RunePowerEntry>> _allRunePowers;
|
||||
public static HashMap<Integer, ArrayList<RuneSkillAdjustEntry>> _allRuneSkillAdjusts;
|
||||
public static HashMap<String, HashMap<ResourceType, Integer>> _effect_costMaps = new HashMap<>();
|
||||
@@ -162,14 +161,10 @@ public enum PowersManager {
|
||||
|
||||
// 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
|
||||
ArrayList<PowersBase> pbList = dbSkillReqHandler.getAllPowersBase();
|
||||
for (PowersBase pb : pbList) {
|
||||
|
||||
@@ -34,7 +34,6 @@ public abstract class AbstractPowerAction {
|
||||
protected String IDString;
|
||||
protected String type;
|
||||
protected boolean isAggressive;
|
||||
protected long validItemFlags;
|
||||
|
||||
/**
|
||||
* No Table ID Constructor
|
||||
@@ -55,8 +54,7 @@ public abstract class AbstractPowerAction {
|
||||
this.isAggressive = ((flags & 128) != 0) ? true : false;
|
||||
}
|
||||
|
||||
public AbstractPowerAction(int uUID, String iDString, String type, boolean isAggressive,
|
||||
long validItemFlags) {
|
||||
public AbstractPowerAction(int uUID, String iDString, String type, boolean isAggressive) {
|
||||
super();
|
||||
UUID = uUID;
|
||||
IDString = iDString;
|
||||
@@ -184,7 +182,6 @@ public abstract class AbstractPowerAction {
|
||||
}
|
||||
powerActions.put(IDString, apa);
|
||||
powerActionsByID.put(apa.UUID, apa);
|
||||
apa.validItemFlags = 0;
|
||||
}
|
||||
rs.close();
|
||||
} catch (Exception e) {
|
||||
@@ -192,7 +189,7 @@ public abstract class AbstractPowerAction {
|
||||
}
|
||||
|
||||
//Add OpenGatePowerAction
|
||||
AbstractPowerAction openGateAction = new OpenGatePowerAction(5000, "OPENGATE", "OpenGate", false, 0);
|
||||
AbstractPowerAction openGateAction = new OpenGatePowerAction(5000, "OPENGATE", "OpenGate", false);
|
||||
powerActions.put("OPENGATE", openGateAction);
|
||||
powerActionsByID.put(openGateAction.UUID, openGateAction);
|
||||
}
|
||||
@@ -267,11 +264,6 @@ public abstract class AbstractPowerAction {
|
||||
return null;
|
||||
}
|
||||
|
||||
//These functions verify a powerAction is valid for an item type
|
||||
public long getValidItemFlags() {
|
||||
return this.validItemFlags;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ public class OpenGatePowerAction extends AbstractPowerAction {
|
||||
super(rs);
|
||||
}
|
||||
|
||||
public OpenGatePowerAction(int uUID, String iDString, String type, boolean isAggressive, long validItemFlags) {
|
||||
super(uUID, iDString, type, isAggressive, validItemFlags);
|
||||
public OpenGatePowerAction(int uUID, String iDString, String type, boolean isAggressive) {
|
||||
super(uUID, iDString, type, isAggressive);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user