--- deliantra/server/include/treasure.h 2007/01/19 17:50:11 1.12 +++ deliantra/server/include/treasure.h 2007/04/17 18:24:30 1.14 @@ -81,7 +81,7 @@ struct treasure : zero_initialised { - struct archetype *item; /* Which item this link can be */ + struct archetype *item; /* Which item this link can be */ shstr name; /* If non null, name of list to use instead */ treasure *next; /* Next treasure-item in a linked list */ @@ -97,6 +97,10 @@ * required to go to the new list */ uint16 nrof; /* random 1 to nrof items are generated */ + + treasure () + : chance (100) + { } }; struct treasurelist : zero_initialised @@ -109,6 +113,10 @@ */ treasurelist *next; /* Next treasure-item in linked list */ treasure *items; /* Items in this list, linked */ + + static treasurelist *read (object_thawer &f); + static treasurelist *get (const char *name); // find or create + static treasurelist *find (const char *name); }; #endif