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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.100 by root, Tue Sep 4 05:43:20 2007 UTC vs.
Revision 1.101 by root, Tue Sep 4 18:20:35 2007 UTC

28#include <global.h> 28#include <global.h>
29#include <loader.h> 29#include <loader.h>
30#include <sproto.h> 30#include <sproto.h>
31 31
32///////////////////////////////////////////////////////////////////////////// 32/////////////////////////////////////////////////////////////////////////////
33
34extern archetype *loading_arch;
33 35
34/* This table is only necessary to convert objects that existed before the 36/* This table is only necessary to convert objects that existed before the
35 * spell object conversion to the new object. It was not practical 37 * spell object conversion to the new object. It was not practical
36 * to go through every mapping looking for every potion, rod, wand, etc 38 * to go through every mapping looking for every potion, rod, wand, etc
37 * that had a sp set and update to the new value. So this maps the 39 * that had a sp set and update to the new value. So this maps the
249 "spell_cause_rabies", /* 204 */ 251 "spell_cause_rabies", /* 204 */
250 "spell_glyph", /* 205 */ 252 "spell_glyph", /* 205 */
251 NULL 253 NULL
252}; 254};
253 255
254extern bool loading_arch;
255
256/* This function checks the object after it has been loaded (when we 256/* This function checks the object after it has been loaded (when we
257 * get the 'end' in the input stream). This function can be used to 257 * get the 'end' in the input stream). This function can be used to
258 * deal with legacy objects where fields may have changed. It can also be used 258 * deal with legacy objects where fields may have changed. It can also be used
259 * to check for objects to make sure there are no common errors. 259 * to check for objects to make sure there are no common errors.
260 */ 260 */
394 /* Old spellcasting object - need to load in the appropiate object */ 394 /* Old spellcasting object - need to load in the appropiate object */
395 if ((type == ROD || type == WAND || type == SCROLL || type == HORN || type == FIREWALL || 395 if ((type == ROD || type == WAND || type == SCROLL || type == HORN || type == FIREWALL ||
396 /* POTIONS and ALTARS don't always cast spells, but if they do, update them */ 396 /* POTIONS and ALTARS don't always cast spells, but if they do, update them */
397 ((type == POTION || type == ALTAR) && stats.sp)) && !inv && !loading_arch) 397 ((type == POTION || type == ALTAR) && stats.sp)) && !inv && !loading_arch)
398 { 398 {
399 /* Fireall is bizarre in that spell type was stored in dam. Rest are 'normal' 399 /* Firewall is bizarre in that spell type was stored in dam. Rest are 'normal'
400 * in that spell was stored in sp. 400 * in that spell was stored in sp.
401 */ 401 */
402 object *tmp = get_archetype (spell_mapping[type == FIREWALL ? stats.dam : stats.sp]); 402 object *tmp = get_archetype (spell_mapping[type == FIREWALL ? stats.dam : stats.sp]);
403 insert_ob_in_ob (tmp, this); 403 insert_ob_in_ob (tmp, this);
404 randomitems = NULL; /* So another spell isn't created for this object */ 404 randomitems = NULL; /* So another spell isn't created for this object */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines