summaryrefslogtreecommitdiff
path: root/src/map/itemdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/itemdb.h')
-rw-r--r--src/map/itemdb.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 6cce715d3..d92940445 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -36,12 +36,23 @@ struct hplugin_data_store;
#ifndef MAX_ITEMDB
#define MAX_ITEMDB 0xFFFF
#endif
+
+#ifndef MAX_ITEM_ID
+#if PACKETVER_RE_NUM >= 20180704
+#define MAX_ITEM_ID 0x20000
+#else
+#define MAX_ITEM_ID 0xFFFF
+#endif
+#endif
+
#ifndef MAX_ITEMDELAYS
#define MAX_ITEMDELAYS 10 // The maximum number of item delays
#endif
+
#ifndef MAX_SEARCH
#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display.
#endif
+
#ifndef MAX_ITEMS_PER_COMBO
#define MAX_ITEMS_PER_COMBO 6 /* maximum amount of items a combo may require */
#endif
@@ -58,6 +69,13 @@ struct hplugin_data_store;
#define UNKNOWN_ITEM_ID 512
#endif
+#if MAX_ITEM_ID < MAX_ITEMDB
+#error "MAX_ITEM_ID must be bigger or same with MAX_ITEMDB"
+#endif
+#if MAX_ITEM_ID > 0xFFFF && PACKETVER_RE_NUM < 20180704
+#error "For clients before 20180704 RE, MAX_ITEM_ID must be smaller than 0x10000"
+#endif
+
enum item_itemid {
ITEMID_RED_POTION = 501,
ITEMID_YELLOW_POTION = 503,
@@ -409,13 +427,13 @@ struct item_combo {
};
struct item_group {
- unsigned short id;
+ int id;
int *nameid;
unsigned short qty;
};
struct item_chain_entry {
- unsigned short id;
+ int id;
unsigned short rate;
struct item_chain_entry *next;
};
@@ -426,7 +444,7 @@ struct item_chain {
};
struct item_package_rand_entry {
- unsigned short id;
+ int id;
unsigned short qty;
unsigned short rate;
unsigned short hours;