diff --git a/src/protocol/swg/CreateClientPathMessage.java b/src/protocol/swg/CreateClientPathMessage.java index 1919ba57..c8474780 100644 --- a/src/protocol/swg/CreateClientPathMessage.java +++ b/src/protocol/swg/CreateClientPathMessage.java @@ -27,7 +27,6 @@ import java.util.List; import org.apache.mina.core.buffer.IoBuffer; import engine.resources.common.CRC; -import engine.resources.common.StringUtilities; import engine.resources.scene.Point3D; public class CreateClientPathMessage extends SWGMessage { diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index 91be0990..aa0c25a0 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -26,7 +26,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.atomic.LongAdder; @@ -41,7 +40,6 @@ import protocol.swg.UpdatePVPStatusMessage; import protocol.swg.UpdatePostureMessage; import protocol.swg.objectControllerObjects.Animation; import protocol.swg.objectControllerObjects.Posture; -import protocol.swg.objectControllerObjects.StartTask; import engine.clients.Client; import engine.resources.objects.Baseline; import resources.objects.SWGList; @@ -56,7 +54,6 @@ import resources.common.OutOfBand; import resources.datatables.Difficulty; import resources.equipment.Equipment; import resources.group.GroupInviteInfo; -import services.command.BaseSWGCommand; import engine.resources.common.CRC; import engine.resources.objects.IPersistent; import engine.resources.objects.SWGObject; @@ -82,7 +79,6 @@ public class CreatureObject extends TangibleObject implements IPersistent { private transient boolean performingEffect; private transient boolean performingFlourish; private transient TangibleObject conversingNpc; - private transient ConcurrentHashMap cooldowns = new ConcurrentHashMap(); private transient long tefTime = 0; private transient SWGObject useTarget; private transient boolean isConstructing = false; @@ -1321,50 +1317,6 @@ public class CreatureObject extends TangibleObject implements IPersistent { } } - public void addCooldown(String cooldownGroup, float cooldownTime) { - if (cooldowns.containsKey(cooldownGroup)) { - cooldowns.remove(cooldownGroup); - } - - long duration = System.currentTimeMillis() + ((long) (cooldownTime * 1000F)); - - cooldowns.put(cooldownGroup, duration); - } - - public boolean hasCooldown(String cooldownGroup) { - if (cooldowns.containsKey(cooldownGroup)) { - if (System.currentTimeMillis() < cooldowns.get(cooldownGroup)) { - return true; - } else { - cooldowns.remove(cooldownGroup); - } - } - - return false; - } - - public boolean removeCooldown(int actionCounter, BaseSWGCommand command) { - if (cooldowns.containsKey(command.getCooldownGroup())) { - cooldowns.remove(command.getCooldownGroup()); - getClient().getSession().write(new ObjControllerMessage(0x0B, new StartTask(actionCounter, getObjectID(), command.getCommandCRC(), CRC.StringtoCRC(command.getCooldownGroup().toLowerCase()), -1)).serialize()); - return true; - } - - return false; - } - - public long getRemainingCooldown(String cooldownGroup) { - if (cooldowns.containsKey(cooldownGroup)) { - if (System.currentTimeMillis() < cooldowns.get(cooldownGroup)) { - return (long) (cooldowns.get(cooldownGroup) - System.currentTimeMillis()); - } else { - cooldowns.remove(cooldownGroup); - } - } - - return 0L; - } - public int getGCWFatigue() { return (int) otherVariables.get("fatigue"); } diff --git a/src/resources/objects/player/PlayerObject.java b/src/resources/objects/player/PlayerObject.java index d6c9758f..e0270319 100644 --- a/src/resources/objects/player/PlayerObject.java +++ b/src/resources/objects/player/PlayerObject.java @@ -48,7 +48,6 @@ import resources.quest.Quest; import services.quest.QuestItem; import engine.clients.Client; import engine.resources.common.CRC; -import engine.resources.common.StringUtilities; import engine.resources.objects.Baseline; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; diff --git a/src/resources/quest/Quest.java b/src/resources/quest/Quest.java index 73549238..bfd13ba2 100644 --- a/src/resources/quest/Quest.java +++ b/src/resources/quest/Quest.java @@ -28,7 +28,6 @@ import java.util.concurrent.ScheduledFuture; import org.apache.mina.core.buffer.IoBuffer; import engine.resources.common.CRC; -import engine.resources.common.StringUtilities; import engine.resources.objects.Delta; public class Quest extends Delta implements Serializable { diff --git a/src/services/StaticService.java b/src/services/StaticService.java index e49c3904..e09c2288 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -140,8 +140,8 @@ public class StaticService implements INetworkDispatch { } //long objectId = core.objectService.getDOId(planetName, template, 0, buildingId, cellNumber, x, y, z); - long objectId = core.objectService.getReusableId(); - //long objectId = 0; + //long objectId = core.objectService.getReusableId(); + long objectId = 0; SWGObject object = null; MobileTemplate mobileTemplate = core.spawnService.getMobileTemplate(template);