how do I tweak object without changing the proto type

From: Ronny Iversen (ronnyi@IFI.UIO.NO)
Date: 08/27/98


  struct obj_data *read_object(int nr, int type)
{
  struct obj_data *obj;
  int i,k,temp;
  send_to_all("Inside read proto object ");
  if (nr < 0) {
    log("SYSERR: trying to create obj with negative num!");
    return NULL;
  }
  if (type == VIRTUAL) {
    if ((i = real_object(nr)) < 0) {
      sprintf(buf, "Object (V) %d does not exist in database.", nr);
      log(buf);
      return NULL;
    }
  } else
    i = nr;

  CREATE(obj, struct obj_data, 1);
  clear_object(obj);

  *obj = obj_proto[i];
  obj->next = object_list;
  object_list = obj;
  obj_index[i].number++;

  return obj;
}

Can somone please help me with this code. If I understood it right it
creates a new object and returns a pointer to it.
What I would like was to also make it tweak/change some of the values of
the object read without changing
the original  values of the proto type..so someone please explain how this
stuff works, and what I need to change...

Nocturnal :)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST