mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-05 08:58:49 +01:00
A few Bug-Fixes and Ideas
This commit is contained in:
parent
222be04ec5
commit
d4454288b1
9 changed files with 249 additions and 150 deletions
10
src/utils.c
10
src/utils.c
|
|
@ -21,6 +21,7 @@
|
|||
#include "spells.h"
|
||||
#include "handler.h"
|
||||
#include "interpreter.h"
|
||||
#include "class.h"
|
||||
|
||||
|
||||
/** Aportable random number function.
|
||||
|
|
@ -1471,3 +1472,12 @@ void new_affect(struct affected_type *af)
|
|||
for (i=0; i<AF_ARRAY_MAX; i++) af->bitvector[i]=0;
|
||||
}
|
||||
|
||||
/* Handy function to get class ID number by name (abbreviations allowed) */
|
||||
int get_class_by_name(char *classname)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<NUM_CLASSES; i++)
|
||||
if (is_abbrev(classname, pc_class_types[i])) return(i);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue