Difference for server/c_wiz.c from version 1.46 to 1.47


version 1.46 version 1.47
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_wiz_c =   * static char *rcsid_c_wiz_c =
  *   "$Id: c_wiz.c,v 1.46 2004/06/01 06:32:06 mwedel Exp $";   *   "$Id: c_wiz.c,v 1.47 2004/06/11 06:12:57 mwedel Exp $";
  */   */
   
 /*  /*
Line 249
 
Line 249
       "%s is kicked out of the game.",op->name);        "%s is kicked out of the game.",op->name);
      strcpy(op->contr->killer,"left");       strcpy(op->contr->killer,"left");
      check_score(op); /* Always check score */       check_score(op); /* Always check score */
      if (!removed) {       /* not sure how the player would be freed, but did see
         * a crash here - if that is the case, don't save the
         * the player.
         */
        if (!removed && !QUERY_FLAG(op, FLAG_FREED)) {
  (void)save_player(op,0);   (void)save_player(op,0);
  op->map->players--;   op->map->players--;
      }       }
Line 778
 
Line 782
 }  }
   
 /* DM can possess a monster.  Basically, this tricks the client into thinking  /* DM can possess a monster.  Basically, this tricks the client into thinking
    a given monster, is actually the player it controls.  This allows a DM   * a given monster, is actually the player it controls.  This allows a DM
    to inhabit a monster's body, and run around the game with it. */   * to inhabit a monster's body, and run around the game with it.
    * This function is severely broken - it has tons of hardcoded values,
    */
   
 int command_possess (object *op, char *params)  int command_possess (object *op, char *params)
 {  {
     object *victim, *curinv, *nextinv, *tmp;      object *victim, *curinv, *nextinv;
     player *pl;      player *pl;
     archetype *at;  
     int i;      int i;
     char buf[MAX_BUF];      char buf[MAX_BUF];
   
Line 820
 
Line 825
     victim->type = PLAYER;      victim->type = PLAYER;
     SET_FLAG(victim, FLAG_WIZ);      SET_FLAG(victim, FLAG_WIZ);
   
     /* exp objects */      /* remove all the skill/exp granting code - that was broken.
     at = find_archetype("experience_agility");       */
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("experience_charisma");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("experience_mental");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("experience_physical");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("experience_power");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("experience_wis");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     /* need to add basic skills like melee, bows, set chosen skill */  
     at = find_archetype("skill_punching");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("skill_melee_weapon");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("skill_missile_weapon");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("skill_use_magic_item");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("skill_spellcasting");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     at = find_archetype("skill_praying");  
     tmp = get_object();  
     copy_object(&at->clone, tmp);  
     tmp = insert_ob_in_ob(tmp, victim);  
     /* send the inventory to the client */      /* send the inventory to the client */
     curinv = victim->inv;      curinv = victim->inv;
     while (curinv != NULL) {      while (curinv != NULL) {
Line 878
 
Line 836
  curinv = nextinv;   curinv = nextinv;
     }      }
     /* basic patchup */      /* basic patchup */
       /* The use of hard coded values is terrible.  Note
        * that really, to be fair, this shouldn't get changed at
        * all - if you are possessing a kobold, you should have the
        * same limitations.  As it is, as more body locations are added,
        * this will give this player more locations than perhaps
        * they should be allowed.
        */
     for (i=0; i<NUM_BODY_LOCATIONS; i++)      for (i=0; i<NUM_BODY_LOCATIONS; i++)
  if (i == 1 || i == 6 || i == 8 || i == 9)   if (i == 1 || i == 6 || i == 8 || i == 9)
      victim->body_info[i] = 2;       victim->body_info[i] = 2;


Legend:
line(s) removed in v.1.46 
line(s) changed
 line(s) added in v.1.47

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