mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-08 23:12:57 -04:00
Various command bugfixes
This commit is contained in:
@@ -21,28 +21,11 @@
|
||||
******************************************************************************/
|
||||
package services.command;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import resources.objects.weapon.WeaponObject;
|
||||
import engine.clientdata.ClientFileManager;
|
||||
import engine.clientdata.visitors.DatatableVisitor;
|
||||
|
||||
public class CombatCommand extends BaseSWGCommand {
|
||||
|
||||
private String[] defaultAnimations = new String[]{};
|
||||
private String[] oneHandedAnimations = new String[]{};
|
||||
private String[] twoHandedAnimations = new String[]{};
|
||||
private String[] polearmAnimations = new String[]{};
|
||||
private String[] unarmedAnimations = new String[]{};
|
||||
private String[] pistolAnimations = new String[]{};
|
||||
private String[] carbineAnimations = new String[]{};
|
||||
private String[] lightRifleAnimations = new String[]{};
|
||||
private String[] rifleAnimations = new String[]{};
|
||||
private String[] heavyWpnAnimations = new String[]{};
|
||||
private String[] oneHandedLSAnimations = new String[]{};
|
||||
private String[] twoHandedLSAnimations = new String[]{};
|
||||
private String[] polearmLSAnimations = new String[]{};
|
||||
private String[] thrownAnimations = new String[]{};
|
||||
private byte validTargetType;
|
||||
private byte hitType;
|
||||
private byte healType;
|
||||
@@ -67,16 +50,12 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
private int damageType, elementalType, elementalValue;
|
||||
private String performanceSpam;
|
||||
private byte hitSpam;
|
||||
//private float cooldown;
|
||||
private String delayAttackEggTemplate;
|
||||
private String delayAttackParticle;
|
||||
private float initialAttackDelay;
|
||||
private float delayAttackInterval;
|
||||
private int delayAttackLoops;
|
||||
private int delayAttackEggPosition;
|
||||
//private String cooldownGroup;
|
||||
//private float executeTime;
|
||||
//private float warmupTime;
|
||||
private float vigorCost; // for commando kill meter and bm specials
|
||||
private float criticalChance;
|
||||
private int attack_rolls;
|
||||
@@ -166,119 +145,7 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public String[] getDefaultAnimations() {
|
||||
return defaultAnimations;
|
||||
}
|
||||
|
||||
public void setDefaultAnimations(String[] defaultAnimations) {
|
||||
this.defaultAnimations = defaultAnimations;
|
||||
}
|
||||
|
||||
public String[] getOneHandedAnimations() {
|
||||
return oneHandedAnimations;
|
||||
}
|
||||
|
||||
public void setOneHandedAnimations(String[] oneHandedAnimations) {
|
||||
this.oneHandedAnimations = oneHandedAnimations;
|
||||
}
|
||||
|
||||
public String[] getTwoHandedAnimations() {
|
||||
return twoHandedAnimations;
|
||||
}
|
||||
|
||||
public void setTwoHandedAnimations(String[] twoHandedAnimations) {
|
||||
this.twoHandedAnimations = twoHandedAnimations;
|
||||
}
|
||||
|
||||
public String[] getPolearmAnimations() {
|
||||
return polearmAnimations;
|
||||
}
|
||||
|
||||
public void setPolearmAnimations(String[] polearmAnimations) {
|
||||
this.polearmAnimations = polearmAnimations;
|
||||
}
|
||||
|
||||
public String[] getUnarmedAnimations() {
|
||||
return unarmedAnimations;
|
||||
}
|
||||
|
||||
public void setUnarmedAnimations(String[] unarmedAnimations) {
|
||||
this.unarmedAnimations = unarmedAnimations;
|
||||
}
|
||||
|
||||
public String[] getPistolAnimations() {
|
||||
return pistolAnimations;
|
||||
}
|
||||
|
||||
public void setPistolAnimations(String[] pistolAnimations) {
|
||||
this.pistolAnimations = pistolAnimations;
|
||||
}
|
||||
|
||||
public String[] getCarbineAnimations() {
|
||||
return carbineAnimations;
|
||||
}
|
||||
|
||||
public void setCarbineAnimations(String[] carbineAnimations) {
|
||||
this.carbineAnimations = carbineAnimations;
|
||||
}
|
||||
|
||||
public String[] getLightRifleAnimations() {
|
||||
return lightRifleAnimations;
|
||||
}
|
||||
|
||||
public void setLightRifleAnimations(String[] lightRifleAnimations) {
|
||||
this.lightRifleAnimations = lightRifleAnimations;
|
||||
}
|
||||
|
||||
public String[] getRifleAnimations() {
|
||||
return rifleAnimations;
|
||||
}
|
||||
|
||||
public void setRifleAnimations(String[] rifleAnimations) {
|
||||
this.rifleAnimations = rifleAnimations;
|
||||
}
|
||||
|
||||
public String[] getHeavyWpnAnimations() {
|
||||
return heavyWpnAnimations;
|
||||
}
|
||||
|
||||
public void setHeavyWpnAnimations(String[] heavyWpnAnimations) {
|
||||
this.heavyWpnAnimations = heavyWpnAnimations;
|
||||
}
|
||||
|
||||
public String[] getOneHandedLSAnimations() {
|
||||
return oneHandedLSAnimations;
|
||||
}
|
||||
|
||||
public void setOneHandedLSAnimations(String[] oneHandedLSAnimations) {
|
||||
this.oneHandedLSAnimations = oneHandedLSAnimations;
|
||||
}
|
||||
|
||||
public String[] getTwoHandedLSAnimations() {
|
||||
return twoHandedLSAnimations;
|
||||
}
|
||||
|
||||
public void setTwoHandedLSAnimations(String[] twoHandedLSAnimations) {
|
||||
this.twoHandedLSAnimations = twoHandedLSAnimations;
|
||||
}
|
||||
|
||||
public String[] getPolearmLSAnimations() {
|
||||
return polearmLSAnimations;
|
||||
}
|
||||
|
||||
public void setPolearmLSAnimations(String[] polearmLSAnimations) {
|
||||
this.polearmLSAnimations = polearmLSAnimations;
|
||||
}
|
||||
|
||||
public String[] getThrownAnimations() {
|
||||
return thrownAnimations;
|
||||
}
|
||||
|
||||
public void setThrownAnimations(String[] thrownAnimations) {
|
||||
this.thrownAnimations = thrownAnimations;
|
||||
}
|
||||
|
||||
|
||||
public byte getValidTargetType() {
|
||||
return validTargetType;
|
||||
}
|
||||
@@ -550,64 +417,7 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
public void setHitSpam(byte hitSpam) {
|
||||
this.hitSpam = hitSpam;
|
||||
}
|
||||
|
||||
public String getRandomAnimation(WeaponObject weapon) {
|
||||
|
||||
int weaponType = weapon.getWeaponType();
|
||||
String[] animations;
|
||||
|
||||
switch(weaponType) {
|
||||
|
||||
case 0:
|
||||
animations = rifleAnimations;
|
||||
break;
|
||||
case 1:
|
||||
animations = carbineAnimations;
|
||||
break;
|
||||
case 2:
|
||||
animations = pistolAnimations;
|
||||
break;
|
||||
case 3:
|
||||
animations = heavyWpnAnimations;
|
||||
break;
|
||||
case 4:
|
||||
animations = oneHandedAnimations;
|
||||
break;
|
||||
case 5:
|
||||
animations = twoHandedAnimations;
|
||||
break;
|
||||
case 6:
|
||||
animations = defaultAnimations;
|
||||
break;
|
||||
case 7:
|
||||
animations = polearmAnimations;
|
||||
break;
|
||||
case 8:
|
||||
animations = thrownAnimations;
|
||||
break;
|
||||
case 9:
|
||||
animations = oneHandedLSAnimations;
|
||||
break;
|
||||
case 10:
|
||||
animations = twoHandedLSAnimations;
|
||||
break;
|
||||
case 11:
|
||||
animations = polearmLSAnimations;
|
||||
break;
|
||||
|
||||
default:
|
||||
animations = defaultAnimations;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(animations.length == 0)
|
||||
animations = defaultAnimations;
|
||||
|
||||
return animations[new Random().nextInt(animations.length)];
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getDelayAttackEggTemplate() {
|
||||
return delayAttackEggTemplate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user