summaryrefslogtreecommitdiff
path: root/src/map/mob.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-07 02:58:02 +0100
committerHaru <haru@dotalux.com>2016-01-29 10:57:29 +0100
commit50de6b49043968d01b2cc7565376d5e06c29b490 (patch)
tree185324335b3b2145a21d798ee310c6c0bf806904 /src/map/mob.h
parent6647a1d94ee2f218e0266712a1ec6a24853962da (diff)
downloadhercules-50de6b49043968d01b2cc7565376d5e06c29b490.tar.gz
hercules-50de6b49043968d01b2cc7565376d5e06c29b490.tar.bz2
hercules-50de6b49043968d01b2cc7565376d5e06c29b490.tar.xz
hercules-50de6b49043968d01b2cc7565376d5e06c29b490.zip
Modified Mob DB loader to behave like the Item DB loader
- Separated load and validation logic. - The load/validation functions now return the loaded mob ID Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mob.h')
-rw-r--r--src/map/mob.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/mob.h b/src/map/mob.h
index 77218bf4a..9a5239b11 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -141,6 +141,7 @@ struct spawn_info {
};
struct mob_db {
+ int mob_id;
char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
unsigned int base_exp,job_exp;
unsigned int mexp;
@@ -511,13 +512,14 @@ struct mob_interface {
void (*readdb) (void);
bool (*lookup_const) (const config_setting_t *it, const char *name, int *value);
bool (*get_const) (const config_setting_t *it, int *value);
+ int (*db_validate_entry) (struct mob_db *entry, int n, const char *source);
int (*read_libconfig) (const char *filename, bool ignore_missing);
- void (*read_db_additional_fields) (struct mob_db *entry, int class_, config_setting_t *it, int n, const char *source);
- bool (*read_db_sub) (config_setting_t *mobt, int id, const char *source);
- void (*read_db_drops_sub) (struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t);
- void (*read_db_mvpdrops_sub) (struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t);
- int (*read_db_mode_sub) (struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t);
- void (*read_db_stats_sub) (struct mob_db *entry, struct status_data *mstatus, int class_, config_setting_t *t);
+ void (*read_db_additional_fields) (struct mob_db *entry, config_setting_t *it, int n, const char *source);
+ int (*read_db_sub) (config_setting_t *mobt, int id, const char *source);
+ void (*read_db_drops_sub) (struct mob_db *entry, config_setting_t *t);
+ void (*read_db_mvpdrops_sub) (struct mob_db *entry, config_setting_t *t);
+ int (*read_db_mode_sub) (struct mob_db *entry, config_setting_t *t);
+ void (*read_db_stats_sub) (struct mob_db *entry, config_setting_t *t);
void (*name_constants) (void);
bool (*readdb_mobavail) (char *str[], int columns, int current);
int (*read_randommonster) (void);