Browse Source

Track poweraction work

feature-config-usage
MagicBot 2 months ago
parent
commit
bdb9a12bd5
  1. 16
      src/engine/powers/poweractions/TrackPowerAction.java

16
src/engine/powers/poweractions/TrackPowerAction.java

@ -19,7 +19,6 @@ import engine.powers.PowersBase;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import engine.wpak.data.PowerAction; import engine.wpak.data.PowerAction;
import java.sql.SQLException;
import java.util.HashMap; import java.util.HashMap;
@ -37,22 +36,9 @@ public class TrackPowerAction extends AbstractPowerAction {
private int maxTrack; private int maxTrack;
private EffectsBase effect; private EffectsBase effect;
public TrackPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) throws SQLException { public TrackPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) {
super(powerAction); super(powerAction);
this.effectID = powerAction.effects.get(0).effect_id; this.effectID = powerAction.effects.get(0).effect_id;
int flags = powerAction.getInt("flags");
this.trackPlayer = ((flags & 1024) == 1) ? true : false;
this.trackCorpse = ((flags & 2048) == 1) ? true : false;
String trackFilter = powerAction.getString("trackFilter");
this.trackAll = trackFilter.equals("All") ? true : false;
this.trackDragon = trackFilter.equals("Dragon") ? true : false;
this.trackGiant = trackFilter.equals("Giant") ? true : false;
this.trackNPC = trackFilter.equals("NPC") ? true : false;
this.trackUndead = trackFilter.equals("Undead") ? true : false;
this.trackVampire = trackFilter.equals("Vampire") ? true : false;
this.maxTrack = powerAction.getInt("maxTrack");
this.effect = effects.get(this.effectID); this.effect = effects.get(this.effectID);
} }

Loading…
Cancel
Save