--- deliantra/server/server/spell_effect.C 2006/12/26 20:04:09 1.27 +++ deliantra/server/server/spell_effect.C 2006/12/30 10:16:11 1.28 @@ -469,7 +469,7 @@ if ((get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_NO_CLERIC) && (!QUERY_FLAG (op, FLAG_WIZCAST))) new_draw_info (NDI_UNIQUE, 0, op, "You feel something fizzle inside you."); else - enter_exit (op, wor); + op->enter_exit (wor); wor->destroy (); } @@ -641,7 +641,6 @@ object *dummy, *force, *old_force, *tmp; archetype *perm_portal; char portal_name[1024], portal_message[1024]; - sint16 exitx, exity; maptile *exitmap; int op_level; @@ -721,17 +720,13 @@ */ while ((old_force = check_inv_recursive (op, dummy))) { - exitx = EXIT_X (old_force); - exity = EXIT_Y (old_force); - LOG (llevDebug, "Trying to kill a portal in %s (%d,%d)\n", &old_force->race, exitx, exity); - - if (!strncmp (old_force->race, settings.localdir, strlen (settings.localdir))) - exitmap = ready_map_name (old_force->race, MAP_PLAYER_UNIQUE); - else - exitmap = ready_map_name (old_force->race, 0); + exitmap = maptile::find_map (old_force->race, op->map); if (exitmap) { + int exitx = EXIT_X (old_force); + int exity = EXIT_Y (old_force); + tmp = present_arch (perm_portal, exitmap, exitx, exity); while (tmp) { @@ -746,7 +741,6 @@ } old_force->destroy (); - LOG (llevDebug, "\n"); } dummy->destroy (); @@ -762,13 +756,10 @@ */ /* Ensure exit map is loaded */ - if (!strncmp (force->name, settings.localdir, strlen (settings.localdir))) - exitmap = ready_map_name (force->name, MAP_PLAYER_UNIQUE); - else - exitmap = ready_map_name (force->name, 0); + exitmap = maptile::find_map (force->name, 0); /* If we were unable to load (ex. random map deleted), warn player */ - if (exitmap == NULL) + if (!exitmap) { new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Something strange happens.\nYou can't remember where to go!?"); force->destroy (); @@ -793,7 +784,6 @@ * dummy contain the portal and * force contain the track to kill it later */ - snprintf (portal_name, 1024, "%s's portal to %s", &op->name, &force->name); dummy = get_archetype (spell->slaying); /*The portal */ if (dummy == NULL) @@ -835,7 +825,7 @@ * the 'force' variable still contains the 'reminder' of * where this portal goes to. */ - snprintf (portal_name, 1024, "%s's portal to %s", &op->name, op->map->path); + snprintf (portal_name, 1024, "%s's portal to %s", &op->name, &op->map->path); dummy = get_archetype (spell->slaying); /*The portal */ if (dummy == NULL) { @@ -2479,7 +2469,8 @@ if (!op->map) return 0; /* shouldnt happen */ - success = change_map_light (op->map, spell->stats.dam); + success = op->map->change_map_light (spell->stats.dam); + if (!success) { if (spell->stats.dam < 0)