From 83b2e0b3ceda907b7186acfcc56c214fc04d9c13 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 7 Feb 2013 19:38:32 -0800 Subject: Remove some macros --- src/char/char.cpp | 4 ---- src/char/char.hpp | 4 ++-- src/char/inter.cpp | 8 +++++--- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src/char') diff --git a/src/char/char.cpp b/src/char/char.cpp index a45592d..775ac69 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -1852,10 +1852,8 @@ void parse_frommap(int fd) if (auth_fifo[i].account_id == RFIFOL(fd, 2) && auth_fifo[i].char_id == RFIFOL(fd, 6) && auth_fifo[i].login_id1 == RFIFOL(fd, 10) && -#if CMP_AUTHFIFO_LOGIN2 != 0 // here, it's the only area where it's possible that we doesn't know login_id2 (map-server asks just after 0x72 packet, that doesn't given the value) (auth_fifo[i].login_id2 == RFIFOL(fd, 14) || RFIFOL(fd, 14) == 0) && // relate to the versions higher than 18 -#endif (!check_ip_flag || auth_fifo[i].ip == RFIFOL(fd, 18)) && !auth_fifo[i].delflag) { @@ -2477,9 +2475,7 @@ void parse_char(int fd) { if (auth_fifo[i].account_id == sd->account_id && auth_fifo[i].login_id1 == sd->login_id1 && -#if CMP_AUTHFIFO_LOGIN2 != 0 auth_fifo[i].login_id2 == sd->login_id2 && // relate to the versions higher than 18 -#endif (!check_ip_flag || auth_fifo[i].ip == session[fd]->client_addr.sin_addr.s_addr) diff --git a/src/char/char.hpp b/src/char/char.hpp index 3c0c865..4ba0b6b 100644 --- a/src/char/char.hpp +++ b/src/char/char.hpp @@ -4,13 +4,13 @@ #include "../common/const_array.hpp" #include "../common/mmo.hpp" -#define MAX_MAP_SERVERS 30 +constexpr int MAX_MAP_SERVERS = 30; #define CHAR_CONF_NAME "conf/char_athena.conf" #define LOGIN_LAN_CONF_NAME "conf/lan_support.conf" -#define DEFAULT_AUTOSAVE_INTERVAL 300*1000 +constexpr int DEFAULT_AUTOSAVE_INTERVAL = 300 * 1000; struct mmo_map_server { diff --git a/src/char/inter.cpp b/src/char/inter.cpp index 8015ae9..884a506 100644 --- a/src/char/inter.cpp +++ b/src/char/inter.cpp @@ -20,9 +20,11 @@ #include "../poison.hpp" -#define WISDATA_TTL (60*1000) // Existence time of Wisp/page data (60 seconds) - // that is the waiting time of answers of all map-servers -#define WISDELLIST_MAX 256 // Number of elements of Wisp/page data deletion list +// Existence time of Wisp/page data (60 seconds) +// that is the waiting time of answers of all map-servers +constexpr int WISDATA_TTL = 60 * 1000; +// Number of elements of Wisp/page data deletion list +constexpr int WISDELLIST_MAX = 256; char inter_log_filename[1024] = "log/inter.log"; -- cgit v1.2.3-70-g09d2