protected virtual void ProcessDropAction(DropAction action, List <StackResponseContainerInfo> stackResponses) { byte count = action.Count; Item dropItem; StackRequestSlotInfo source = action.Source; Item sourceItem = GetContainerItem(source.ContainerId, source.Slot); if (sourceItem.Count == count || sourceItem.Count - count <= 0) { dropItem = sourceItem; sourceItem = new ItemAir(); sourceItem.UniqueId = 0; SetContainerItem(source.ContainerId, source.Slot, sourceItem); } else { dropItem = (Item)sourceItem.Clone(); sourceItem.Count -= count; dropItem.Count = count; dropItem.UniqueId = Environment.TickCount & Int32.MaxValue; } _player.DropItem(dropItem); stackResponses.Add(new StackResponseContainerInfo { ContainerId = source.ContainerId, Slots = new List <StackResponseSlotInfo> { new StackResponseSlotInfo() { Count = sourceItem.Count, Slot = source.Slot, HotbarSlot = source.Slot, StackNetworkId = sourceItem.UniqueId } } }); }