ldmud-3.4.1/doc/
ldmud-3.4.1/doc/efun.de/
ldmud-3.4.1/doc/efun/
ldmud-3.4.1/doc/man/
ldmud-3.4.1/doc/other/
ldmud-3.4.1/mud/
ldmud-3.4.1/mud/heaven7/
ldmud-3.4.1/mud/lp-245/
ldmud-3.4.1/mud/lp-245/banish/
ldmud-3.4.1/mud/lp-245/doc/
ldmud-3.4.1/mud/lp-245/doc/examples/
ldmud-3.4.1/mud/lp-245/doc/sefun/
ldmud-3.4.1/mud/lp-245/log/
ldmud-3.4.1/mud/lp-245/obj/Go/
ldmud-3.4.1/mud/lp-245/players/lars/
ldmud-3.4.1/mud/lp-245/room/death/
ldmud-3.4.1/mud/lp-245/room/maze1/
ldmud-3.4.1/mud/lp-245/room/sub/
ldmud-3.4.1/mud/lp-245/secure/
ldmud-3.4.1/mud/morgengrauen/
ldmud-3.4.1/mud/morgengrauen/lib/
ldmud-3.4.1/mud/sticklib/
ldmud-3.4.1/mud/sticklib/src/
ldmud-3.4.1/mudlib/uni-crasher/
ldmud-3.4.1/pkg/
ldmud-3.4.1/pkg/debugger/
ldmud-3.4.1/pkg/diff/
ldmud-3.4.1/pkg/misc/
ldmud-3.4.1/src/autoconf/
ldmud-3.4.1/src/hosts/
ldmud-3.4.1/src/hosts/GnuWin32/
ldmud-3.4.1/src/hosts/amiga/
ldmud-3.4.1/src/hosts/win32/
ldmud-3.4.1/src/ptmalloc/
ldmud-3.4.1/src/util/
ldmud-3.4.1/src/util/erq/
ldmud-3.4.1/src/util/indent/hosts/next/
ldmud-3.4.1/src/util/xerq/
ldmud-3.4.1/src/util/xerq/lpc/
ldmud-3.4.1/src/util/xerq/lpc/www/
ldmud-3.4.1/test/t-030925/
ldmud-3.4.1/test/t-040413/
ldmud-3.4.1/test/t-041124/
DEPRECATED
SYNOPSIS
        int transfer(object item, object dest)

DESCRIPTION
        This efun is for backward compatibility only. It is only
        available in compat mode.

        Move the object "item" to the object "dest". All kinds of
        tests are done, and a number is returned specifying the
        result:

        0: Success.
        1: To heavy for destination.
        2: Can't be dropped.
        3: Can't take it out of it's container.
        4: The object can't be inserted into bags etc.
        5: The destination doesn't allow insertions of objects.
        6: The object can't be picked up.

        If an object is transfered to a newly created object, make
        sure that the new object first is transfered to it's
        destination.

        The efun calls add_weight(), drop(), get(), prevent_insert(),
        add_weight(), and can_put_and_get() where needed.

REPLACEMENT
        This efun can easily be replaced with a simul_efun:

        /*--------------------------------------------------------*/
        int transfer(object item, object dest)
        {
            int weight;
            object from;

            efun::set_this_object(previous_object());

            weight = item->query_weight();
            if (!item)
                return 3;

            from = environment(item);
            if (from)
            {
                /*
                 * If the original place of the object is a living object,
                 * then we must call drop() to check that the object can be
                 * dropped.
                 */
                if (living(from))
                {
                    if (item->drop() || !item)
                        return 2;
                }
                /*
                 * If 'from' is not a room and not a player, check that we may
                 * remove things out of it.
                 */
                else if (environment(from))
                {
                    if (!from->can_put_and_get() || !from)
                        return 3;
                }
            }

            /*
             * If the destination is not a room, and not a player,
             * Then we must test 'prevent_insert', and 'can_put_and_get'.
             */
            if (environment(dest) && !living(dest))
            {
                if (item->prevent_insert())
                    return 4;
                if (!dest->can_put_and_get() || !dest)
                    return 5;
            }

            if (living(dest))
            {
                if (!item->get() || !item)
                    return 6;
            }

            /*
             * If it is not a room, correct the total weight in the
             * destination.
             */
            if (environment(dest) && weight)
            {
                if (!dest->add_weight(weight) || !dest)
                    return 1;
            }

            /*
             * If it is not a room, correct the weight in the 'from' object.
             */
            if (from && environment(from) && weight)
            {
                from->add_weight(-weight);
            }

            move_object(item, dest);

            return 0;
        }
        /*--------------------------------------------------------*/


HISTORY
        Deprecated in LDMud 3.3; available only when compiled with
          USE_DEPRECATED.

SEE ALSO
         move_object(E), drop(A), get(A), prevent_insert(A),
         can_put_and_get(A), add_weight(A)