summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPMDataCheck.h20
-rw-r--r--src/common/HPMSymbols.inc.h28
-rw-r--r--src/common/md5calc.c2
-rw-r--r--src/common/mmo.h20
-rw-r--r--src/common/socket.c4
5 files changed, 67 insertions, 7 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index f2812a275..4bcb33e23 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -309,11 +309,20 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef LOGIN_ACCOUNT_H
{ "Account_engine", sizeof(struct Account_engine), SERVER_TYPE_LOGIN },
{ "AccountDB", sizeof(struct AccountDB), SERVER_TYPE_LOGIN },
+ { "AccountDB_SQL", sizeof(struct AccountDB_SQL), SERVER_TYPE_LOGIN },
{ "AccountDBIterator", sizeof(struct AccountDBIterator), SERVER_TYPE_LOGIN },
+ { "AccountDBIterator_SQL", sizeof(struct AccountDBIterator_SQL), SERVER_TYPE_LOGIN },
+ { "account_interface", sizeof(struct account_interface), SERVER_TYPE_LOGIN },
{ "mmo_account", sizeof(struct mmo_account), SERVER_TYPE_LOGIN },
#else
#define LOGIN_ACCOUNT_H
#endif // LOGIN_ACCOUNT_H
+ #ifdef LOGIN_IPBAN_H
+ { "ipban_interface", sizeof(struct ipban_interface), SERVER_TYPE_LOGIN },
+ { "s_ipban_dbs", sizeof(struct s_ipban_dbs), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_IPBAN_H
+ #endif // LOGIN_IPBAN_H
#ifdef LOGIN_LCLIF_H
{ "lclif_interface", sizeof(struct lclif_interface), SERVER_TYPE_LOGIN },
{ "login_packet_db", sizeof(struct login_packet_db), SERVER_TYPE_LOGIN },
@@ -341,14 +350,22 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define LOGIN_LCLIF_P_H
#endif // LOGIN_LCLIF_P_H
+ #ifdef LOGIN_LOGINLOG_H
+ { "loginlog_interface", sizeof(struct loginlog_interface), SERVER_TYPE_LOGIN },
+ { "s_loginlog_dbs", sizeof(struct s_loginlog_dbs), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_LOGINLOG_H
+ #endif // LOGIN_LOGINLOG_H
#ifdef LOGIN_LOGIN_H
{ "Login_Config", sizeof(struct Login_Config), SERVER_TYPE_LOGIN },
{ "client_hash_node", sizeof(struct client_hash_node), SERVER_TYPE_LOGIN },
+ { "lchrif_interface", sizeof(struct lchrif_interface), SERVER_TYPE_LOGIN },
{ "login_auth_node", sizeof(struct login_auth_node), SERVER_TYPE_LOGIN },
{ "login_interface", sizeof(struct login_interface), SERVER_TYPE_LOGIN },
{ "login_session_data", sizeof(struct login_session_data), SERVER_TYPE_LOGIN },
{ "mmo_char_server", sizeof(struct mmo_char_server), SERVER_TYPE_LOGIN },
{ "online_login_data", sizeof(struct online_login_data), SERVER_TYPE_LOGIN },
+ { "s_login_dbs", sizeof(struct s_login_dbs), SERVER_TYPE_LOGIN },
#else
#define LOGIN_LOGIN_H
#endif // LOGIN_LOGIN_H
@@ -507,8 +524,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "charid_request", sizeof(struct charid_request), SERVER_TYPE_MAP },
{ "flooritem_data", sizeof(struct flooritem_data), SERVER_TYPE_MAP },
{ "iwall_data", sizeof(struct iwall_data), SERVER_TYPE_MAP },
- { "map_cache_main_header", sizeof(struct map_cache_main_header), SERVER_TYPE_MAP },
- { "map_cache_map_info", sizeof(struct map_cache_map_info), SERVER_TYPE_MAP },
+ { "map_cache_header", sizeof(struct map_cache_header), SERVER_TYPE_MAP },
{ "map_data", sizeof(struct map_data), SERVER_TYPE_MAP },
{ "map_data_other_server", sizeof(struct map_data_other_server), SERVER_TYPE_MAP },
{ "map_drop_list", sizeof(struct map_drop_list), SERVER_TYPE_MAP },
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 6be9d547c..70de5cdef 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -29,6 +29,9 @@
#ifdef COMMON_UTILS_H /* HCache */
struct HCache_interface *HCache;
#endif // COMMON_UTILS_H
+#ifdef LOGIN_ACCOUNT_H /* account */
+struct account_interface *account;
+#endif // LOGIN_ACCOUNT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
struct atcommand_interface *atcommand;
#endif // MAP_ATCOMMAND_H
@@ -140,12 +143,18 @@ struct inter_storage_interface *inter_storage;
#ifdef MAP_INTIF_H /* intif */
struct intif_interface *intif;
#endif // MAP_INTIF_H
+#ifdef LOGIN_IPBAN_H /* ipban */
+struct ipban_interface *ipban;
+#endif // LOGIN_IPBAN_H
#ifdef MAP_IRC_BOT_H /* ircbot */
struct irc_bot_interface *ircbot;
#endif // MAP_IRC_BOT_H
#ifdef MAP_ITEMDB_H /* itemdb */
struct itemdb_interface *itemdb;
#endif // MAP_ITEMDB_H
+#ifdef LOGIN_LOGIN_H /* lchrif */
+struct lchrif_interface *lchrif;
+#endif // LOGIN_LOGIN_H
#ifdef LOGIN_LCLIF_H /* lclif */
struct lclif_interface *lclif;
#endif // LOGIN_LCLIF_H
@@ -161,6 +170,9 @@ struct login_interface *login;
#ifdef CHAR_LOGINIF_H /* loginif */
struct loginif_interface *loginif;
#endif // CHAR_LOGINIF_H
+#ifdef LOGIN_LOGINLOG_H /* loginlog */
+struct loginlog_interface *loginlog;
+#endif // LOGIN_LOGINLOG_H
#ifdef MAP_MAIL_H /* mail */
struct mail_interface *mail;
#endif // MAP_MAIL_H
@@ -289,6 +301,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("HCache", HCache))
return "HCache";
#endif // COMMON_UTILS_H
+#ifdef LOGIN_ACCOUNT_H /* account */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("account", account))
+ return "account";
+#endif // LOGIN_ACCOUNT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("atcommand", atcommand))
return "atcommand";
@@ -437,6 +453,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("intif", intif))
return "intif";
#endif // MAP_INTIF_H
+#ifdef LOGIN_IPBAN_H /* ipban */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("ipban", ipban))
+ return "ipban";
+#endif // LOGIN_IPBAN_H
#ifdef MAP_IRC_BOT_H /* ircbot */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("ircbot", ircbot))
return "ircbot";
@@ -445,6 +465,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("itemdb", itemdb))
return "itemdb";
#endif // MAP_ITEMDB_H
+#ifdef LOGIN_LOGIN_H /* lchrif */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("lchrif", lchrif))
+ return "lchrif";
+#endif // LOGIN_LOGIN_H
#ifdef LOGIN_LCLIF_H /* lclif */
if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("lclif", lclif))
return "lclif";
@@ -465,6 +489,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("loginif", loginif))
return "loginif";
#endif // CHAR_LOGINIF_H
+#ifdef LOGIN_LOGINLOG_H /* loginlog */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("loginlog", loginlog))
+ return "loginlog";
+#endif // LOGIN_LOGINLOG_H
#ifdef MAP_MAIL_H /* mail */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mail", mail))
return "mail";
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index d2fc32371..d5ce8b5a8 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -202,7 +202,7 @@ static void md5_buf2binary(const uint8 *buf, const int buf_size, uint8 *output)
//1-3
copy_len = buf_size % 64; //The number of bytes which remained is computed.
- strncpy((char *)padding_message, (const char *)pbuf, copy_len); // A message is copied to an extended bit sequence.
+ memcpy((char *)padding_message, (const char *)pbuf, copy_len); // A message is copied to an extended bit sequence.
memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length.
padding_message[copy_len] |= 0x80; //The next of a message is 1.
diff --git a/src/common/mmo.h b/src/common/mmo.h
index d7d0820b3..5e7f22e6e 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -81,6 +81,22 @@
#undef ENABLE_PACKETVER_ZERO
#endif // DISABLE_PACKETVER_ZERO
+#if !defined(PACKETVER_RE) && !defined(PACKETVER_ZERO)
+ #define PACKETVER_MAIN_NUM PACKETVER
+#else
+ #define PACKETVER_MAIN_NUM 0
+#endif
+#ifdef PACKETVER_RE
+ #define PACKETVER_RE_NUM PACKETVER
+#else
+ #define PACKETVER_RE_NUM 0
+#endif
+#ifdef PACKETVER_ZERO
+ #define PACKETVER_ZERO_NUM PACKETVER
+#else
+ #define PACKETVER_ZERO_NUM 0
+#endif
+
// Client support for experimental RagexeRE UI present in 2012-04-10 and 2012-04-18
#if defined(PACKETVER_RE) && ( PACKETVER == 20120410 || PACKETVER == 20120418 )
#define PARTY_RECRUIT
@@ -360,7 +376,7 @@ struct item {
char favorite;
unsigned char bound;
uint64 unique_id;
-
+
struct {
int16 index;
int16 value;
@@ -899,12 +915,12 @@ struct rodex_message {
struct {
struct item item;
int idx;
-
} items[RODEX_MAX_ITEM];
int64 zeny;
uint8 type;
int8 opentype;
bool is_read;
+ bool sender_read;
bool is_deleted;
int send_date;
int expire_date;
diff --git a/src/common/socket.c b/src/common/socket.c
index d4b8bb43f..c74cd4661 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1537,7 +1537,7 @@ void socket_close(int fd)
// Epoll based Event Dispatcher
epevent.data.fd = fd;
epevent.events = EPOLLIN;
- epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &epevent); // removing the socket from epoll when it's being closed is not required but recommended
+ epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &epevent); // removing the socket from epoll when it's being closed is not required but recommended
#endif // SOCKET_EPOLL
sShutdown(fd, SHUT_RDWR); // Disallow further reads/writes
@@ -1694,7 +1694,7 @@ void socket_init(void)
#else // SOCKET_EPOLL
// Epoll based Event Dispatcher:
- epfd = epoll_create(FD_SETSIZE); // 2.6.8 or newer ignores the expected socket amount argument
+ epfd = epoll_create(FD_SETSIZE); // 2.6.8 or newer ignores the expected socket amount argument
if(epfd == SOCKET_ERROR){
ShowError("Failed to Create Epoll Event Dispatcher: %s\n", error_msg());
exit(EXIT_FAILURE);