Difference for server/apply.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.5 1999/08/06 21:04:58 cvs Exp $";   *   "$Id: apply.c,v 1.6 1999/08/18 20:43:54 damn Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 163
 
Line 163
       return 1;        return 1;
     }      }
     /* only players get this */      /* only players get this */
     if(op->type==PLAYER&&tmp->attacktype&AT_GODPOWER) {      if(op->type==PLAYER&&tmp->attacktype&AT_GODPOWER) {    /* improvement potion */
  int i;   int i;
   
  for(i=1;i<MIN(11,op->level);i++) {   for(i=1;i<MIN(11,op->level);i++) {
Line 737
 
Line 737
  return 0; /* This might change */   return 0; /* This might change */
   
     if (sack==NULL || sack->type != CONTAINER) {      if (sack==NULL || sack->type != CONTAINER) {
  LOG (llevError, "apply_container: %s is not container!\n",sack->name);   LOG (llevError, "apply_container: %s is not container!\n",sack?sack->name:"NULL");
  return 0;   return 0;
     }      }
     op->contr->last_used = NULL;      op->contr->last_used = NULL;
Line 811
 
Line 811
  }   }
     } else { /* not applied */      } else { /* not applied */
  if (sack->slaying) { /* it's locked */   if (sack->slaying) { /* it's locked */
      for (tmp=op->inv; tmp; tmp=tmp->below)     tmp = FindKey(sack, op->inv);
  if (tmp->type == SPECIAL_KEY &&   
      tmp->slaying == sack->slaying)  
      break;  
      if (tmp) {       if (tmp) {
  sprintf (buf, "You unlock %s with ", query_name(sack));       sprintf (buf, "You unlock %s with %s.", query_name(sack), query_name(tmp));
  strcat (buf, query_name(tmp));  
  strcat (buf, ".");  
  SET_FLAG (sack, FLAG_APPLIED);   SET_FLAG (sack, FLAG_APPLIED);
  if (sack->env == NULL) { /* if it's on ground,open it also */   if (sack->env == NULL) { /* if it's on ground,open it also */
      new_draw_info (NDI_UNIQUE,0,op, buf);       new_draw_info (NDI_UNIQUE,0,op, buf);
Line 858
 
Line 853
   
 int esrv_apply_container (object *op, object *sack)  int esrv_apply_container (object *op, object *sack)
 {  {
     char buf[MAX_BUF];  
     object *tmp=op->container;      object *tmp=op->container;
   
     if(op->type!=PLAYER)      if(op->type!=PLAYER)
  return 0; /* This might change */   return 0; /* This might change */
   
     if (sack==NULL || sack->type != CONTAINER) {      if (sack==NULL || sack->type != CONTAINER) {
  LOG (llevError, "esrv_apply_container: %s is not container!\n",sack->name);   LOG (llevError, "esrv_apply_container: %s is not container!\n",sack?sack->name:"NULL");
  return 0;   return 0;
     }      }
   
Line 893
 
Line 887
      */       */
   
     if (sack->slaying) { /* it's locked */      if (sack->slaying) { /* it's locked */
  for (tmp=op->inv; tmp; tmp=tmp->below)        tmp=FindKey(sack, op->inv);
      if (tmp->type == SPECIAL_KEY &&   
  tmp->slaying == sack->slaying)  
  break;  
   
  if (tmp) {   if (tmp) {
      sprintf (buf, "You unlock %s with ", query_name(sack));   new_draw_info_format(NDI_UNIQUE, 0, op, "You unlock %s with %s.", query_name(sack), query_name(tmp));
      strcat (buf, query_name(tmp));  
      strcat (buf, ".");  
      new_draw_info(NDI_UNIQUE, 0, op, buf);  
  } else {   } else {
      new_draw_info_format(NDI_UNIQUE, 0, op,  "You don't have the key to unlock %s.",       new_draw_info_format(NDI_UNIQUE, 0, op,  "You don't have the key to unlock %s.",
  query_name(sack));   query_name(sack));


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

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