diff options
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r-- | src/map/itemdb.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h index d751451c6..47446d617 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -23,10 +23,10 @@ /* #include "map/map.h" */ #include "common/hercules.h" -#include "common/conf.h" #include "common/db.h" #include "common/mmo.h" // ITEM_NAME_LENGTH +struct config_setting_t; struct script_code; struct hplugin_data_store; @@ -64,6 +64,7 @@ enum item_itemid { ITEMID_BRANCH_OF_DEAD_TREE = 604, ITEMID_ANODYNE = 605, ITEMID_ALOEBERA = 606, + ITEMID_MAGNIFIER = 611, ITEMID_POISON_BOTTLE = 678, ITEMID_EMPTY_BOTTLE = 713, ITEMID_EMPERIUM = 714, @@ -136,6 +137,7 @@ enum item_itemid { ITEMID_MAGIC_CASTLE = 12308, ITEMID_BULGING_HEAD = 12309, ITEMID_THICK_MANUAL50 = 12312, + ITEMID_NOVICE_MAGNIFIER = 12325, ITEMID_ANCILLA = 12333, ITEMID_REPAIR_A = 12392, ITEMID_REPAIR_B = 12393, @@ -393,6 +395,14 @@ enum ItemNouseRestrictions { INR_ALL = 0x1 ///< Sum of all the above values }; +/** Convenience item list (entry) used in various functions */ +struct itemlist_entry { + int id; ///< Item ID or (inventory) index + int16 amount; ///< Amount +}; +/** Convenience item list used in various functions */ +VECTOR_STRUCT_DECL(itemlist, struct itemlist_entry); + struct item_combo { struct script_code *script; unsigned short nameid[MAX_ITEMS_PER_COMBO];/* nameid array */ @@ -476,7 +486,7 @@ struct item_data { int delay; //Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command // some script commands should be revised as well... - unsigned int class_base[3]; ///< Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2) + uint64 class_base[3]; ///< Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2) unsigned class_upper : 6; ///< Specifies if the upper-type can equip it (bitfield, 0x01: normal, 0x02: upper, 0x04: baby normal, 0x08: third normal, 0x10: third upper, 0x20: third baby) struct { unsigned short chance; @@ -606,7 +616,8 @@ struct itemdb_interface { int (*searchname_array_sub) (DBKey key, DBData data, va_list ap); int (*searchrandomid) (struct item_group *group); const char* (*typename) (int type); - void (*jobid2mapid) (unsigned int *bclass, unsigned int jobmask); + void (*jobmask2mapid) (uint64 *bclass, uint64 jobmask); + void (*jobid2mapid) (uint64 *bclass, int job_id, bool enable); void (*create_dummy_data) (void); struct item_data* (*create_item_data) (int nameid); int (*isequip) (int nameid); @@ -626,11 +637,12 @@ struct itemdb_interface { int (*isidentified) (int nameid); int (*isidentified2) (struct item_data *data); int (*combo_split_atoi) (char *str, int *val); - void (*read_combos) (); + void (*read_combos) (void); int (*gendercheck) (struct item_data *id); int (*validate_entry) (struct item_data *entry, int n, const char *source); - void (*readdb_additional_fields) (int itemid, config_setting_t *it, int n, const char *source); - int (*readdb_libconfig_sub) (config_setting_t *it, int n, const char *source); + void (*readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); + void (*readdb_job_sub) (struct item_data *id, struct config_setting_t *t); + int (*readdb_libconfig_sub) (struct config_setting_t *it, int n, const char *source); int (*readdb_libconfig) (const char *filename); uint64 (*unique_id) (struct map_session_data *sd); void (*read) (bool minimal); @@ -639,7 +651,7 @@ struct itemdb_interface { void (*clear) (bool total); struct item_combo * (*id2combo) (unsigned short id); bool (*is_item_usable) (struct item_data *item); - bool (*lookup_const) (const config_setting_t *it, const char *name, int *value); + bool (*lookup_const) (const struct config_setting_t *it, const char *name, int *value); }; #ifdef HERCULES_CORE |