#define SKILL_RET bool #define DEFAULT_RETURN false typedef SKILL_RET SKILL_FUN (CHAR_DATA *, const char *); #define DECLARE_SKILL_FUN( fun ) SKILL_FUN (fun) struct skill_code_type { char *name; SKILL_FUN *cast_code; SKILL_FUN *pulse_code; SKILL_FUN *upkeep_code; SKILL_FUN *expire_code; }; extern const struct skill_code_type skill_code_table[]; class Skill { public: Skill (void); Skill (const Skill &); //copy constructor <I had to write this, grumble> Skill &operator = (const Skill &); //assignment operator bool operator< (const Skill &) const; //for STL sort string name; string pulse_self; string off_self; string off_room; string upkeep_self; int magic_type; int magic_level; int target; int skill_flags; int base_cost[MAX_MAGIC_TYPE]; int upkeep_cost[MAX_MAGIC_TYPE]; int lag; int hours; int upkeep; bool valid; //for adding new skills int gsn; //internal skill number SKILL_FUN *cast_code; SKILL_FUN *pulse_code; SKILL_FUN *upkeep_code; SKILL_FUN *expire_code; bool assign_code(const int); bool validate(void); friend ofstream &operator<< ( ofstream &ofs, const Skill &); friend ifstream &operator>> ( ifstream &ifs, Skill &); private: }; int load_skills (void); int save_skills (void); int save_include_files(const int); int find_skill (const char *); extern vector<Skill> SkillTable; //extern Skill SkillTable[MAX_SKILL]; /*Anything below this line will be automatically appended by code*/ //JH depreciated 6/26/2004 3:01PM