summaryrefslogtreecommitdiff
path: root/src/common/mmo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mmo.h')
-rw-r--r--src/common/mmo.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 9421f6e35..e4b5a8bd5 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -132,7 +132,9 @@
#endif // PACKETVER_RE && (PACKETVER == 20120410 || PACKETVER == 10120418)
// Comment the following line to disable sc_data saving. [Skotlex]
+#ifndef ENABLE_SC_SAVING
#define ENABLE_SC_SAVING
+#endif
#if PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628 || defined(PACKETVER_ZERO)
// Comment the following like to disable server-side hot-key saving support. [Skotlex]
@@ -174,7 +176,9 @@
#else
#define MAX_BASE_CARTS 5
#endif
+#ifndef MAX_CARTS
#define MAX_CARTS (MAX_BASE_CARTS + MAX_CARTDECORATION_CARTS)
+#endif
#ifndef MAX_INVENTORY
#if PACKETVER_MAIN_NUM >= 20181219 || PACKETVER_RE_NUM >= 20181219 || PACKETVER_ZERO_NUM >= 20181212
@@ -204,19 +208,31 @@
#endif
//Number of slots carded equipment can have. Never set to less than 4 as they are also used to keep the data of forged items/equipment. [Skotlex]
//Note: The client seems unable to receive data for more than 4 slots due to all related packets having a fixed size.
+#ifndef MAX_SLOTS
#define MAX_SLOTS 4
+#endif
//Max amount of a single stacked item
+#ifndef MAX_AMOUNT
#define MAX_AMOUNT 30000
+#endif
+#ifndef MAX_ZENY
#define MAX_ZENY INT_MAX
+#endif
//Official Limit: 2.1b ( the var that stores the money doesn't go much higher than this by default )
+#ifndef MAX_BANK_ZENY
#define MAX_BANK_ZENY INT_MAX
+#endif
#ifndef MAX_LEVEL
#define MAX_LEVEL 175
#endif
+#ifndef MAX_FAME
#define MAX_FAME 1000000000
+#endif
+#ifndef MAX_CART
#define MAX_CART 100
+#endif
#ifndef MAX_SKILL_DB
#define MAX_SKILL_DB 1314 ///< Maximum number of skills in the skill DB (compacted array size)
#endif
@@ -380,7 +396,10 @@ STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and da
#define JOBL_BABY 0x2000
#define JOBL_THIRD 0x4000
-#define SCRIPT_VARNAME_LENGTH 32 ///< Maximum length of a script variable
+#define SCRIPT_VARNAME_LENGTH 32 ///< Maximum length of a script variable's name including affixes and excluding NULL-terminator.
+STATIC_ASSERT(SCRIPT_VARNAME_LENGTH <= 32, "This value is limited by the inter-server communication and database layout and should only be increased if you know the consequences.");
+#define SCRIPT_STRING_VAR_LENGTH 255 ///< Maximum length of strings stored in script variables excluding NULL-terminator.
+STATIC_ASSERT(SCRIPT_STRING_VAR_LENGTH <= 255, "This value is limited by the inter-server communication and database layout and should only be increased if you know the consequences.");
#define INFINITE_DURATION (-1) // Infinite duration for status changes