Difference for server/alchemy.c from version 1.18 to 1.19


version 1.18 version 1.19
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_alchemy_c =   * static char *rcsid_alchemy_c =
  *   "$Id: alchemy.c,v 1.18 2003/02/06 08:08:50 garbled Exp $";   *   "$Id: alchemy.c,v 1.19 2003/02/07 06:57:17 garbled Exp $";
  */   */
   
 /*  /*
Line 201
 
Line 201
   char name[MAX_BUF];    char name[MAX_BUF];
   object *tmp=op->inv;    object *tmp=op->inv;
   int tval=0, formula=0;    int tval=0, formula=0;
   materialtype_t *mt;  
   
     while(tmp) {      while(tmp) {
  tval=0;   tval=0;
         strcpy(name, tmp->name);          strcpy(name, tmp->name);
         if (tmp->title)          if (tmp->title)
      sprintf(name, "%s %s", tmp->name, tmp->title);       sprintf(name, "%s %s", tmp->name, tmp->title);
  /* strip the materialname out of the name, so alchemy works */  
  if (tmp->materialname && tmp->arch->clone.materialname == NULL &&  
      (IS_ARMOR(tmp) || IS_WEAPON(tmp))) {  
      mt = name_to_material(tmp->materialname);  
      if (mt && !strncmp(mt->description, tmp->name, strlen(mt->description)))  
  tval = ((strtoint(name) - strtoint(mt->description) -  
  strtoint(" ")) * (tmp->nrof?tmp->nrof:1));  
      else  
  tval = (strtoint(name) * (tmp->nrof?tmp->nrof:1));  
  } else  
      tval = (strtoint(name) * (tmp->nrof?tmp->nrof:1));       tval = (strtoint(name) * (tmp->nrof?tmp->nrof:1));
 #ifdef ALCHEMY_DEBUG  #ifdef ALCHEMY_DEBUG
         LOG(llevDebug,"Got ingredient %d %s(%d)\n", tmp->nrof?tmp->nrof:1,          LOG(llevDebug,"Got ingredient %d %s(%d)\n", tmp->nrof?tmp->nrof:1,


Legend:
line(s) removed in v.1.18 
line(s) changed
 line(s) added in v.1.19

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