Added serverside cooldown control

This commit is contained in:
Light2
2013-09-22 18:24:48 +02:00
parent 7a4b985bc2
commit 5ff085adcc
5 changed files with 58 additions and 6 deletions
+42 -1
View File
@@ -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;
}