Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
void | dump_experience (void) |
void | free_experience (void) |
int | has_ability (const object *ob) |
void | init_experience (void) |
int64_t | new_exp (const object *ob) |
Variables | |
static const float | exp_att_mult [NROFATTACKS] |
static const float | exp_prot_mult [NROFATTACKS] |
int64_t * | levels |
Experience management. reading data from files and such.
Definition in file exp.cpp.
void dump_experience | ( | void | ) |
void free_experience | ( | void | ) |
Frees experience-related memory.
Definition at line 263 of file exp.cpp.
References FREE_AND_CLEAR, and levels.
Referenced by free_globals().
int has_ability | ( | const object * | ob | ) |
Checks whether object has innate abilities (spell/spellbook in inventory).
Definition at line 153 of file exp.cpp.
References guildjoin::ob, object_find_by_type(), SPELL, and SPELLBOOK.
Referenced by new_exp().
void init_experience | ( | void | ) |
This loads the experience table from the exp_table file. This tends to exit on any errors, since it populates the table as it goes along, so if there are errors, the table is likely in an inconsistent state.
Definition at line 167 of file exp.cpp.
References buf, Settings::confdir, fatal(), FMT64, levels, llevDebug, llevError, LOG(), MAX_BUF, Settings::max_level, SEE_LAST_ERROR, and settings.
Referenced by init_library(), and setup().
int64_t new_exp | ( | const object * | ob | ) |
Alternative way to calculate experience based on the ability of a monster.
It's far from perfect, and doesn't consider everything which can be considered, thus it's only used in debugging. this is only used with one of the dumpflags, and not anyplace in the code.
ob | object for which to return experience |
Definition at line 100 of file exp.cpp.
References exp_att_mult, exp_prot_mult, FABS, FALSE, FLAG_CAST_SPELL, FLAG_HITBACK, FLAG_NO_MAGIC, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_SEE_INVISIBLE, FLAG_SPLITTING, FLAG_STAND_STILL, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_SCROLL, has_ability(), MAX, MIN, NROFATTACKS, guildjoin::ob, and QUERY_FLAG.
Referenced by print_monsters().
|
static |
|
static |
int64_t* levels |
Number of levels for which we have experience.
Definition at line 26 of file exp.cpp.
Referenced by CREExperienceWindow::CREExperienceWindow(), dump_experience(), free_experience(), init_experience(), perceive_self(), send_exp_table(), and spellsTable().