--- deliantra/server/include/treasure.h 2007/04/17 18:24:30 1.14 +++ deliantra/server/include/treasure.h 2007/04/24 00:42:02 1.16 @@ -44,16 +44,15 @@ /* * Flags to generate_treasures(): */ - enum { - GT_ENVIRONMENT = 0x0001, - GT_INVISIBLE = 0x0002, - GT_STARTEQUIP = 0x0004, - GT_APPLY = 0x0008, - GT_ONLY_GOOD = 0x0010, - GT_UPDATE_INV = 0x0020, - GT_MINIMAL = 0x0040 /* Do minimal adjustments */ + GT_ENVIRONMENT = 0x0001, // put treasure at objetc, not into object + GT_INVISIBLE = 0x0002, + GT_STARTEQUIP = 0x0004, + GT_APPLY = 0x0008, + GT_ONLY_GOOD = 0x0010, + GT_UPDATE_INV = 0x0020, + GT_MINIMAL = 0x0040, // Do minimal adjustments }; /* when a treasure got cloned from archlist, we want perhaps change some default @@ -78,7 +77,6 @@ * to get generated standard treasure when an archetype of that type * is generated (from a generator) */ - struct treasure : zero_initialised { struct archetype *item; /* Which item this link can be */ @@ -114,10 +112,14 @@ treasurelist *next; /* Next treasure-item in linked list */ treasure *items; /* Items in this list, linked */ + void create (object *op, int flag, int difficulty); + static treasurelist *read (object_thawer &f); static treasurelist *get (const char *name); // find or create static treasurelist *find (const char *name); }; +void create_treasure (treasurelist *t, object *op, int flag, int difficulty, int tries = 0); + #endif