Ejemplo n.º 1
0
        public void PickUp(IMapObject mapObject)
        {
            WalkInRange(mapObject.Position, 1);

            Logger.Info($"Picking up item {mapObject.ItemKey}");
            Client.SendPacket($"get {EntityType.AsString()} {Id} {mapObject.Id}");
        }
Ejemplo n.º 2
0
        public void Attack(ISkill skill)
        {
            if (!Skills.Contains(skill))
            {
                Logger.Warn($"Can't found skill {skill.SkillKey}");
                return;
            }

            if (skill.IsOnCooldown)
            {
                Logger.Trace("Skill is in cooldown");
                return;
            }

            if (skill.Target == SkillTarget.Target)
            {
                Logger.Warn($"Invalid target {skill.CastId} {skill.Category} {skill.Target} {skill.HitType}");
                return;
            }

            Logger.Debug($"Using skill with id {skill.SkillKey} on self");

            Client.SendPacket($"u_s {skill.CastId} {EntityType.AsString()} {Id}");

            Thread.Sleep(skill.CastTime * 200);
        }
Ejemplo n.º 3
0
 public void Rest()
 {
     Client.SendPacket($"rest 1 {EntityType.AsString()} {Id}");
     IsResting = true;
 }
Ejemplo n.º 4
0
 public void UseObject(IObjectStack objectStack)
 {
     Client.SendPacket($"u_i {EntityType.AsString()} {Id} {objectStack.Bag.AsString()} {objectStack.Slot} 0 0 ");
 }
Ejemplo n.º 5
0
 public void Rotate(Direction direction)
 {
     Client.SendPacket($"dir {direction.AsString()} {EntityType.AsString()} {Id}");
 }
Ejemplo n.º 6
0
 public Task<string> LockResourceAsync(string lockType, string resourceId, EntityType resourceType, bool force, CancellationToken cancellationToken = default) =>
     LockResourceAsync(lockType, resourceId, resourceType.AsString(), force, cancellationToken);
Ejemplo n.º 7
0
 public Task<List<ResourceLock>> GetResourceLocksAsync(string resourceId, EntityType resourceType, CancellationToken cancellationToken = default) => GetResourceLocksAsync(resourceId, resourceType.AsString(), cancellationToken);
Ejemplo n.º 8
0
 public Task<ResourceLock> GetResourceLockAsync(string lockId, string resourceId, EntityType resourceType, CancellationToken cancellationToken = default) => GetResourceLockAsync(lockId, resourceId, resourceType.AsString(), cancellationToken);