#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "emlen.h"

void 
place_pets (CHAR_DATA * ch)
{
  int k;
  MOB_PROTOTYPE *mid;
  CHAR_DATA *mob;
  if (IS_MOB (ch))
    return;
  for (k = 0; k < 20; k++)
    {
      if (ch->pcdata->pet_temp[k] != 0)
	{
	  char buf[1000];
	  if ((mid = get_mob_index (ch->pcdata->pet_temp[k])) == NULL)
	    {
	      ch->pcdata->pet_temp[k] = 0;
	      continue;
	    }
	  mob = create_mobile (mid);
	  char_to_room (mob, ch->in_room);
	  ch->pcdata->number_pets++;
	  mob->hit = ch->pcdata->pet_hps[k];
	  mob->move = ch->pcdata->pet_move[k];
	  SET_BIT (mob->affected_by, AFF_CHARM);
	  SET_BIT (mob->act, ACT_PET);
	  add_follower (mob, ch);
	}
    }
  return;
}