![]() |
Crossfire Server, Trunk
1.75.0
|
Go to the source code of this file.
Macros | |
#define | IS_COMBAT_SKILL(num) |
This macro is used in fix_object() to define if this is a sill that should be used to calculate wc's and the like. More... | |
#define | IS_GRACE_SKILL(num) (num == SK_PRAYING) |
Currently only one of these, but put the define here to make it easier to expand it in the future. More... | |
#define | IS_MANA_SKILL(num) |
Like IS_COMBAT_SKILL above, but instead this is used to determine how many mana points the player has. More... | |
#define | MAX_SKILLS 50 |
This is the maximum number of skills the game may handle. More... | |
#define | SK_EXP_ADD_SKILL 0 |
Give the player the skill. More... | |
#define | SK_EXP_NONE 2 |
Player gets nothing. More... | |
#define | SK_EXP_TOTAL 1 |
Give player exp to total, no skill. More... | |
#define | SK_SUBTRACT_SKILL_EXP 3 |
Used when removing exp. More... | |
#define | UNARMED_SKILLS_COUNT 6 |
#define | USING_SKILL(op, skill) ((op)->chosen_skill && (op)->chosen_skill->subtype == skill) |
True if op is using skill, false else. More... | |
Enumerations | |
enum | SK { SK_LOCKPICKING = 1, SK_HIDING = 2, SK_SMITHERY = 3, SK_BOWYER = 4, SK_JEWELER = 5, SK_ALCHEMY = 6, SK_STEALING = 7, SK_LITERACY = 8, SK_BARGAINING = 9, SK_JUMPING = 10, SK_DET_MAGIC = 11, SK_ORATORY = 12, SK_SINGING = 13, SK_DET_CURSE = 14, SK_FIND_TRAPS = 15, SK_MEDITATION = 16, SK_PUNCHING = 17, SK_FLAME_TOUCH = 18, SK_KARATE = 19, SK_CLIMBING = 20, SK_WOODSMAN = 21, SK_INSCRIPTION = 22, SK_ONE_HANDED_WEAPON = 23, SK_MISSILE_WEAPON = 24, SK_THROWING = 25, SK_USE_MAGIC_ITEM = 26, SK_DISARM_TRAPS = 27, SK_SET_TRAP = 28, SK_THAUMATURGY = 29, SK_PRAYING = 30, SK_CLAWING = 31, SK_LEVITATION = 32, SK_SUMMONING = 33, SK_PYROMANCY = 34, SK_EVOCATION = 35, SK_SORCERY = 36, SK_TWO_HANDED_WEAPON = 37, SK_WRAITH_FEED = 38, SK_HARVESTING = 39, SK_AIR_MAGIC = 40, SK_EARTH_MAGIC = 41, SK_WATER_MAGIC = 42, SK_FIRE_MAGIC = 43 } |
Functions | |
int | get_skill_client_code (const char *skill_name) |
Return the code of the skill for a client, the index in the skill_names array. More... | |
Variables | |
const Face * | skill_faces [MAX_SKILLS] |
Will contain the face numbers for the skills, initialized by init_skill(). More... | |
sstring | skill_messages [MAX_SKILLS] |
Will contain the message for the skills, initialized by init_skill(). More... | |
const char * | skill_names [MAX_SKILLS] |
Will contain a number-name mapping for skills, initialized by init_skills(). More... | |
uint8_t | unarmed_skills [UNARMED_SKILLS_COUNT] |
Table of unarmed attack skills. More... | |
Skill-related defines, including subtypes.
Definition in file skills.h.
#define IS_COMBAT_SKILL | ( | num | ) |
This macro is used in fix_object() to define if this is a sill that should be used to calculate wc's and the like.
#define IS_GRACE_SKILL | ( | num | ) | (num == SK_PRAYING) |
#define IS_MANA_SKILL | ( | num | ) |
Like IS_COMBAT_SKILL above, but instead this is used to determine how many mana points the player has.
#define MAX_SKILLS 50 |
enum SK |
Skill subtypes
This list is just a subtype <-> skill (code wise) in the server translation. In theory, the processing of the different skills could be done via strncmp This list doesn't really try to identify what the skills do. The order of this list has no special meaning. 0 is not used to denote improperly set objects.
int get_skill_client_code | ( | const char * | skill_name | ) |
Return the code of the skill for a client, the index in the skill_names array.
skill_name | skill name. |
Definition at line 114 of file skill_util.cpp.
References MAX_SKILLS, and skill_names.
Referenced by esrv_update_stats(), hiscore_check(), and hiscore_init().
const Face* skill_faces[MAX_SKILLS] |
Will contain the face numbers for the skills, initialized by init_skill().
Definition at line 61 of file skill_util.cpp.
Referenced by do_each_skill(), free_skill_index(), init_skills(), and send_skill_info().
sstring skill_messages[MAX_SKILLS] |
Will contain the message for the skills, initialized by init_skill().
Definition at line 67 of file skill_util.cpp.
Referenced by do_each_skill(), init_skills(), and send_skill_extra().
const char* skill_names[MAX_SKILLS] |
Will contain a number-name mapping for skills, initialized by init_skills().
Definition at line 57 of file skill_util.cpp.
Referenced by append_spell(), do_each_skill(), find_skill_by_name(), free_skill_index(), get_skill_client_code(), hiscore_init(), init_skills(), send_skill_extra(), and send_skill_info().
uint8_t unarmed_skills[UNARMED_SKILLS_COUNT] |
Table of unarmed attack skills.
Terminated by 0. This is also the list that we should try to use skills when automatically applying one for the player. Note it is hardcoded in the skill_util.c that dragons always want clawing if possible. This should probably be removed and made a player preferance instead.
Definition at line 31 of file skills.cpp.
Referenced by command_unarmed_skill(), do_skill_attack(), and find_best_player_hth_skill().