ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/treasure.C
(Generate patch)

Comparing deliantra/server/common/treasure.C (file contents):
Revision 1.43 by root, Mon Apr 16 11:09:30 2007 UTC vs.
Revision 1.46 by root, Tue Apr 17 10:06:32 2007 UTC

76 76
77 warn_archetypes = prev_warn; 77 warn_archetypes = prev_warn;
78} 78}
79 79
80/* 80/*
81 * Searches for the given treasurelist in the globally linked list 81 * Searches for the given treasurelist
82 * of treasurelists which has been built by load_treasures().
83 */ 82 */
84treasurelist * 83treasurelist *
85treasurelist::find (const char *name) 84treasurelist::find (const char *name)
86{ 85{
87 if (!name) 86 if (!name)
88 return 0; 87 return 0;
89 88
90 AUTODECL (i, tl_map.find (name)); 89 auto (i, tl_map.find (name));
91 90
92 if (i == tl_map.end ()) 91 if (i == tl_map.end ())
93 return 0; 92 return 0;
94 93
95 return i->second; 94 return i->second;
125 if (tl->items) 124 if (tl->items)
126 { 125 {
127 free_treasurestruct (tl->items); 126 free_treasurestruct (tl->items);
128 tl->items = 0; 127 tl->items = 0;
129 } 128 }
129
130 tl->total_chance = 0;
130} 131}
131 132
132/* 133/*
133 * Reads the lib/treasure file from disk, and parses the contents 134 * Reads the lib/treasure file from disk, and parses the contents
134 * into an internal treasure structure (very linked lists) 135 * into an internal treasure structure (very linked lists)
141 142
142 nroftreasures++; 143 nroftreasures++;
143 144
144 for (;;) 145 for (;;)
145 { 146 {
146 coroapi::cede_every (10); 147 coroapi::cede_to_tick_every (10);
147 148
148 f.next (); 149 f.next ();
149 150
150 switch (f.kw) 151 switch (f.kw)
151 { 152 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines