--- deliantra/server/server/spell_attack.C 2010/04/11 00:34:06 1.102 +++ deliantra/server/server/spell_attack.C 2012/01/03 11:25:37 1.108 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002-2003 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen * @@ -824,7 +824,7 @@ if (op->type == PLAYER && op->flag [FLAG_UNDEAD] && op->attacktype & AT_TURN_UNDEAD) { - new_draw_info (NDI_UNIQUE, 0, op, "Your undead nature prevents you from turning undead!"); + op->failmsg ("Your undead nature prevents you from turning undead!"); return 0; } @@ -1027,7 +1027,7 @@ { if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) { - new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); + op->failmsg ("There is something in the way."); return 0; } } @@ -1131,7 +1131,7 @@ || (god && target->title == god->name) || (god && target->race.contains (god->race))) { - new_draw_info (NDI_UNIQUE, 0, op, "Your request is unheeded."); + op->failmsg ("Your request is unheeded."); return 0; } @@ -1149,7 +1149,7 @@ new_draw_info_format (NDI_UNIQUE, 0, op, "%s answers your call!", (const char *)determine_god (op)); else { - new_draw_info (NDI_UNIQUE, 0, op, "Your request is ignored."); + op->failmsg ("Your request is ignored."); return 0; } } @@ -1266,8 +1266,8 @@ if (op->path_denied & PATH_LIGHT) return 0; - object *tmp = get_archetype (FORCE_NAME); - tmp->speed = 0.01; + object *tmp = archetype::get (FORCE_NAME); + tmp->set_speed (0.01); tmp->stats.food = time; tmp->set_flag (FLAG_IS_USED_UP); tmp->set_glow_radius (min (MAX_LIGHT_RADIUS, radius)); @@ -1339,7 +1339,7 @@ tmp = get_pointed_target (op, (dir == 0) ? op->direction : dir, spell_ob->range, SPELL_GRACE); if (!tmp) { - new_draw_info (NDI_UNIQUE, 0, op, "There is no one in that direction to curse."); + op->failmsg ("There is no one in that direction to curse."); return 0; } @@ -1364,7 +1364,7 @@ if (!force) { - force = get_archetype (FORCE_NAME); + force = archetype::get (FORCE_NAME); force->subtype = FORCE_CHANGE_ABILITY; if (spell_ob->race) @@ -1392,8 +1392,8 @@ } force->duration = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob) * 50; - force->speed = 1.f; force->speed_left = -1.f; + force->set_speed (1.f); force->set_flag (FLAG_APPLIED); if (god) @@ -1874,7 +1874,7 @@ if (mflags & P_OUT_OF_MAP) { - new_draw_info (NDI_UNIQUE, 0, op, "Nothing is there."); + op->failmsg ("Nothing is there."); return 0; } @@ -1895,7 +1895,7 @@ /* no live target, perhaps a wall is in the way? */ if (OB_TYPE_MOVE_BLOCK (op, GET_MAP_MOVE_BLOCK (m, x, y))) { - new_draw_info (NDI_UNIQUE, 0, op, "Something is in the way."); + op->failmsg ("Something is in the way."); return 0; } } @@ -2010,7 +2010,7 @@ op->statusmsg (format ("You inflict %s on %s!", &disease->name, &walk->name)); disease->destroy (); /* don't need this one anymore */ - walk->map->insert (get_archetype (shstr_detect_magic), x, y, op); + walk->map->insert (archetype::get (shstr_detect_magic), x, y, op); return 1; }