Difference for server/c_object.c from version 1.87 to 1.88


version 1.87 version 1.88
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_object_c =   * static char *rcsid_c_object_c =
  *   "$Id: c_object.c,v 1.87 2006/08/12 18:59:59 gros Exp $";   *   "$Id: c_object.c,v 1.88 2006/09/09 20:31:31 qal21 Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 917
 
Line 917
  *  nrof objects is tried to dropped.   *  nrof objects is tried to dropped.
  * This is used when dropping objects onto the floor.   * This is used when dropping objects onto the floor.
  */   */
 void drop_object (object *op, object *tmp, uint32 nrof)   object *drop_object (object *op, object *tmp, uint32 nrof)
 {  {
     char buf[MAX_BUF];      char buf[MAX_BUF];
     object *floor;      object *floor;
Line 927
 
Line 927
       /* Eneq(@csd.uu.se): Objects with NO_DROP defined can't be dropped. */        /* Eneq(@csd.uu.se): Objects with NO_DROP defined can't be dropped. */
       new_draw_info(NDI_UNIQUE, 0,op, "This item can't be dropped.");        new_draw_info(NDI_UNIQUE, 0,op, "This item can't be dropped.");
 #endif  #endif
       return;        return NULL;
     }      }
   
     if(QUERY_FLAG(tmp, FLAG_APPLIED)) {      if(QUERY_FLAG(tmp, FLAG_APPLIED)) {
       if (apply_special (op, tmp, AP_UNAPPLY | AP_NO_MERGE))        if (apply_special (op, tmp, AP_UNAPPLY | AP_NO_MERGE))
           return; /* can't unapply it */            return NULL; /* can't unapply it */
     }      }
   
     /* We are only dropping some of the items.  We split the current objec      /* We are only dropping some of the items.  We split the current objec
Line 944
 
Line 944
  tmp = get_split_ob (tmp, nrof);   tmp = get_split_ob (tmp, nrof);
  if(!tmp) {   if(!tmp) {
      new_draw_info(NDI_UNIQUE, 0,op, errmsg);       new_draw_info(NDI_UNIQUE, 0,op, errmsg);
      return;       return NULL;
  }   }
  /* Tell a client what happened rest of objects.  tmp2 is now the   /* Tell a client what happened rest of objects.  tmp2 is now the
  * original object   * original object
Line 961
 
Line 961
   
     /* Lauwenmark: Handle for plugin drop event */      /* Lauwenmark: Handle for plugin drop event */
     if (execute_event(tmp, EVENT_DROP,op,NULL,NULL,SCRIPT_FIX_ALL)!= 0)      if (execute_event(tmp, EVENT_DROP,op,NULL,NULL,SCRIPT_FIX_ALL)!= 0)
         return;          return NULL;
   
     if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) {      if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) {
       sprintf(buf,"You drop the %s.", query_name(tmp));        sprintf(buf,"You drop the %s.", query_name(tmp));
Line 971
 
Line 971
  esrv_del_item (op->contr, tmp->count);   esrv_del_item (op->contr, tmp->count);
       free_object(tmp);        free_object(tmp);
       fix_player(op);        fix_player(op);
       return;        return NULL;
     }      }
   
 /*  If SAVE_INTERVAL is commented out, we never want to save  /*  If SAVE_INTERVAL is commented out, we never want to save
Line 1024
 
Line 1024
  /* Need to update the weight for the player */   /* Need to update the weight for the player */
  esrv_send_item (op, op);   esrv_send_item (op, op);
     }      }
       return tmp;
 }  }
   
 void drop(object *op, object *tmp)  void drop(object *op, object *tmp)


Legend:
line(s) removed in v.1.87 
line(s) changed
 line(s) added in v.1.88

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:27