--- deliantra/server/server/spell_attack.C 2006/12/13 00:42:04 1.18 +++ deliantra/server/server/spell_attack.C 2006/12/13 03:28:42 1.19 @@ -310,7 +310,7 @@ if (QUERY_FLAG (tmp, FLAG_IS_TURNABLE)) SET_ANIMATION (tmp, dir); - set_owner (tmp, op); + tmp->set_owner (op); set_spell_skill (op, caster, spob, tmp); tmp->x = op->x + DIRX (tmp); @@ -457,10 +457,10 @@ /* other_arch contains what this explodes into */ tmp = arch_to_object (op->other_arch); - copy_owner (tmp, op); + tmp->set_owner (op); tmp->skill = op->skill; - owner = get_owner (op); + owner = op->owner; if ((tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER) && owner && !tailor_god_spell (tmp, owner)) { @@ -673,7 +673,7 @@ if (QUERY_FLAG (tmp, FLAG_IS_TURNABLE)) SET_ANIMATION (tmp, dir); - set_owner (tmp, op); + tmp->set_owner (op); set_spell_skill (op, caster, spob, tmp); tmp->x = op->x + freearr_x[dir]; @@ -726,7 +726,7 @@ new_ob->x = op->x; new_ob->y = op->y; new_ob->level = op->level; - set_owner (new_ob, op->owner); + new_ob->set_owner (op->owner); /* preserve skill ownership */ if (op->skill && op->skill != new_ob->skill) @@ -765,7 +765,7 @@ * when their cone dies when they die. */ /* If no owner left, the spell dies out. */ - if (get_owner (op) == NULL) + if (op->owner == NULL) { op->destroy (); return; @@ -900,7 +900,7 @@ success = 1; tmp = arch_to_object (spell->other_arch); - set_owner (tmp, op); + tmp->set_owner (op); set_spell_skill (op, caster, spell, tmp); tmp->level = caster_level (caster, spell); tmp->x = sx; @@ -1032,7 +1032,7 @@ tmp->stats.dam = op->stats.dam; tmp->duration = op->duration; tmp->attacktype = op->attacktype; - copy_owner (tmp, op); + tmp->set_owner (op); if (op->skill && op->skill != tmp->skill) { tmp->skill = op->skill; @@ -1072,7 +1072,7 @@ tmp->duration = spell->duration + SP_level_duration_adjust (caster, spell); tmp->attacktype = spell->attacktype; - set_owner (tmp, op); + tmp->set_owner (op); set_spell_skill (op, caster, spell, tmp); tmp->x = dx; tmp->y = dy; @@ -1226,7 +1226,7 @@ effect->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); } - set_owner (effect, op); + effect->set_owner (op); set_spell_skill (op, caster, spell, effect); /* ok, tell it where to be, and insert! */ @@ -1260,7 +1260,7 @@ return; } - owner = get_owner (op); + owner = op->owner; #if 0 /* It'd make things nastier if this wasn't here - spells cast by * monster that are then killed would continue to survive @@ -1300,7 +1300,7 @@ op->x = new_x; op->y = new_y; op->map = m; - i = spell_find_dir (op->map, op->x, op->y, get_owner (op)); + i = spell_find_dir (op->map, op->x, op->y, op->owner); if (i > 0 && i != op->direction) { op->direction = i; @@ -1692,7 +1692,7 @@ Typical use case is charm, go somwhere, use aggravation to make hostile. This could lead to fun stuff like mice outbreak in bigworld and server crawl. */ CLEAR_FLAG (head, FLAG_GENERATOR); - set_owner (head, op); + head->set_owner (op); set_spell_skill (op, caster, spell, head); add_friendly_object (head); head->attack_movement = PETMOVE; @@ -1730,7 +1730,7 @@ object *owner; maptile *m; - owner = get_owner (op); + owner = op->owner; /* the following logic makes sure that the ball doesn't move into a wall, * and makes sure that it will move along a wall to try and get at it's @@ -1819,7 +1819,7 @@ /* restore to the center location and damage */ op->stats.dam = dam_save; - i = spell_find_dir (op->map, op->x, op->y, get_owner (op)); + i = spell_find_dir (op->map, op->x, op->y, op->owner); if (i >= 0) { /* we have a preferred direction! */ @@ -1855,7 +1855,7 @@ int basedir; object *owner; - owner = get_owner (op); + owner = op->owner; if (op->duration == 0 || owner == NULL) { op->destroy (); @@ -1970,7 +1970,7 @@ tmp = get_archetype (SWARM_SPELL); tmp->x = op->x; tmp->y = op->y; - set_owner (tmp, op); /* needed so that if swarm elements kill, caster gets xp. */ + tmp->set_owner (op); /* needed so that if swarm elements kill, caster gets xp. */ set_spell_skill (op, caster, spell, tmp); tmp->level = caster_level (caster, spell); /*needed later, to get level dep. right. */ @@ -2124,7 +2124,7 @@ { /* found a victim */ object *disease = arch_to_object (spell->other_arch); - set_owner (disease, op); + disease->set_owner (op); set_spell_skill (op, caster, spell, disease); disease->stats.exp = 0; disease->level = caster_level (caster, spell);