diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2020-06-23 08:00:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 08:00:00 +0800 |
commit | 520863eaeda83da14b88d09f6378cd8abd5a5174 (patch) | |
tree | 2496ea36744dc2f51d264741a78699e719ceeb3b /src/common/mmo.h | |
parent | 0b7768837bed2aa521de5b9b76b2348943d7db20 (diff) | |
parent | 9b89425550094f51d633e5b5d6e86af65bffbf39 (diff) | |
download | hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.gz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.bz2 hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.xz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.zip |
Merge branch 'master' into jedzkie-pr03
Diffstat (limited to 'src/common/mmo.h')
-rw-r--r-- | src/common/mmo.h | 21 |
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 |