diff options
Diffstat (limited to 'src/map/quest.h')
-rw-r--r-- | src/map/quest.h | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/src/map/quest.h b/src/map/quest.h index e0768ef40..f83bb7d73 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team - * Copyright (C) Athena Dev Teams + * Copyright (C) 2012-2020 Hercules Dev Team + * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ struct block_list; struct config_setting_t; struct map_session_data; +struct questinfo; #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 @@ -59,6 +60,39 @@ enum quest_check_type { HUNTING, ///< Check if the given hunting quest's requirements have been met }; +struct questinfo_qreq { + int id; + int state; +}; + +struct questinfo_itemreq { + int nameid; + int min; + int max; +}; + +struct questinfo { + unsigned short icon; + unsigned char color; + bool hasJob; + unsigned int job;/* perhaps a mapid mask would be most flexible? */ + bool sex_enabled; + int sex; + struct { + int min; + int max; + } base_level; + struct { + int min; + int max; + } job_level; + VECTOR_DECL(struct questinfo_itemreq) items; + struct s_homunculus homunculus; + int homunculus_type; + VECTOR_DECL(struct questinfo_qreq) quest_requirement; + int mercenary_class; +}; + struct quest_interface { struct quest_db **db_data; ///< Quest database struct quest_db dummy; ///< Dummy entry for invalid quest lookups @@ -69,7 +103,7 @@ struct quest_interface { /* */ struct quest_db *(*db) (int quest_id); int (*pc_login) (struct map_session_data *sd); - int (*add) (struct map_session_data *sd, int quest_id); + int (*add) (struct map_session_data *sd, int quest_id, unsigned int time_limit); int (*change) (struct map_session_data *sd, int qid1, int qid2); int (*delete) (struct map_session_data *sd, int quest_id); int (*update_objective_sub) (struct block_list *bl, va_list ap); @@ -79,6 +113,19 @@ struct quest_interface { void (*clear) (void); int (*read_db) (void); struct quest_db *(*read_db_sub) (struct config_setting_t *cs, int n, const char *source); + + int (*questinfo_validate_icon) (int icon); + void (*questinfo_refresh) (struct map_session_data *sd); + bool (*questinfo_validate) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_job) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_sex) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_baselevel) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_joblevel) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_items) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_homunculus_level) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_homunculus_type) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_quests) (struct map_session_data *sd, struct questinfo *qi); + bool (*questinfo_validate_mercenary_class) (struct map_session_data *sd, struct questinfo *qi); }; #ifdef HERCULES_CORE |