예제 #1
0
 /// <summary>
 /// Move an item to a location (eg. move a blank rune to the right hand).
 /// </summary>
 /// <param name="toLocation"></param>
 /// <returns></returns>
 public bool Move(Objects.ItemLocation toLocation, byte count)
 {
     return(Packets.Outgoing.ItemMovePacket.Send(client, location.ToLocation(), (ushort)id, location.ToBytes()[4], toLocation.ToLocation(), count));
 }
예제 #2
0
        public void Move(Objects.ItemLocation toLocation, byte count)
        {
            byte c = (byte)((count == 0) ? 1 : count);

            switch (Location.Type)
            {
            case Constants.ItemLocationType.Ground:
                Packets.OutGoing.MoveItem.Send(client, Location.ToLocation(), (ushort)Id, Location.StackOrder, toLocation.ToLocation(), c);
                break;

            case Constants.ItemLocationType.Container:
                Packets.OutGoing.MoveItem.Send(client, Location.ToLocation(), (ushort)Id, Location.ContainerSlot, toLocation.ToLocation(), c);
                break;

            case Constants.ItemLocationType.Slot:
                Packets.OutGoing.MoveItem.Send(client, Location.ToLocation(), (ushort)Id, (byte)Location.Slot, toLocation.ToLocation(), c);
                break;
            }
        }