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.30 by root, Thu Dec 21 23:37:05 2006 UTC vs.
Revision 1.31 by root, Fri Dec 22 16:34:00 2006 UTC

633 else 633 else
634 tmp->remove (); 634 tmp->remove ();
635 635
636 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));
637 tmp2 = insert_ob_in_ob (tmp, sack); 637 tmp2 = insert_ob_in_ob (tmp, sack);
638 fix_player (op); /* This is overkill, fix_player() is called somewhere */ 638 op->update_stats (); /* This is overkill, fix_player() is called somewhere */
639 /* in object.c */ 639 /* in object.c */
640 640
641 /* If an object merged (and thus, different object), we need to 641 /* If an object merged (and thus, different object), we need to
642 * delete the original. 642 * delete the original.
643 */ 643 */
707 707
708 if (op->type == PLAYER) 708 if (op->type == PLAYER)
709 esrv_del_item (op->contr, tmp->count); 709 esrv_del_item (op->contr, tmp->count);
710 710
711 tmp->destroy (); 711 tmp->destroy ();
712 fix_player (op); 712 op->update_stats ();
713 return; 713 return;
714 } 714 }
715 715
716/* If SAVE_INTERVAL is commented out, we never want to save 716/* If SAVE_INTERVAL is commented out, we never want to save
717 * the player here. 717 * the player here.
722 * of what he is dropping? 722 * of what he is dropping?
723 */ 723 */
724 if (op->type == PLAYER && !QUERY_FLAG (tmp, FLAG_UNPAID) && 724 if (op->type == PLAYER && !QUERY_FLAG (tmp, FLAG_UNPAID) &&
725 (tmp->nrof ? tmp->value * tmp->nrof : tmp->value > 2000) && (op->contr->last_save_time + SAVE_INTERVAL) <= time (NULL)) 725 (tmp->nrof ? tmp->value * tmp->nrof : tmp->value > 2000) && (op->contr->last_save_time + SAVE_INTERVAL) <= time (NULL))
726 { 726 {
727 save_player (op, 1); 727 op->contr->save ();
728 op->contr->last_save_time = time (NULL); 728 op->contr->last_save_time = time (NULL);
729 } 729 }
730#endif /* SAVE_INTERVAL */ 730#endif /* SAVE_INTERVAL */
731 731
732 if (op->type == PLAYER) 732 if (op->type == PLAYER)
733 esrv_del_item (op->contr, tmp->count); 733 esrv_del_item (op->contr, tmp->count);
734 734
735 /* Call this before we update the various windows/players. At least 735 /* Call this before we update the various windows/players. At least
736 * that we, we know the weight is correct. 736 * that we, we know the weight is correct.
737 */ 737 */
738 fix_player (op); /* This is overkill, fix_player() is called somewhere */ 738 op->update_stats (); /* This is overkill, fix_player() is called somewhere */
739 /* in object.c */ 739 /* in object.c */
740 740
741 if (op->type == PLAYER) 741 if (op->type == PLAYER)
742 { 742 {
743 /* Need to update the weight for the player */ 743 /* Need to update the weight for the player */
1561 new_draw_info (NDI_UNIQUE, 0, op, "items containing the word 'magic+1'."); 1561 new_draw_info (NDI_UNIQUE, 0, op, "items containing the word 'magic+1'.");
1562 return 1; 1562 return 1;
1563 } 1563 }
1564 op->contr->search_str[0] = '\0'; 1564 op->contr->search_str[0] = '\0';
1565 new_draw_info (NDI_UNIQUE, 0, op, "Search mode turned off."); 1565 new_draw_info (NDI_UNIQUE, 0, op, "Search mode turned off.");
1566 fix_player (op); 1566 op->update_stats ();
1567 return 1; 1567 return 1;
1568 } 1568 }
1569 if ((int) strlen (params) >= MAX_BUF) 1569 if ((int) strlen (params) >= MAX_BUF)
1570 { 1570 {
1571 new_draw_info (NDI_UNIQUE, 0, op, "Search string too long."); 1571 new_draw_info (NDI_UNIQUE, 0, op, "Search string too long.");
1572 return 1; 1572 return 1;
1573 } 1573 }
1574 strcpy (op->contr->search_str, params); 1574 strcpy (op->contr->search_str, params);
1575 sprintf (buf, "Searching for '%s'.", op->contr->search_str); 1575 sprintf (buf, "Searching for '%s'.", op->contr->search_str);
1576 new_draw_info (NDI_UNIQUE, 0, op, buf); 1576 new_draw_info (NDI_UNIQUE, 0, op, buf);
1577 fix_player (op); 1577 op->update_stats ();
1578 return 1; 1578 return 1;
1579} 1579}
1580 1580

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines