… | |
… | |
277 | |
277 | |
278 | if (pl->type == PLAYER) |
278 | if (pl->type == PLAYER) |
279 | esrv_del_item (pl->contr, tmp->count); |
279 | esrv_del_item (pl->contr, tmp->count); |
280 | |
280 | |
281 | if (!QUERY_FLAG (tmp, FLAG_REMOVED)) |
281 | if (!QUERY_FLAG (tmp, FLAG_REMOVED)) |
282 | remove_ob (tmp); |
282 | tmp->remove (); |
283 | |
283 | |
284 | free_object (tmp); |
284 | tmp->destroy (0); |
285 | return; |
285 | return; |
286 | } |
286 | } |
287 | |
287 | |
288 | if (nrof > tmp_nrof || nrof == 0) |
288 | if (nrof > tmp_nrof || nrof == 0) |
289 | nrof = tmp_nrof; |
289 | nrof = tmp_nrof; |
… | |
… | |
335 | */ |
335 | */ |
336 | if (!QUERY_FLAG (tmp, FLAG_REMOVED)) |
336 | if (!QUERY_FLAG (tmp, FLAG_REMOVED)) |
337 | { |
337 | { |
338 | if (tmp->env && pl->type == PLAYER) |
338 | if (tmp->env && pl->type == PLAYER) |
339 | esrv_del_item (pl->contr, tmp->count); |
339 | esrv_del_item (pl->contr, tmp->count); |
340 | remove_ob (tmp); /* Unlink it */ |
340 | tmp->remove (); /* Unlink it */ |
341 | } |
341 | } |
342 | } |
342 | } |
343 | if (QUERY_FLAG (tmp, FLAG_UNPAID)) |
343 | if (QUERY_FLAG (tmp, FLAG_UNPAID)) |
344 | (void) sprintf (buf, "%s will cost you %s.", query_name (tmp), query_cost_string (tmp, pl, F_BUY | F_SHOP)); |
344 | (void) sprintf (buf, "%s will cost you %s.", query_name (tmp), query_cost_string (tmp, pl, F_BUY | F_SHOP)); |
345 | else |
345 | else |
… | |
… | |
632 | esrv_del_item (op->contr, tmp2->count); |
632 | esrv_del_item (op->contr, tmp2->count); |
633 | else /* this can proably be replaced with an update */ |
633 | else /* this can proably be replaced with an update */ |
634 | esrv_send_item (op, tmp2); |
634 | esrv_send_item (op, tmp2); |
635 | } |
635 | } |
636 | else |
636 | else |
637 | remove_ob (tmp); |
637 | tmp->remove (); |
638 | |
638 | |
639 | new_draw_info_format (NDI_UNIQUE, 0, op, "You put the %s in %s.", query_name (tmp), query_name (sack)); |
639 | new_draw_info_format (NDI_UNIQUE, 0, op, "You put the %s in %s.", query_name (tmp), query_name (sack)); |
640 | tmp2 = insert_ob_in_ob (tmp, sack); |
640 | tmp2 = insert_ob_in_ob (tmp, sack); |
641 | fix_player (op); /* This is overkill, fix_player() is called somewhere */ |
641 | fix_player (op); /* This is overkill, fix_player() is called somewhere */ |
642 | /* in object.c */ |
642 | /* in object.c */ |
… | |
… | |
695 | else |
695 | else |
696 | esrv_send_item (op, tmp2); |
696 | esrv_send_item (op, tmp2); |
697 | } |
697 | } |
698 | } |
698 | } |
699 | else |
699 | else |
700 | remove_ob (tmp); |
700 | tmp->remove (); |
701 | |
701 | |
702 | if (INVOKE_OBJECT (DROP, tmp, ARG_OBJECT (op))) |
702 | if (INVOKE_OBJECT (DROP, tmp, ARG_OBJECT (op))) |
703 | return; |
703 | return; |
704 | |
704 | |
705 | if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) |
705 | if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) |
… | |
… | |
707 | sprintf (buf, "You drop the %s.", query_name (tmp)); |
707 | sprintf (buf, "You drop the %s.", query_name (tmp)); |
708 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
708 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
709 | new_draw_info (NDI_UNIQUE, 0, op, "The gods who lent it to you retrieves it."); |
709 | new_draw_info (NDI_UNIQUE, 0, op, "The gods who lent it to you retrieves it."); |
710 | if (op->type == PLAYER) |
710 | if (op->type == PLAYER) |
711 | esrv_del_item (op->contr, tmp->count); |
711 | esrv_del_item (op->contr, tmp->count); |
712 | free_object (tmp); |
712 | tmp->destroy (0); |
713 | fix_player (op); |
713 | fix_player (op); |
714 | return; |
714 | return; |
715 | } |
715 | } |
716 | |
716 | |
717 | /* If SAVE_INTERVAL is commented out, we never want to save |
717 | /* If SAVE_INTERVAL is commented out, we never want to save |
… | |
… | |
773 | if (tmp->env && tmp->env->type != PLAYER) |
773 | if (tmp->env && tmp->env->type != PLAYER) |
774 | { |
774 | { |
775 | /* Just toss the object - probably shouldn't be hanging |
775 | /* Just toss the object - probably shouldn't be hanging |
776 | * around anyways |
776 | * around anyways |
777 | */ |
777 | */ |
778 | remove_ob (tmp); |
778 | tmp->remove (); |
779 | free_object (tmp); |
779 | tmp->destroy (0); |
780 | return; |
780 | return; |
781 | } |
781 | } |
782 | else |
782 | else |
783 | { |
783 | { |
784 | while (tmp != NULL && tmp->invisible) |
784 | while (tmp != NULL && tmp->invisible) |