--- deliantra/server/common/loader.C 2008/06/15 20:29:56 1.117 +++ deliantra/server/common/loader.C 2008/08/31 15:49:13 1.118 @@ -388,9 +388,18 @@ } /* Old spellcasting object - need to load in the appropiate object */ - if ((type == ROD || type == WAND || type == SCROLL || type == HORN || type == FIREWALL || + if ((type == ROD + || type == WAND + || type == SCROLL + || type == HORN + || type == FIREWALL /* POTIONS and ALTARS don't always cast spells, but if they do, update them */ - ((type == POTION || type == ALTAR) && stats.sp)) && !inv && !loading_arch) + || ((type == POTION || type == ALTAR) && stats.sp)) // watchout: sp = 0 is still magic bullet. + && !inv + && !loading_arch + && !randomitems) // by elmex: not _any_ rod or horn we find on a map, which has randomitems is an old spellcasting + // object. For instance lythanders pipe got it's spell in the treasurelist in the randomitems, + // same goes for normal rods. { /* Firewall is bizarre in that spell type was stored in dam. Rest are 'normal' * in that spell was stored in sp. @@ -398,7 +407,6 @@ LOG (llevError, "old spellcasting object found: %s", debug_desc ()); object *tmp = get_archetype (spell_mapping[type == FIREWALL ? stats.dam : stats.sp]); insert_ob_in_ob (tmp, this); - randomitems = NULL; /* So another spell isn't created for this object */ } /* spellbooks & runes use slaying. But not to arch name, but to spell name */