server/c_range.c File Reference
#include <global.h>
#include <sproto.h>
#include <newclient.h>
Go to the source code of this file.
Detailed Description
Range related commands (casting, shooting, throwing, etc.).
Definition in file c_range.c.
Function Documentation
| int command_cast_spell |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
Casts the specified spell.
- Parameters:
-
| op | Caster. |
| params | Spell name. |
- Returns:
- 1 on success, 0 otherwise.
Definition at line 101 of file c_range.c.
| static int find_spell_byname |
( |
object * |
op, |
|
|
char * |
params, |
|
|
int |
options | |
|
) |
| | [static] |
Finds spell by name.
- Parameters:
-
| op | The caster. |
| params | Spell name. |
| options | Specifies if the search is done with the length of the input spell name, or the length of the stored spell name. This allows you to find out if the spell name entered had extra optional parameters at the end (ie: marking rune <text>) |
- Returns:
- The index value of the spell in the spells array for a match, -1 if there is no match, -2 if there are multiple matches.
Definition at line 44 of file c_range.c.
| int fire_cast_spell |
( |
object * |
op, |
|
|
char * |
params | |
|
) |
| | |
| int legal_range |
( |
object * |
op, |
|
|
int |
r | |
|
) |
| | |
Check for the validity of a player range.
- Parameters:
-
| op | Player to check. |
| r | Range to check. |
- Return values:
-
| 1 | Range specified is legal - that is, the character has an item that is equipped for that range type. |
| 0 | No item of that range type that is usable. |
Definition at line 291 of file c_range.c.