summaryrefslogtreecommitdiff
path: root/src/char
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/char
parentc67c2b7435a13d7ce17b2075e22dc5c6036f702a (diff)
downloadtmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.gz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.bz2
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.xz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.zip
Remove some macros
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.cpp4
-rw-r--r--src/char/char.hpp4
-rw-r--r--src/char/inter.cpp8
3 files changed, 7 insertions, 9 deletions
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";