diff options
author | shennetsind <ind@henn.et> | 2013-09-16 12:31:37 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-16 12:31:37 -0300 |
commit | 8fb81341feedb5d00175d83e816f4d2ec2d4eb36 (patch) | |
tree | 367f9ad9d60537832c6afdfa674ab94aa011207d /src/map/quest.h | |
parent | 7f933ea6cb66e4deb2dc53c7aa3a96d82cb2884d (diff) | |
download | hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.gz hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.bz2 hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.xz hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.zip |
HPM: Quest.c Interface
Fully Integrated
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/quest.h')
-rw-r--r-- | src/map/quest.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/map/quest.h b/src/map/quest.h index 7f638a54c..85c987f54 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _QUEST_H_ #define _QUEST_H_ @@ -12,23 +13,29 @@ struct s_quest_db { int num_objectives; //char name[NAME_LENGTH]; }; -extern struct s_quest_db quest_db[MAX_QUEST_DB]; typedef enum quest_check_type { HAVEQUEST, PLAYTIME, HUNTING } quest_check_type; -int quest_pc_login(TBL_PC * sd); - -int quest_add(TBL_PC * sd, int quest_id); -int quest_delete(TBL_PC * sd, int quest_id); -int quest_change(TBL_PC * sd, int qid1, int qid2); -int quest_update_objective_sub(struct block_list *bl, va_list ap); -void quest_update_objective(TBL_PC * sd, int mob); -int quest_update_status(TBL_PC * sd, int quest_id, quest_state status); -int quest_check(TBL_PC * sd, int quest_id, quest_check_type type); +struct quest_interface { + struct s_quest_db db[MAX_QUEST_DB]; + /* */ + void (*init) (void); + void (*reload) (void); + /* */ + int (*search_db) (int quest_id); + int (*pc_login) (TBL_PC *sd); + int (*add) (TBL_PC *sd, int quest_id); + int (*change) (TBL_PC *sd, int qid1, int qid2); + int (*delete) (TBL_PC *sd, int quest_id); + int (*update_objective_sub) (struct block_list *bl, va_list ap); + void (*update_objective) (TBL_PC *sd, int mob); + int (*update_status) (TBL_PC *sd, int quest_id, quest_state status); + int (*check) (TBL_PC *sd, int quest_id, quest_check_type type); + int (*read_db) (void); +}; -int quest_search_db(int quest_id); +struct quest_interface *quest; -void do_init_quest(); -void do_reload_quest(void); +void quest_defaults(void); #endif |