--- deliantra/server/server/spell_attack.C 2006/08/29 08:01:38 1.6 +++ deliantra/server/server/spell_attack.C 2006/09/03 00:18:42 1.7 @@ -1,6 +1,6 @@ /* * static char *rcsid_spell_attack_c = - * "$Id: spell_attack.C,v 1.6 2006/08/29 08:01:38 root Exp $"; + * "$Id: spell_attack.C,v 1.7 2006/09/03 00:18:42 root Exp $"; */ @@ -284,7 +284,7 @@ /* peterm: level dependency for bolts */ tmp->stats.dam = spob->stats.dam + SP_level_dam_adjust(caster,spob); tmp->attacktype = spob->attacktype; - if (spob->slaying) tmp->slaying = add_refcount(spob->slaying); + if (spob->slaying) tmp->slaying = spob->slaying; tmp->range = spob->range + SP_level_range_adjust(caster,spob); tmp->duration = spob->duration + SP_level_duration_adjust(caster,spob); tmp->stats.Dex = spob->stats.Dex; @@ -427,8 +427,7 @@ tmp = arch_to_object (op->other_arch); copy_owner (tmp, op); - if (tmp->skill) FREE_AND_CLEAR_STR(tmp->skill); - if (op->skill) tmp->skill = add_refcount(op->skill); + tmp->skill = op->skill; owner = get_owner(op); if ((tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER) && owner && @@ -616,7 +615,7 @@ /* peterm: level dependency for bolts */ tmp->stats.dam = spob->stats.dam + SP_level_dam_adjust(caster,spob); tmp->attacktype = spob->attacktype; - if (spob->slaying) tmp->slaying = add_refcount(spob->slaying); + if (spob->slaying) tmp->slaying = spob->slaying; tmp->range = 50; @@ -678,8 +677,7 @@ /* preserve skill ownership */ if(op->skill && op->skill != new_ob->skill) { - if (new_ob->skill) free_string(new_ob->skill); - new_ob->skill = add_refcount(op->skill); + new_ob->skill = op->skill; } insert_ob_in_map(new_ob,op->map,op,0); @@ -694,7 +692,7 @@ /* if no map then hit_map will crash so just ignore object */ if (! op->map) { LOG(llevError,"Tried to move_cone object %s without a map.\n", - op->name ? op->name : "unknown"); + op->name ? &op->name : "unknown"); op->speed = 0; update_ob_speed (op); return; @@ -877,12 +875,12 @@ if ( !(tmp->move_type & MOVE_FLY_LOW)) LOG (llevDebug, "cast_cone(): arch %s doesn't have flying 1\n", - spell->other_arch->name); + &spell->other_arch->name); if (!tmp->move_on && tmp->stats.dam) { LOG (llevDebug, "cast_cone(): arch %s doesn't have move_on set\n", - spell->other_arch->name); + &spell->other_arch->name); } insert_ob_in_map(tmp,m,op,0); @@ -958,8 +956,7 @@ tmp->attacktype = op->attacktype; copy_owner (tmp, op); if(op->skill && op->skill != tmp->skill) { - if (tmp->skill) free_string(tmp->skill); - tmp->skill = add_refcount(op->skill); + tmp->skill = op->skill; } if(QUERY_FLAG(tmp, FLAG_IS_TURNABLE)) SET_ANIMATION(tmp, i); @@ -1243,7 +1240,7 @@ if(!tmp->env||op!=tmp->env) { LOG(llevError,"make_object_glow() failed to insert glowing force in %s\n", - op->name); + &op->name); return 0; } return 1; @@ -1347,7 +1344,7 @@ else if (spell_ob->race && spell_ob->race == force->name) { new_draw_info_format(NDI_UNIQUE, 0, op, "You can not cast %s while %s is in effect", - spell_ob->name, force->name_pl); + &spell_ob->name, &force->name_pl); return 0; } } @@ -1356,13 +1353,12 @@ if(force==NULL) { force=get_archetype(FORCE_NAME); force->subtype = FORCE_CHANGE_ABILITY; - free_string(force->name); if (spell_ob->race) - force->name = add_refcount(spell_ob->race); + force->name = spell_ob->race; else - force->name = add_refcount(spell_ob->name); - free_string(force->name_pl); - force->name_pl = add_refcount(spell_ob->name); + force->name = spell_ob->name; + + force->name_pl = spell_ob->name; } else { int duration; @@ -1387,13 +1383,13 @@ if (spell_ob->last_grace) force->path_denied=god->path_denied; new_draw_info_format(NDI_UNIQUE, 0,tmp, - "You are a victim of %s's curse!",god->name); + "You are a victim of %s's curse!", &god->name); } else new_draw_info(NDI_UNIQUE, 0,op,"Your curse seems empty."); if(tmp!=op && op->type==PLAYER) - new_draw_info_format(NDI_UNIQUE, 0, op, "You curse %s!",tmp->name); + new_draw_info_format(NDI_UNIQUE, 0, op, "You curse %s!", &tmp->name); force->stats.ac = spell_ob->stats.ac; force->stats.wc = spell_ob->stats.wc; @@ -1965,7 +1961,7 @@ if(infect_object(walk,disease,1)) { object *flash; /* visual effect for inflicting disease */ - new_draw_info_format(NDI_UNIQUE, 0, op, "You inflict %s on %s!",disease->name,walk->name); + new_draw_info_format(NDI_UNIQUE, 0, op, "You inflict %s on %s!", &disease->name, &walk->name); free_object(disease); /* don't need this one anymore */ flash=get_archetype(ARCH_DETECT_MAGIC);