|
|
@ -17,8 +17,8 @@ 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 java.sql.ResultSet; |
|
|
|
|
|
|
|
import java.sql.SQLException; |
|
|
|
import java.sql.SQLException; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
|
|
@ -37,14 +37,14 @@ public class TrackPowerAction extends AbstractPowerAction { |
|
|
|
private int maxTrack; |
|
|
|
private int maxTrack; |
|
|
|
private EffectsBase effect; |
|
|
|
private EffectsBase effect; |
|
|
|
|
|
|
|
|
|
|
|
public TrackPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException { |
|
|
|
public TrackPowerAction(PowerAction powerAction, HashMap<String, EffectsBase> effects) throws SQLException { |
|
|
|
super(rs); |
|
|
|
super(powerAction); |
|
|
|
|
|
|
|
|
|
|
|
this.effectID = rs.getString("effectID"); |
|
|
|
this.effectID = powerAction.effects.get(0).effect_id; |
|
|
|
int flags = rs.getInt("flags"); |
|
|
|
int flags = powerAction.getInt("flags"); |
|
|
|
this.trackPlayer = ((flags & 1024) == 1) ? true : false; |
|
|
|
this.trackPlayer = ((flags & 1024) == 1) ? true : false; |
|
|
|
this.trackCorpse = ((flags & 2048) == 1) ? true : false; |
|
|
|
this.trackCorpse = ((flags & 2048) == 1) ? true : false; |
|
|
|
String trackFilter = rs.getString("trackFilter"); |
|
|
|
String trackFilter = powerAction.getString("trackFilter"); |
|
|
|
this.trackAll = trackFilter.equals("All") ? true : false; |
|
|
|
this.trackAll = trackFilter.equals("All") ? true : false; |
|
|
|
this.trackDragon = trackFilter.equals("Dragon") ? true : false; |
|
|
|
this.trackDragon = trackFilter.equals("Dragon") ? true : false; |
|
|
|
this.trackGiant = trackFilter.equals("Giant") ? true : false; |
|
|
|
this.trackGiant = trackFilter.equals("Giant") ? true : false; |
|
|
@ -52,7 +52,7 @@ public class TrackPowerAction extends AbstractPowerAction { |
|
|
|
this.trackUndead = trackFilter.equals("Undead") ? true : false; |
|
|
|
this.trackUndead = trackFilter.equals("Undead") ? true : false; |
|
|
|
this.trackVampire = trackFilter.equals("Vampire") ? true : false; |
|
|
|
this.trackVampire = trackFilter.equals("Vampire") ? true : false; |
|
|
|
|
|
|
|
|
|
|
|
this.maxTrack = rs.getInt("maxTrack"); |
|
|
|
this.maxTrack = powerAction.getInt("maxTrack"); |
|
|
|
this.effect = effects.get(this.effectID); |
|
|
|
this.effect = effects.get(this.effectID); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|