ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/spell_attack.C
(Generate patch)

Comparing deliantra/server/server/spell_attack.C (file contents):
Revision 1.83 by root, Mon Mar 2 11:45:19 2009 UTC vs.
Revision 1.84 by root, Tue Sep 1 20:56:05 2009 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
947 947
948 object *env = op->outer_env (); 948 object *env = op->outer_env ();
949 949
950 if (op->env) 950 if (op->env)
951 { 951 {
952 if (env->map == NULL) 952 if (!env->map)
953 return; 953 return;
954 954
955 if (!(op = op->insert_at (env, op))) 955 if (!(op = op->insert_at (env, op)))
956 return; 956 return;
957 } 957 }
958 958
959 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding 959 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding
960 // on a safe map. I don't like this special casing, but it seems to be neccessary 960 // on a safe map. I don't like this special casing, but it seems to be neccessary
961 // as bombs can be carried. 961 // as bombs can be carried.
962 if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE) 962 if (op->ms ().flags () & P_SAFE)
963 { 963 {
964 op->destroy (); 964 op->destroy ();
965 return; 965 return;
966 } 966 }
967 967
1908 1908
1909 tmp->stats.food = spell->duration + SP_level_duration_adjust (caster, spell); 1909 tmp->stats.food = spell->duration + SP_level_duration_adjust (caster, spell);
1910 1910
1911 if (tmp->glow_radius) 1911 if (tmp->glow_radius)
1912 tmp->set_glow_radius ( 1912 tmp->set_glow_radius (
1913 min (MAX_LIGHT_RADIUS, spell->range + SP_level_range_adjust (caster, spell))); 1913 min (MAX_LIGHT_RADIUS, spell->range + SP_level_range_adjust (caster, spell))
1914 );
1914 1915
1915 if (dir) 1916 if (dir)
1916 m->insert (tmp, x, y, op); 1917 m->insert (tmp, x, y, op);
1917 else 1918 else
1918 caster->outer_env ()->insert (tmp); 1919 caster->outer_env ()->insert (tmp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines