summaryrefslogtreecommitdiff
path: root/src/map/quest.h
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-01-24 00:54:00 +0100
committerHaruna <haru@dotalux.com>2015-01-24 00:54:00 +0100
commit1ae4a7184bee7897a318adca6f0941c9c697b78a (patch)
tree00b612493d44b30e20afdaa049188e33f738df18 /src/map/quest.h
parent21e3b27ba67b74bc106eb83e26d23255a363ce59 (diff)
parent49df787e2c2faa2621b5490c6e88c86a4b7a813f (diff)
downloadhercules-1ae4a7184bee7897a318adca6f0941c9c697b78a.tar.gz
hercules-1ae4a7184bee7897a318adca6f0941c9c697b78a.tar.bz2
hercules-1ae4a7184bee7897a318adca6f0941c9c697b78a.tar.xz
hercules-1ae4a7184bee7897a318adca6f0941c9c697b78a.zip
Merge pull request #449 from HerculesWS/questdb
Converted the Quest DB to libconfig. Added support for quest-granted item drops
Diffstat (limited to 'src/map/quest.h')
-rw-r--r--src/map/quest.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/map/quest.h b/src/map/quest.h
index f988d0c61..36ac69a53 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -7,16 +7,28 @@
#include "map.h" // TBL_PC
#include "../common/cbasetypes.h"
-#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES
+#include "../common/conf.h"
#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1
+struct quest_dropitem {
+ int mob_id;
+ int nameid;
+ int rate;
+};
+
+struct quest_objective {
+ int mob;
+ int count;
+};
+
struct quest_db {
int id;
unsigned int time;
- int mob[MAX_QUEST_OBJECTIVES];
- int count[MAX_QUEST_OBJECTIVES];
- int num_objectives;
+ int objectives_count;
+ struct quest_objective *objectives;
+ int dropitem_count;
+ struct quest_dropitem *dropitem;
//char name[NAME_LENGTH];
};
@@ -46,6 +58,7 @@ struct quest_interface {
int (*check) (TBL_PC *sd, int quest_id, enum quest_check_type type);
void (*clear) (void);
int (*read_db) (void);
+ struct quest_db *(*read_db_sub) (config_setting_t *cs, int n, const char *source);
};
struct quest_interface *quest;