summaryrefslogtreecommitdiff
path: root/src/common/mmo.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-02-07 19:38:32 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-07 22:41:23 -0800
commit83b2e0b3ceda907b7186acfcc56c214fc04d9c13 (patch)
treef4dcc8d8b59fd9a633bc2604cc92f0523cc76ee4 /src/common/mmo.hpp
parentc67c2b7435a13d7ce17b2075e22dc5c6036f702a (diff)
downloadtmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.gz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.bz2
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.xz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.zip
Remove some macros
Diffstat (limited to 'src/common/mmo.hpp')
-rw-r--r--src/common/mmo.hpp46
1 files changed, 14 insertions, 32 deletions
diff --git a/src/common/mmo.hpp b/src/common/mmo.hpp
index db150ba..1bbb28a 100644
--- a/src/common/mmo.hpp
+++ b/src/common/mmo.hpp
@@ -6,33 +6,27 @@
# include "utils.hpp"
-# define FIFOSIZE_SERVERLINK 256*1024
+constexpr int FIFOSIZE_SERVERLINK = 256 * 1024;
-// set to 0 to not check IP of player between each server.
-// set to another value if you want to check (1)
-# define CMP_AUTHFIFO_IP 1
+constexpr int MAX_MAP_PER_SERVER = 512;
+constexpr int MAX_INVENTORY = 100;
+constexpr int MAX_AMOUNT = 30000;
+constexpr int MAX_ZENY = 1000000000; // 1G zeny
+constexpr int MAX_CART = 100;
-# define CMP_AUTHFIFO_LOGIN2 1
-
-# define MAX_MAP_PER_SERVER 512
-# define MAX_INVENTORY 100
-# define MAX_AMOUNT 30000
-# define MAX_ZENY 1000000000 // 1G zeny
-# define MAX_CART 100
enum class SkillID : uint16_t;
constexpr SkillID MAX_SKILL = SkillID(474); // not 450
constexpr SkillID get_enum_min_value(SkillID) { return SkillID(); }
constexpr SkillID get_enum_max_value(SkillID) { return MAX_SKILL; }
-
-# define GLOBAL_REG_NUM 96
-# define ACCOUNT_REG_NUM 16
-# define ACCOUNT_REG2_NUM 16
-# define DEFAULT_WALK_SPEED 150
-# define MIN_WALK_SPEED 0
-# define MAX_WALK_SPEED 1000
-# define MAX_STORAGE 300
-# define MAX_PARTY 12
+constexpr int GLOBAL_REG_NUM = 96;
+constexpr int ACCOUNT_REG_NUM = 16;
+constexpr int ACCOUNT_REG2_NUM = 16;
+constexpr int DEFAULT_WALK_SPEED = 150;
+constexpr int MIN_WALK_SPEED = 0;
+constexpr int MAX_WALK_SPEED = 1000;
+constexpr int MAX_STORAGE = 300;
+constexpr int MAX_PARTY = 12;
# define MIN_HAIR_STYLE battle_config.min_hair_style
# define MAX_HAIR_STYLE battle_config.max_hair_style
@@ -41,18 +35,6 @@ constexpr SkillID get_enum_max_value(SkillID) { return MAX_SKILL; }
# define MIN_CLOTH_COLOR battle_config.min_cloth_color
# define MAX_CLOTH_COLOR battle_config.max_cloth_color
-// for produce
-# define MIN_ATTRIBUTE 0
-# define MAX_ATTRIBUTE 4
-# define ATTRIBUTE_NORMAL 0
-# define MIN_STAR 0
-# define MAX_STAR 3
-
-# define MIN_PORTAL_MEMO 0
-# define MAX_PORTAL_MEMO 2
-
-# define MAX_STATUS_TYPE 5
-
# define CHAR_CONF_NAME "conf/char_athena.conf"
namespace e