mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-07 22:13:08 -04:00
Added serverside cooldown control
This commit is contained in:
@@ -74,7 +74,9 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
private float delayAttackInterval;
|
||||
private int delayAttackLoops;
|
||||
private int delayAttackEggPosition;
|
||||
|
||||
private String cooldownGroup;
|
||||
private float executeTime;
|
||||
private float warmupTime;
|
||||
|
||||
public CombatCommand(String commandName) {
|
||||
super(commandName);
|
||||
@@ -156,6 +158,21 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
}
|
||||
}
|
||||
|
||||
DatatableVisitor visitor2 = ClientFileManager.loadFile("datatables/command/command_table.iff", DatatableVisitor.class);
|
||||
|
||||
for(int i = 0; i < visitor2.getRowCount(); i++) {
|
||||
if(visitor2.getObject(i, 0) != null) {
|
||||
if(((String) visitor2.getObject(i, 0)).equalsIgnoreCase(commandName)) {
|
||||
|
||||
cooldownGroup = (String) visitor2.getObject(i, 85);
|
||||
warmupTime = (Float) visitor2.getObject(i, 86);
|
||||
executeTime = (Float) visitor2.getObject(i, 87);
|
||||
cooldown = (Float) visitor2.getObject(i, 88);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -654,6 +671,30 @@ public class CombatCommand extends BaseSWGCommand {
|
||||
public void setDelayAttackLoops(int delayAttackLoops) {
|
||||
this.delayAttackLoops = delayAttackLoops;
|
||||
}
|
||||
|
||||
public String getCooldownGroup() {
|
||||
return cooldownGroup;
|
||||
}
|
||||
|
||||
public void setCooldownGroup(String cooldownGroup) {
|
||||
this.cooldownGroup = cooldownGroup;
|
||||
}
|
||||
|
||||
public float getExecuteTime() {
|
||||
return executeTime;
|
||||
}
|
||||
|
||||
public void setExecuteTime(float executeTime) {
|
||||
this.executeTime = executeTime;
|
||||
}
|
||||
|
||||
public float getWarmupTime() {
|
||||
return warmupTime;
|
||||
}
|
||||
|
||||
public void setWarmupTime(float warmupTime) {
|
||||
this.warmupTime = warmupTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user