ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_object.C
(Generate patch)

Comparing deliantra/server/server/c_object.C (file contents):
Revision 1.23 by root, Mon Dec 11 23:35:37 2006 UTC vs.
Revision 1.25 by root, Tue Dec 12 21:39:57 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines