Difference for server/pets.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_pets_c =   * static char *rcsid_pets_c =
  *    "$Id: pets.c,v 1.44 2006/06/08 04:30:17 qal21 Exp $";   *    "$Id: pets.c,v 1.45 2006/08/12 11:31:54 gros Exp $";
  */   */
   
 /*  /*
Line 423
 
Line 423
  add_friendly_object(tmp);   add_friendly_object(tmp);
  SET_FLAG(tmp, FLAG_FRIENDLY);   SET_FLAG(tmp, FLAG_FRIENDLY);
  if(is_golem) CLEAR_FLAG(tmp, FLAG_MONSTER);   if(is_golem) CLEAR_FLAG(tmp, FLAG_MONSTER);
      } else {               } else if(QUERY_FLAG(op, FLAG_FRIENDLY)) {
  if(QUERY_FLAG(op, FLAG_FRIENDLY)) {  
      object *owner = get_owner(op);       object *owner = get_owner(op);
      if(owner != NULL) {/* For now, we transfer ownership */       if(owner != NULL) {/* For now, we transfer ownership */
  set_owner(tmp,owner);   set_owner(tmp,owner);
Line 433
 
Line 432
  SET_FLAG(tmp, FLAG_FRIENDLY);   SET_FLAG(tmp, FLAG_FRIENDLY);
      }       }
  }   }
      }  
      if(op->type!=PLAYER || !is_golem) {        if(op->type!=PLAYER || !is_golem) {
  tmp->attack_movement = PETMOVE;   tmp->attack_movement = PETMOVE;
  tmp->speed_left = -1;   tmp->speed_left = -1;
Line 441
 
Line 439
  tmp->enemy = op->enemy;    tmp->enemy = op->enemy;
      } else       } else
  tmp->type = GOLEM;   tmp->type = GOLEM;
          
  }   }
  if(head == NULL)   if(head == NULL)
      head = tmp;       head = tmp;
Line 455
 
Line 452
     }      }
     head->direction = dir;      head->direction = dir;
   
       if ((head->type != GOLEM)&&(op->type!= PLAYER)) {
           /* It isn't a golem, and the caster wasn't a player; that's probably
            * a monster generated from a trap, thus we should give it treasures
            * and equipment - gros, 12th August 2006
            */
           if (head && head->randomitems) {
               object *htmp;
               create_treasure(head->randomitems, head, GT_APPLY | GT_STARTEQUIP,
                   6, 0);
               for (htmp=head->inv; htmp; htmp=htmp->below)
                   if (!htmp->nrof) SET_FLAG(htmp, FLAG_NO_DROP);
           }
       }
   
     /* need to change some monster attr to prevent problems/crashing */      /* need to change some monster attr to prevent problems/crashing */
     head->last_heal=0;      head->last_heal=0;
     head->last_eat=0;      head->last_eat=0;


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

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