summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-04-09 15:24:22 +0200
committerGitHub <noreply@github.com>2017-04-09 15:24:22 +0200
commitdb5a1d0f714fa196e1c026ccb123ac7104af2f75 (patch)
treee399edacc33de1a1954777d5ebfd9b1b6213367e /src/common
parent083ed4ad7a30bdc3172b3ef2a66bb257c0c0e70f (diff)
parent974222a8d3f189083205bf5d330de04a43226ad3 (diff)
downloadhercules-db5a1d0f714fa196e1c026ccb123ac7104af2f75.tar.gz
hercules-db5a1d0f714fa196e1c026ccb123ac7104af2f75.tar.bz2
hercules-db5a1d0f714fa196e1c026ccb123ac7104af2f75.tar.xz
hercules-db5a1d0f714fa196e1c026ccb123ac7104af2f75.zip
Merge pull request #1598 from Smokexyz/IRO
Implementation of Item Options System.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPMDataCheck.h3
-rw-r--r--src/common/mmo.h12
2 files changed, 14 insertions, 1 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 0a4af75dd..2a1c092b7 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -452,6 +452,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "item_combo", sizeof(struct item_combo), SERVER_TYPE_MAP },
{ "item_data", sizeof(struct item_data), SERVER_TYPE_MAP },
{ "item_group", sizeof(struct item_group), SERVER_TYPE_MAP },
+ { "item_option", sizeof(struct item_option), SERVER_TYPE_MAP },
{ "item_package", sizeof(struct item_package), SERVER_TYPE_MAP },
{ "item_package_must_entry", sizeof(struct item_package_must_entry), SERVER_TYPE_MAP },
{ "item_package_rand_entry", sizeof(struct item_package_rand_entry), SERVER_TYPE_MAP },
@@ -542,8 +543,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef MAP_PACKETS_STRUCT_H
{ "EQUIPITEM_INFO", sizeof(struct EQUIPITEM_INFO), SERVER_TYPE_MAP },
{ "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO), SERVER_TYPE_MAP },
+ { "ItemOptions", sizeof(struct ItemOptions), SERVER_TYPE_MAP },
{ "NORMALITEM_INFO", sizeof(struct NORMALITEM_INFO), SERVER_TYPE_MAP },
- { "RndOptions", sizeof(struct RndOptions), SERVER_TYPE_MAP },
{ "packet_additem", sizeof(struct packet_additem), SERVER_TYPE_MAP },
{ "packet_authok", sizeof(struct packet_authok), SERVER_TYPE_MAP },
{ "packet_banking_check", sizeof(struct packet_banking_check), SERVER_TYPE_MAP },
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 16bc978bf..b3069b27c 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -264,6 +264,12 @@
#define MAX_ELESKILLTREE 3
#endif
+// Maximum item options [Smokexyz]
+#ifndef MAX_ITEM_OPTIONS
+#define MAX_ITEM_OPTIONS 5
+#endif
+STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and database layout and should only be increased if you know the consequences.");
+
// The following system marks a different job ID system used by the map server,
// which makes a lot more sense than the normal one. [Skotlex]
// These marks the "level" of the job.
@@ -334,6 +340,12 @@ struct item {
char favorite;
unsigned char bound;
uint64 unique_id;
+
+ struct {
+ int16 index;
+ int16 value;
+ uint8 param;
+ } option[MAX_ITEM_OPTIONS];
};
//Equip position constants