示例#1
0
        public void Dispatch(ISession session, IPacket packet)
        {
            BinaryReader reader  = packet.CreateReader();
            byte         srcBag  = reader.ReadByte();
            byte         srcSlot = reader.ReadByte();

            Player player = session.Player;

            IInventory inventorySrc = player.GetInventory(srcBag);
            IInventory inventoryDst = GetInventoryDst(player);

            if (inventoryDst.AutoAdd(inventorySrc[srcSlot]))
            {
                inventorySrc[srcSlot] = null;
            }
        }