--- deliantra/server/include/object.h 2006/10/15 02:16:35 1.43 +++ deliantra/server/include/object.h 2006/11/17 19:40:54 1.44 @@ -83,6 +83,7 @@ */ typedef refptr object_ptr; +typedef refptr arch_ptr; // these are not being copied ACC_CLASS (object) @@ -211,8 +212,8 @@ /* Following are values used by any object */ treasurelist *ACC (RW, randomitems); /* Items to be generated */ - archetype *ACC (RW, arch); /* Pointer to archetype */ - archetype *ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */ + arch_ptr ACC (RW, arch); /* Pointer to archetype */ + arch_ptr ACC (RW, other_arch); /* Pointer used for various things - mostly used for what */ key_value *key_values; /* Fields not explictly known by the loader. */ /* this objects turns into or what this object creates */ uint32 flags[4]; /* various flags */ @@ -349,14 +350,17 @@ * by the object structure */ -ACC_CLASS(archetype) -struct archetype : zero_initialised +ACC_CLASS (archetype) +struct archetype : zero_initialised, refcounted { archetype (); ~archetype (); static archetype *find (const char *arch); + void hash_add (); // add to hastable + void hash_del (); // remove from hashtable + shstr ACC (RW, name); /* More definite name, like "generate_kobold" */ struct archetype *ACC (RW, next); /* Next archetype in a linked list */ struct archetype *ACC (RW, head); /* The main part of a linked object */ @@ -427,3 +431,4 @@ #define ARCH_SYMPTOM "symptom" #endif +