forked from kyonshi/grenzland-mud
clang-format file added, quest.c and .h formatted
This commit is contained in:
+31
-28
@@ -34,27 +34,30 @@
|
||||
/* AQ Flags (much room for expansion) ********************************* */
|
||||
#define AQ_REPEATABLE (1 << 0) /* Quest can be repeated */
|
||||
#define NUM_AQ_FLAGS 1
|
||||
|
||||
/* Main quest struct ************************************************** */
|
||||
struct aq_data {
|
||||
qst_vnum vnum; /* Virtual nr of the quest */
|
||||
char *name; /* For qlist and the sort */
|
||||
char *desc; /* Description of the quest */
|
||||
char *info; /* Message displayed when accepted */
|
||||
char *done; /* Message displayed when completed */
|
||||
char *quit; /* Message displayed when quit quest */
|
||||
long flags; /* Flags (repeatable, etc */
|
||||
int type; /* Quest type */
|
||||
mob_vnum qm; /* questmaster offering quest */
|
||||
int target; /* Target value */
|
||||
obj_vnum prereq; /* Object required to undertake quest */
|
||||
int value[7]; /* Quest values */
|
||||
int gold_reward; /* Number of gold coins given as reward */
|
||||
int exp_reward; /* Experience points given as a reward */
|
||||
obj_vnum obj_reward; /* vnum of object given as a reward */
|
||||
qst_vnum prev_quest; /* Link to prev quest, NOTHING is open */
|
||||
qst_vnum next_quest; /* Link to next quest, NOTHING is end */
|
||||
SPECIAL (*func); /* secondary spec_proc for the QM */
|
||||
struct aq_data
|
||||
{
|
||||
qst_vnum vnum; /* Virtual nr of the quest */
|
||||
char *name; /* For qlist and the sort */
|
||||
char *desc; /* Description of the quest */
|
||||
char *info; /* Message displayed when accepted */
|
||||
char *done; /* Message displayed when completed */
|
||||
char *quit; /* Message displayed when quit quest */
|
||||
bitvector_t flags; /* Flags (repeatable, etc */
|
||||
int type; /* Quest type */
|
||||
mob_vnum qm; /* questmaster offering quest */
|
||||
int target; /* Target value */
|
||||
obj_vnum prereq; /* Object required to undertake quest */
|
||||
int value[7]; /* Quest values */
|
||||
int gold_reward; /* Number of gold coins given as reward */
|
||||
int exp_reward; /* Experience points given as a reward */
|
||||
obj_vnum obj_reward; /* vnum of object given as a reward */
|
||||
qst_vnum prev_quest; /* Link to prev quest, NOTHING is open */
|
||||
qst_vnum next_quest; /* Link to next quest, NOTHING is end */
|
||||
SPECIAL(*func); /* secondary spec_proc for the QM */
|
||||
};
|
||||
|
||||
#define QST_NUM(i) (aquest_table[i].vnum)
|
||||
#define QST_NAME(i) (aquest_table[i].name)
|
||||
#define QST_DESC(i) (aquest_table[i].desc)
|
||||
@@ -85,17 +88,17 @@ struct aq_data {
|
||||
void destroy_quests(void);
|
||||
void assign_the_quests(void);
|
||||
void parse_quest(FILE *quest_f, int nr);
|
||||
int count_quests(qst_vnum low, qst_vnum high);
|
||||
int count_quests(qst_vnum low, qst_vnum high);
|
||||
void list_quests(struct char_data *ch, zone_rnum zone, qst_vnum vmin, qst_vnum vmax);
|
||||
void set_quest(struct char_data *ch, qst_rnum rnum);
|
||||
void clear_quest(struct char_data *ch);
|
||||
void set_quest(const struct char_data *ch, qst_rnum rnum);
|
||||
void clear_quest(const struct char_data *ch);
|
||||
void generic_complete_quest(struct char_data *ch);
|
||||
void autoquest_trigger_check(struct char_data *ch, struct char_data *vict, struct obj_data *object, int type);
|
||||
void autoquest_trigger_check(struct char_data *ch, const struct char_data *vict, const struct obj_data *object, int type);
|
||||
qst_rnum real_quest(qst_vnum vnum);
|
||||
int is_complete(struct char_data *ch, qst_vnum vnum);
|
||||
int is_complete(const struct char_data *ch, qst_vnum vnum);
|
||||
qst_vnum find_quest_by_qmnum(struct char_data *ch, mob_rnum qm, int num);
|
||||
void add_completed_quest(struct char_data *ch, qst_vnum vnum);
|
||||
void remove_completed_quest(struct char_data *ch, qst_vnum vnum);
|
||||
void add_completed_quest(const struct char_data *ch, qst_vnum vnum);
|
||||
void remove_completed_quest(const struct char_data *ch, qst_vnum vnum);
|
||||
void quest_timeout(struct char_data *ch);
|
||||
void check_timed_quests(void);
|
||||
SPECIAL(questmaster);
|
||||
@@ -141,7 +144,7 @@ int save_quests(zone_rnum zone_num);
|
||||
/* ******************************************************************** */
|
||||
|
||||
/* AQ Global Variables ************************************************ */
|
||||
extern const char *aq_flags[]; /* names for quest flags (quest.c) */
|
||||
extern const char *quest_types[]; /* named for quest types (quest.c) */
|
||||
extern const char *aq_flags[]; /* names for quest flags (quest.c) */
|
||||
extern const char *quest_types[]; /* named for quest types (quest.c) */
|
||||
|
||||
#endif /* _QUEST_H_ */
|
||||
|
||||
Reference in New Issue
Block a user