1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_c_range_c = |
|
|
4 | * "$Id: c_range.C,v 1.6 2006/09/12 17:23:01 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
37 | #endif |
31 | #endif |
38 | #include <spells.h> |
32 | #include <spells.h> |
39 | #include <skills.h> |
33 | #include <skills.h> |
40 | #include <newclient.h> |
34 | #include <newclient.h> |
41 | #include <commands.h> |
35 | #include <commands.h> |
42 | |
|
|
43 | |
36 | |
44 | int |
37 | int |
45 | command_invoke (object *op, char *params) |
38 | command_invoke (object *op, char *params) |
46 | { |
39 | { |
47 | return command_cast_spell (op, params, 'i'); |
40 | return command_cast_spell (op, params, 'i'); |
… | |
… | |
207 | cast_spell (op, op, op->facing, spob, cp); |
200 | cast_spell (op, op, op->facing, spob, cp); |
208 | else |
201 | else |
209 | { |
202 | { |
210 | op->contr->ranges[range_magic] = spob; |
203 | op->contr->ranges[range_magic] = spob; |
211 | op->contr->shoottype = range_magic; |
204 | op->contr->shoottype = range_magic; |
212 | |
205 | assign (op->contr->spellparam, cp ? cp : ""); |
213 | if (cp != NULL) |
|
|
214 | { |
|
|
215 | strncpy (op->contr->spellparam, cp, MAX_BUF); |
|
|
216 | op->contr->spellparam[MAX_BUF - 1] = '\0'; |
|
|
217 | } |
|
|
218 | else |
|
|
219 | op->contr->spellparam[0] = '\0'; |
|
|
220 | |
|
|
221 | new_draw_info_format (NDI_UNIQUE, 0, op, "You ready the spell %s", &spob->name); |
206 | new_draw_info_format (NDI_UNIQUE, 0, op, "You ready the spell %s", &spob->name); |
222 | } |
207 | } |
223 | |
208 | |
224 | return 0; |
209 | return 0; |
225 | } /* else fall through to below and print spells */ |
210 | } /* else fall through to below and print spells */ |