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

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.65 by root, Tue May 6 16:32:34 2008 UTC vs.
Revision 1.66 by root, Tue May 6 19:42:53 2008 UTC

895 895
896/** Move an object to a new location */ 896/** Move an object to a new location */
897void 897void
898esrv_move_object (object *pl, tag_t to, tag_t tag, long nrof) 898esrv_move_object (object *pl, tag_t to, tag_t tag, long nrof)
899{ 899{
900 object *op, *env;
901
902 op = esrv_get_ob_from_count (pl, tag); 900 object *op = esrv_get_ob_from_count (pl, tag);
903 if (!op) 901 if (!op)
904 { 902 {
905 LOG (llevDebug, "Player '%s' tried to move an unknown object (%ld)\n", &pl->name, tag); 903 LOG (llevDebug, "Player '%s' tried to move an unknown object (%ld)\n", &pl->name, tag);
906 return; 904 return;
907 } 905 }
916 */ 914 */
917 if (op->inv && QUERY_FLAG (op, FLAG_APPLIED)) 915 if (op->inv && QUERY_FLAG (op, FLAG_APPLIED))
918 { 916 {
919 int cnt = MAX_ITEM_PER_DROP; 917 int cnt = MAX_ITEM_PER_DROP;
920 918
921 for (object *current = op->inv; current; ) 919 for (object *current = op->inv; current && cnt--; )
922 { 920 {
923 object *next = current->below; 921 object *next = current->below;
924
925 drop_object (pl, current, 0); 922 drop_object (pl, current, 0);
926
927 if (--cnt <= 0) break;
928
929 current = next; 923 current = next;
930 } 924 }
931 925
932 if (cnt <= 0) 926 if (cnt <= 0)
933 op->failmsg ("Only dropped some items, can't drop that many items at once."); 927 op->failmsg ("Only dropped some items, can't drop that many items at once.");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines