![]() |
Crossfire Server, Trunk
1.75.0
|
#include "global.h"#include "compat.h"#include "string.h"#include "malloc.h"#include <map>#include "sproto.h"#include "assets.h"#include "AssetsManager.h"#include "Archetypes.h"
Include dependency graph for races.cpp:Go to the source code of this file.
Functions | |
| void | dump_races (void) |
| Dumps all race information to stderr. More... | |
| void | finish_races () |
| void | free_races (void) |
| Frees all race-related information. More... | |
| void | load_races (BufferReader *reader, const char *) |
| Reads the races file in the lib/ directory, then overwrites old 'race' entries. More... | |
| object * | races_get_random_monster (const char *race, int level) |
| Get a random monster of specified race and level at most the specified one. More... | |
Variables | |
| std::map< std::string, std::vector< std::string > > | addToRace |
| std::map< std::string, std::vector< object * > > | races |
| void dump_races | ( | void | ) |
Dumps all race information to stderr.
Definition at line 81 of file races.cpp.
References races.
Referenced by init_beforeplay().
Here is the caller graph for this function:| void finish_races | ( | ) |
Definition at line 98 of file races.cpp.
References addToRace, AssetsManager::archetypes(), AssetsCollection< T, Key >::find(), FLAG_MONSTER, getManager(), llevError, LOG(), name, QUERY_FLAG, and races.
Referenced by init_beforeplay().
Here is the call graph for this function:
Here is the caller graph for this function:| void free_races | ( | void | ) |
| void load_races | ( | BufferReader * | reader, |
| const char * | |||
| ) |
Reads the races file in the lib/ directory, then overwrites old 'race' entries.
This routine allow us to quickly re-configure the 'alignment' of monsters, objects. Useful for putting together lists of creatures, etc that belong to gods.
Definition at line 47 of file races.cpp.
References addToRace, buf, bufferreader_next_line(), llevDebug, LOG(), MAX_BUF, and variable.
Referenced by add_server_collect_hooks().
Here is the call graph for this function:
Here is the caller graph for this function:| object* races_get_random_monster | ( | const char * | race, |
| int | level | ||
| ) |
Get a random monster of specified race and level at most the specified one.
| race | race, must not be NULL. If invalid, then logs as an error. |
| level | maximum number, included. |
Definition at line 22 of file races.cpp.
References it, level, llevError, LOG(), races, and rndm().
Referenced by choose_cult_monster().
Here is the call graph for this function:
Here is the caller graph for this function:| std::map<std::string, std::vector<std::string> > addToRace |
Definition at line 13 of file races.cpp.
Referenced by finish_races(), and load_races().
| std::map<std::string, std::vector<object *> > races |
Definition at line 14 of file races.cpp.
Referenced by dump_races(), finish_races(), free_races(), and races_get_random_monster().