Difference for server/skills.c from version 1.1 to 1.2


version 1.1 version 1.2
Line 1040
 
Line 1040
   
 int write_note(object *pl, object *item, char *msg) {  int write_note(object *pl, object *item, char *msg) {
   char buf[BOOK_BUF];     char buf[BOOK_BUF];
     object *newBook = NULL;
   
   /* a pair of sanity checks */    /* a pair of sanity checks */
   if(!item||item->type!=BOOK) return 0;    if(!item||item->type!=BOOK) return 0;
Line 1058
 
Line 1059
  }    }
  strcat(buf,msg);   strcat(buf,msg);
     strcat(buf,"\n"); /* new msg needs a LF */       strcat(buf,"\n"); /* new msg needs a LF */
       if(item->nrof > 1) {
         newBook = get_object();
         copy_object(item, newBook);
         decrease_ob(item);
         esrv_send_item(pl, item);
         newBook->nrof = 1;
         newBook->msg = add_string(buf);
         newBook = insert_ob_in_ob(newBook, pl);
         esrv_send_item(pl, newBook);
       } else {
  item->msg=add_string(buf);    item->msg=add_string(buf);
  new_draw_info_format(NDI_UNIQUE,0,pl,        esrv_send_item(pl, item);
     "You write in the %s.",query_short_name(item));      }
       new_draw_info_format(NDI_UNIQUE,0,pl, "You write in the %s.",query_short_name(item));
  return strlen(msg);   return strlen(msg);
   } else    } else
  new_draw_info_format(NDI_UNIQUE,0,pl,      new_draw_info_format(NDI_UNIQUE,0,pl, "Your message won't fit in the %s!",query_short_name(item));
  "Your message won't fit in the %s!",query_short_name(item));   
   return 0;    return 0;
 }  }
   
Line 1440
 
Line 1451
      * becomes the hitter.  As such, we need to make sure that has a proper       * becomes the hitter.  As such, we need to make sure that has a proper
      * owner value so exp goes to the right place.       * owner value so exp goes to the right place.
      */       */
     set_owner(throw_ob,op->inv);      /*    set_owner(throw_ob,op->inv);
      Set thrown object's owner to first object in player's inventory???
      Don't you mean to set player as owner of object in throw_ob's inv?  */
       set_owner(throw_ob->inv,op);
     throw_ob->direction=dir;      throw_ob->direction=dir;
     throw_ob->x = op->x;      throw_ob->x = op->x;
     throw_ob->y = op->y;      throw_ob->y = op->y;


Legend:
line(s) removed in v.1.1 
line(s) changed
 line(s) added in v.1.2

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