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
@@ -25,6 +25,8 @@ import java.nio.ByteOrder;
import org.apache.mina.core.buffer.IoBuffer;
import engine.resources.common.CRC;
import protocol.swg.ObjControllerMessage;
public class StartTask extends ObjControllerObject {
@@ -32,11 +34,15 @@ public class StartTask extends ObjControllerObject {
private int actionCounter;
private long objectId;
private int commandCRC;
private int cooldownGroupCRC;
private float cooldown;
public StartTask(int actionCounter, long objectId, int commandCRC) {
public StartTask(int actionCounter, long objectId, int commandCRC, int cooldownGroupCRC, float cooldown) {
this.actionCounter = actionCounter;
this.objectId = objectId;
this.commandCRC = commandCRC;
this.cooldownGroupCRC = cooldownGroupCRC;
this.cooldown = cooldown;
}
@Override
@@ -58,9 +64,9 @@ public class StartTask extends ObjControllerObject {
result.putInt(0);
result.putInt(0);
result.putInt(commandCRC);
result.putInt(0); // second unknown crc
result.putInt(cooldownGroupCRC); // second unknown crc
result.putInt(0); // unk
result.putFloat(0); // cooldown
result.putFloat(cooldown); // cooldown
return result.flip();