Difference for server/c_wiz.c from version 1.34 to 1.35


version 1.34 version 1.35
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_wiz_c =   * static char *rcsid_c_wiz_c =
  *   "$Id: c_wiz.c,v 1.34 2003/07/26 02:10:40 temitchell Exp $";   *   "$Id: c_wiz.c,v 1.35 2003/08/21 20:00:07 temitchell Exp $";
  */   */
   
 /*  /*
Line 42
 
Line 42
 #include <treasure.h>  #include <treasure.h>
 #include <skills.h>  #include <skills.h>
   
   /* Enough of the DM functions seem to need this that I broke
    * it out to a seperate function.  name is the person
    * being saught, rq is who is looking for them.  This
    * prints diagnostics messages, and returns the
    * other player, or NULL otherwise.
    */
   static player *get_other_player_from_name(object *op, char *name)
   {
       player *pl;
   
       if (!name) return NULL;
   
       for(pl=first_player;pl!=NULL;pl=pl->next)
    if(!strncmp(pl->ob->name, name, MAX_NAME))
        break;
   
       if(pl==NULL) {
    new_draw_info(NDI_UNIQUE, 0,op,"No such player.");
    return NULL;
       }
   
       if (pl->ob == op) {
    new_draw_info(NDI_UNIQUE, 0, op, "You can't do that to yourself.");
    return NULL;
       }
       if(pl->state != ST_PLAYING) {
    new_draw_info(NDI_UNIQUE, 0,op,"That player is in no state for that right now.");
    return NULL;
       }
       return pl;
   }
   
   
 int command_loadtest(object *op, char *params){  int command_loadtest(object *op, char *params){
  int x,y;   int x,y;
  char buf[1024];   char buf[1024];
Line 320
 
Line 353
       return 1;        return 1;
     }      }
   
   
 /* Enough of the DM functions seem to need this that I broke  
  * it out to a seperate function.  name is the person  
  * being saught, rq is who is looking for them.  This  
  * prints diagnostics messages, and returns the   
  * other player, or NULL otherwise.  
  */  
 static player *get_other_player_from_name(object *op, char *name)  
 {  
     player *pl;  
   
     if (!name) return NULL;  
   
     for(pl=first_player;pl!=NULL;pl=pl->next)   
  if(!strncmp(pl->ob->name, name, MAX_NAME))   
      break;  
   
     if(pl==NULL) {  
  new_draw_info(NDI_UNIQUE, 0,op,"No such player.");  
  return NULL;  
     }  
   
     if (pl->ob == op) {  
  new_draw_info(NDI_UNIQUE, 0, op, "You can't do that to yourself.");  
  return NULL;  
     }  
     if(pl->state != ST_PLAYING) {  
  new_draw_info(NDI_UNIQUE, 0,op,"That player is in no state for that right now.");  
  return NULL;  
     }  
     return pl;  
 }  
   
 int command_freeze(object *op, char *params)  int command_freeze(object *op, char *params)
 {  {
     int ticks;      int ticks;


Legend:
line(s) removed in v.1.34 
line(s) changed
 line(s) added in v.1.35

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