Difference for server/c_object.c from version 1.51 to 1.52


version 1.51 version 1.52
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_object_c =   * static char *rcsid_c_object_c =
  *   "$Id: c_object.c,v 1.51 2003/09/03 13:42:19 tchize Exp $";   *   "$Id: c_object.c,v 1.52 2003/09/13 05:02:08 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 116
 
Line 116
  */   */
   
 int command_build (object *pl, char *params) {  int command_build (object *pl, char *params) {
       return 0;
   #if 0
     object *marked, *facility, *tool, *newobj, *tmp;      object *marked, *facility, *tool, *newobj, *tmp;
     archetype *at;      archetype *at;
     int skillnr, obpow, number, bonus, mneed, nrof, magic, i, nummade, found;      int skillnr, obpow, number, bonus, mneed, nrof, magic, i, nummade, found;
Line 124
 
Line 126
     materialtype_t *mt;      materialtype_t *mt;
   
     /* NOTE THIS FUNCTION IS CURRENTLY DISABLED */      /* NOTE THIS FUNCTION IS CURRENTLY DISABLED */
     return 0;  
   
   /*    Given this is currently disabled, I'm not going to bother updating
    * it with the new skill system.  IT really needs to get the skill object
    * pointer in a better fashion than it is currently doing.
    */
     if (!params) {      if (!params) {
  new_draw_info(NDI_UNIQUE, 0, pl, "Usage:build [nr] [+magic] <object>");   new_draw_info(NDI_UNIQUE, 0, pl, "Usage:build [nr] [+magic] <object>");
  return 0;   return 0;
Line 186
 
Line 191
  return 0;   return 0;
     }      }
   
     if (!change_skill(pl, skillnr)) {      if (!change_skill(pl, skillnr, 0)) {
  new_draw_info(NDI_UNIQUE, 0, pl,   new_draw_info(NDI_UNIQUE, 0, pl,
      "You lack the needed skill to make that item.");       "You lack the needed skill to make that item.");
  return 0;   return 0;
Line 398
 
Line 403
     if (skills[skillnr].category != EXP_NONE)      if (skills[skillnr].category != EXP_NONE)
  add_exp(pl, obpow*nummade);   add_exp(pl, obpow*nummade);
     return 1;      return 1;
   #endif
 }  }
   
   
Line 411
 
Line 417
 }  }
   
 int command_rskill ( object *pl, char *params) {  int command_rskill ( object *pl, char *params) {
    int skillno;      object *skill;
   
    if (!params) {     if (!params) {
         new_draw_info(NDI_UNIQUE, 0, pl, "Usage: ready_skill <skill name>");          new_draw_info(NDI_UNIQUE, 0, pl, "Usage: ready_skill <skill name>");
         return 0;          return 0;
    }     }
    skillno=lookup_skill_by_name(params);      skill = find_skill_by_name(pl, params);
    if (skillno==-1) {  
  new_draw_info_format(NDI_UNIQUE, 0, pl, "Couldn't find the skill %s", params);      if (!skill) {
    new_draw_info_format(NDI_UNIQUE, 0, pl, "You have no knowledge of the skill %s", params);
  return 0;   return 0;
    }     }
    return change_skill(pl,skillno);      return change_skill(pl,skill, 0);
   }
   
   
   /* These functions (command_search, command_disarm) are really juse wrappers for
    * things like 'use_skill ...').  In fact, they should really be obsoleted
    * and replaced with those.
    */
   int command_search (object *op, char *params) {
       return command_uskill(op, skill_names[SK_FIND_TRAPS]);
   }
   
   int command_disarm (object *op, char *params) {
       return command_uskill(op, skill_names[SK_DISARM_TRAPS]);
   }
   
   
   /* A little special because we do want to pass the full params along
    * as it includes the object to throw.
    */ 
   int command_throw (object *op, char *params)
   {
       object *skop;
   
       skop = find_skill_by_name(op, skill_names[SK_THROWING]);
       if (skop) return do_skill(op, op, skop, op->facing,params);
       else {
    new_draw_info(NDI_UNIQUE, 0, op, "You have no knowledge of the skill throwing.");
       }
       return 0;
 }  }
   
   
 int command_apply (object *op, char *params)  int command_apply (object *op, char *params)
 {  {
   if (!params) {    if (!params) {
Line 1397
 
Line 1434
   
     switch(tmp->type) {      switch(tmp->type) {
  case SPELLBOOK:   case SPELLBOOK:
      if(QUERY_FLAG(tmp, FLAG_IDENTIFIED) && tmp->stats.sp >= 0 && tmp->stats.sp <= NROFREALSPELLS ) {       if(QUERY_FLAG(tmp, FLAG_IDENTIFIED) && tmp->inv ) {
  if(!strcmp(tmp->arch->name,"cleric_book"))   sprintf(buf,"%s is a %d level %s spell",
      sprintf(buf,"%s is a %d level prayer.",   tmp->inv->name, tmp->inv->level,
      spells[tmp->stats.sp].name,spells[tmp->stats.sp].level);   tmp->inv->skill);
  else  
      sprintf(buf,"%s is a %d level spell.",  
      spells[tmp->stats.sp].name,spells[tmp->stats.sp].level);  
      }       }
  break;   break;
   
Line 1786
 
Line 1820
     /* Now let's find the new name */      /* Now let's find the new name */
     if(!strncmp(params,"to ",3)) {      if(!strncmp(params,"to ",3)) {
       params+=3;        params+=3;
       while(' '==params) params++;        while(' '==*params) params++;
       if('<'!=*params) {        if('<'!=*params) {
         new_draw_info(NDI_UNIQUE,0,op,"Syntax error, expecting < at start of new name!");          new_draw_info(NDI_UNIQUE,0,op,"Syntax error, expecting < at start of new name!");
         return 1;          return 1;


Legend:
line(s) removed in v.1.51 
line(s) changed
 line(s) added in v.1.52

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