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

Comparing deliantra/server/server/c_range.C (file contents):
Revision 1.29 by root, Thu Nov 8 19:43:26 2007 UTC vs.
Revision 1.35 by root, Mon May 12 18:27:08 2008 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 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,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
187 187
188 object *skill = find_skill_by_name (op, spob->skill); 188 object *skill = find_skill_by_name (op, spob->skill);
189 189
190 if (!skill) 190 if (!skill)
191 { 191 {
192 new_draw_info_format (NDI_UNIQUE, 0, op, "You need the skill %s to cast %s!", &spob->skill, &spob->name); 192 op->failmsg (format ("You need the skill %s to cast %s!", &spob->skill, &spob->name));
193 return 1; 193 return 1;
194 } 194 }
195
196 splay (spob);
195 197
196 if (castnow) 198 if (castnow)
197 cast_spell (op, op, op->facing, spob, cp); 199 cast_spell (op, op, op->facing, spob, cp);
198 else 200 else
199 { 201 {
202 if (op->contr->ranged_ob) LOG (llevError, "%s", op->contr->ranged_ob->debug_desc ());//D
203 if (op->contr->ranged_ob)
204 if (op->contr->ranged_ob->flag [FLAG_APPLIED])
205 apply_special (op, op->contr->ranged_ob, AP_UNAPPLY);
206 else
207 op->contr->ranged_ob = 0;
208
209 if (op->contr->ranged_ob) LOG (llevError, "%s", op->contr->ranged_ob->debug_desc ());//D
210
211 if (op->contr->ranged_ob)
212 op->failmsg (format ("You have to unapply the %s first to ready a spell.", &op->contr->ranged_ob->name));
213 else
214 {
200 op->change_weapon (op->contr->ranged_ob = spob); 215 op->change_weapon (op->contr->ranged_ob = spob);
201 216
202 assign (op->contr->spellparam, cp ? cp : ""); 217 assign (op->contr->spellparam, cp ? cp : "");
203 new_draw_info_format (NDI_UNIQUE, 0, op, "You ready the spell %s", &spob->name); 218 op->statusmsg (format ("You ready the spell %s", &spob->name));
219 }
204 } 220 }
205 221
206 return 0; 222 return 0;
207 } /* else fall through to below and print spells */ 223 } /* else fall through to below and print spells */
208 } /* params supplied */ 224 } /* params supplied */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines