Difference for server/skill_util.c from version 1.26 to 1.27


version 1.26 version 1.27
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_skill_util_c =   * static char *rcsid_skill_util_c =
  *   "$Id: skill_util.c,v 1.26 2002/03/03 20:05:58 avogl Exp $";   *   "$Id: skill_util.c,v 1.27 2002/03/20 06:27:46 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
   
     Copryight (C) 2000 Mark Wedel      Copryight (C) 2002 Mark Wedel & Crossfire Development Team
     Copyright (C) 1992 Frank Tore Johansen      Copyright (C) 1992 Frank Tore Johansen
   
     This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
Line 22
 
Line 22
     along with this program; if not, write to the Free Software      along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   
     The author can be reached via e-mail to mwedel@scruz.net      The author can be reached via e-mail to crossfire-devel@real-time.com
 */  */
   
 /* Created July 95 to separate skill utilities from actual skills -b.t. */  /* Created July 95 to separate skill utilities from actual skills -b.t. */
Line 1218
 
Line 1218
  * return 0 on success, 1 on failure.   * return 0 on success, 1 on failure.
  */   */
   
 int change_skill_to_skill (object *who, object *skill)  int change_skill_to_skill (object *who, object *skl)
 {  {
     if (!skill) return 1;     /* Quick sanity check */      if (!skl) return 1;     /* Quick sanity check */
   
     if (who->chosen_skill == skill)      if (who->chosen_skill == skl)
     {      {
         /* optimization for changing skill to current skill */          /* optimization for changing skill to current skill */
         if (who->type == PLAYER)          if (who->type == PLAYER)
Line 1230
 
Line 1230
         return 0;          return 0;
     }      }
   
     if (skill->env != who) {      if (skl->env != who) {
  LOG(llevError,"change_skill_to_skill: skill is not in players inventory\n");   LOG(llevError,"change_skill_to_skill: skill is not in players inventory\n");
  return 1;   return 1;
     }      }
   
     if (apply_special (who, skill, AP_APPLY)) {      if (apply_special (who, skl, AP_APPLY)) {
  LOG (llevError, "BUG: change_skill(): can't apply new skill\n");   LOG (llevError, "BUG: change_skill(): can't apply new skill\n");
             return 1;              return 1;
     }      }
Line 1624
 
Line 1624
     if (tmp->type == SKILL && strcmp(tmp->name, skname)==0)      if (tmp->type == SKILL && strcmp(tmp->name, skname)==0)
       return tmp;        return tmp;
   }    }
     return NULL;
 }  }


Legend:
line(s) removed in v.1.26 
line(s) changed
 line(s) added in v.1.27

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