PowerAction parsing work.
This commit is contained in:
@@ -82,23 +82,25 @@ public class PowerActionParser {
|
|||||||
|
|
||||||
switch (powerActionEntry.action_type) {
|
switch (powerActionEntry.action_type) {
|
||||||
case "RemoveEffect":
|
case "RemoveEffect":
|
||||||
powerActionEntry.effect_id = headerIterator.next();
|
effectDescription = new EffectDescription();
|
||||||
|
effectDescription.effect_id = headerIterator.next();
|
||||||
|
powerActionEntry.effects.add(effectDescription);
|
||||||
break;
|
break;
|
||||||
case "CreateMob":
|
case "CreateMob":
|
||||||
powerActionEntry.arg1 = Integer.parseInt(headerIterator.next());
|
powerActionEntry.petLevel = Integer.parseInt(headerIterator.next());
|
||||||
powerActionEntry.arg2 = Integer.parseInt(headerIterator.next());
|
powerActionEntry.petRace = Integer.parseInt(headerIterator.next());
|
||||||
break;
|
break;
|
||||||
case "DamageOverTime":
|
case "DamageOverTime":
|
||||||
powerActionEntry.effect_id = headerIterator.next();
|
effectDescription = new EffectDescription();
|
||||||
powerActionEntry.arg1 = Integer.parseInt(headerIterator.next());
|
effectDescription.effect_id = headerIterator.next();
|
||||||
powerActionEntry.arg2 = Integer.parseInt(headerIterator.next());
|
effectDescription.cycleDuration = Integer.parseInt(headerIterator.next());
|
||||||
|
effectDescription.cycleDelay = Integer.parseInt(headerIterator.next());
|
||||||
|
powerActionEntry.effects.add(effectDescription);
|
||||||
break;
|
break;
|
||||||
case "Transform":
|
case "Transform":
|
||||||
case "Invis":
|
case "Invis":
|
||||||
powerActionEntry.effect_id = headerIterator.next();
|
|
||||||
powerActionEntry.arg1 = Integer.parseInt(headerIterator.next());
|
|
||||||
break;
|
|
||||||
case "ApplyEffect":
|
case "ApplyEffect":
|
||||||
|
case "ApplyEffects":
|
||||||
case "DeferredPower":
|
case "DeferredPower":
|
||||||
case "DirectDamage":
|
case "DirectDamage":
|
||||||
while (headerIterator.hasNext()) {
|
while (headerIterator.hasNext()) {
|
||||||
@@ -143,7 +145,7 @@ public class PowerActionParser {
|
|||||||
powerActionEntry.scaleFactor.add(Float.parseFloat(bodyPart));
|
powerActionEntry.scaleFactor.add(Float.parseFloat(bodyPart));
|
||||||
break;
|
break;
|
||||||
case "ISRESISTABLE":
|
case "ISRESISTABLE":
|
||||||
powerActionEntry.isResistable = Boolean.parseBoolean(lineValues[1].trim());
|
powerActionEntry.isResistible = Boolean.parseBoolean(lineValues[1].trim());
|
||||||
break;
|
break;
|
||||||
case "ISAGGRESSIVE":
|
case "ISAGGRESSIVE":
|
||||||
powerActionEntry.isAggressive = Boolean.parseBoolean(lineValues[1].trim());
|
powerActionEntry.isAggressive = Boolean.parseBoolean(lineValues[1].trim());
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ public class EffectDescription {
|
|||||||
public String effect_id;
|
public String effect_id;
|
||||||
public int level;
|
public int level;
|
||||||
public String message;
|
public String message;
|
||||||
|
public int cycleDuration;
|
||||||
|
public int cycleDelay;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,16 +25,15 @@ public class PowerActionEntry {
|
|||||||
public boolean shouldShowWeapons = false;
|
public boolean shouldShowWeapons = false;
|
||||||
public boolean shouldShowArmor = false;
|
public boolean shouldShowArmor = false;
|
||||||
public boolean bladeTrails = false;
|
public boolean bladeTrails = false;
|
||||||
public boolean isResistable = false;
|
public boolean isResistible = false;
|
||||||
public String effect_id;
|
|
||||||
public ArrayList<Float> scaleFactor = new ArrayList<>();
|
public ArrayList<Float> scaleFactor = new ArrayList<>();
|
||||||
public ArrayList<Integer> attackAnimations = new ArrayList<>();
|
public ArrayList<Integer> attackAnimations = new ArrayList<>();
|
||||||
public boolean isAggressive;
|
public boolean isAggressive;
|
||||||
public mbEnums.DamageType damageType;
|
public mbEnums.DamageType damageType;
|
||||||
public boolean applyEffectBlank = false;
|
public boolean applyEffectBlank = false;
|
||||||
public boolean wearOffEffectBlank = false;
|
public boolean wearOffEffectBlank = false;
|
||||||
public int arg1; // used in DamageOverTime, CreateMob, etc.
|
public int petLevel;
|
||||||
public int arg2;
|
public int petRace;
|
||||||
public boolean removeAll;
|
public boolean removeAll;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user