summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPMDataCheck.h44
-rw-r--r--src/common/HPMSymbols.inc.h44
-rw-r--r--src/common/HPMi.h5
-rw-r--r--src/common/md5calc.c2
-rw-r--r--src/common/mmo.h61
-rw-r--r--src/common/nullpo.h9
-rw-r--r--src/common/socket.c4
7 files changed, 152 insertions, 17 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index a8524bdda..4bcb33e23 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2014-2017 Hercules Dev Team
+ * Copyright (C) 2014-2018 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -61,6 +61,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define CHAR_INT_AUCTION_H
#endif // CHAR_INT_AUCTION_H
+ #ifdef CHAR_INT_CLAN_H
+ { "inter_clan_interface", sizeof(struct inter_clan_interface), SERVER_TYPE_CHAR },
+ #else
+ #define CHAR_INT_CLAN_H
+ #endif // CHAR_INT_CLAN_H
#ifdef CHAR_INT_ELEMENTAL_H
{ "inter_elemental_interface", sizeof(struct inter_elemental_interface), SERVER_TYPE_CHAR },
#else
@@ -194,6 +199,10 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#endif // COMMON_MEMMGR_H
#ifdef COMMON_MMO_H
{ "auction_data", sizeof(struct auction_data), SERVER_TYPE_ALL },
+ { "clan", sizeof(struct clan), SERVER_TYPE_ALL },
+ { "clan_buff", sizeof(struct clan_buff), SERVER_TYPE_ALL },
+ { "clan_member", sizeof(struct clan_member), SERVER_TYPE_ALL },
+ { "clan_relationship", sizeof(struct clan_relationship), SERVER_TYPE_ALL },
{ "fame_list", sizeof(struct fame_list), SERVER_TYPE_ALL },
{ "guild", sizeof(struct guild), SERVER_TYPE_ALL },
{ "guild_alliance", sizeof(struct guild_alliance), SERVER_TYPE_ALL },
@@ -300,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 },
@@ -332,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
@@ -394,6 +420,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define MAP_CHRIF_H
#endif // MAP_CHRIF_H
+ #ifdef MAP_CLAN_H
+ { "clan_interface", sizeof(struct clan_interface), SERVER_TYPE_MAP },
+ #else
+ #define MAP_CLAN_H
+ #endif // MAP_CLAN_H
#ifdef MAP_CLIF_H
{ "cdelayed_damage", sizeof(struct cdelayed_damage), SERVER_TYPE_MAP },
{ "clif_interface", sizeof(struct clif_interface), SERVER_TYPE_MAP },
@@ -493,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 },
@@ -565,18 +595,26 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_CZ_REQ_REMOVE_ITEM_MAIL", sizeof(struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_REQ_ZENY_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ZENY_FROM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_CZ_SEND_MAIL", sizeof(struct PACKET_CZ_SEND_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_CLAN_LEAVE", sizeof(struct PACKET_ZC_ACK_CLAN_LEAVE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_DELETE_MAIL", sizeof(struct PACKET_ZC_ACK_DELETE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_ITEM_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ITEM_FROM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_ZENY_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ZENY_FROM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_ZC_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP },
{ "PACKET_ZC_CHECKNAME", sizeof(struct PACKET_ZC_CHECKNAME), SERVER_TYPE_MAP },
+ { "PACKET_ZC_CLANINFO", sizeof(struct PACKET_ZC_CLANINFO), SERVER_TYPE_MAP },
+ { "PACKET_ZC_GROUP_LIST", sizeof(struct PACKET_ZC_GROUP_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_GROUP_LIST_SUB", sizeof(struct PACKET_ZC_GROUP_LIST_SUB), SERVER_TYPE_MAP },
{ "PACKET_ZC_MAIL_LIST", sizeof(struct PACKET_ZC_MAIL_LIST), SERVER_TYPE_MAP },
+ { "PACKET_ZC_NOTIFY_CLAN_CHAT", sizeof(struct PACKET_ZC_NOTIFY_CLAN_CHAT), SERVER_TYPE_MAP },
+ { "PACKET_ZC_NOTIFY_CLAN_CONNECTINFO", sizeof(struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO), SERVER_TYPE_MAP },
{ "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP },
{ "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP },
+ { "ZC_PROGRESS_ACTOR", sizeof(struct ZC_PROGRESS_ACTOR), SERVER_TYPE_MAP },
{ "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP },
{ "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP },
{ "packet_additem", sizeof(struct packet_additem), SERVER_TYPE_MAP },
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 5ee8a014b..70de5cdef 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2017 Hercules Dev Team
+ * Copyright (C) 2013-2018 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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
@@ -53,6 +56,9 @@ struct chat_interface *chat;
#ifdef MAP_CHRIF_H /* chrif */
struct chrif_interface *chrif;
#endif // MAP_CHRIF_H
+#ifdef MAP_CLAN_H /* clan */
+struct clan_interface *clan;
+#endif // MAP_CLAN_H
#ifdef MAP_CLIF_H /* clif */
struct clif_interface *clif;
#endif // MAP_CLIF_H
@@ -98,6 +104,9 @@ struct instance_interface *instance;
#ifdef CHAR_INT_AUCTION_H /* inter_auction */
struct inter_auction_interface *inter_auction;
#endif // CHAR_INT_AUCTION_H
+#ifdef CHAR_INT_CLAN_H /* inter_clan */
+struct inter_clan_interface *inter_clan;
+#endif // CHAR_INT_CLAN_H
#ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */
struct inter_elemental_interface *inter_elemental;
#endif // CHAR_INT_ELEMENTAL_H
@@ -134,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
@@ -155,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
@@ -283,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";
@@ -315,6 +337,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("chrif", chrif))
return "chrif";
#endif // MAP_CHRIF_H
+#ifdef MAP_CLAN_H /* clan */
+ if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("clan", clan))
+ return "clan";
+#endif // MAP_CLAN_H
#ifdef MAP_CLIF_H /* clif */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("clif", clif))
return "clif";
@@ -375,6 +401,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_auction", inter_auction))
return "inter_auction";
#endif // CHAR_INT_AUCTION_H
+#ifdef CHAR_INT_CLAN_H /* inter_clan */
+ if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_clan", inter_clan))
+ return "inter_clan";
+#endif // CHAR_INT_CLAN_H
#ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */
if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_elemental", inter_elemental))
return "inter_elemental";
@@ -423,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";
@@ -431,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";
@@ -451,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/HPMi.h b/src/common/HPMi.h
index 143c325c1..7698d3ca7 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -89,6 +89,7 @@ enum HPluginDataTypes {
HPDT_ITEMDATA, ///< For struct item_data.
HPDT_BGDATA, ///< For struct battleground_data.
HPDT_AUTOTRADE_VEND, ///< For struct autotrade_vending.
+ HPDT_CLAN, ///< For struct clan.
};
/* used in macros and conf storage */
@@ -153,6 +154,10 @@ enum HPluginConfType {
#define addToATVEND(ptr,data,classid,autofree) (HPMi->addToHPData(HPDT_AUTOTRADE_VEND,HPMi->pid,&(ptr)->hdata,(data),(classid),(autofree)))
#define getFromATVEND(ptr,classid) (HPMi->getFromHPData(HPDT_AUTOTRADE_VEND,HPMi->pid,(ptr)->hdata,(classid)))
#define removeFromATVEND(ptr,classid) (HPMi->removeFromHPData(HPDT_AUTOTRADE_VEND,HPMi->pid,(ptr)->hdata,(classid)))
+/* clan */
+#define addtoCLAN(ptr,data,classid,autofree) (HPMi->addToHPData(HPDT_CLAN,HPMi->pid,&(ptr)->hdata,(data),(classid),(autofree)))
+#define getfromCLAN(ptr,classid) (HPMi->getFromHPData(HPDT_CLAN,HPMi->pid,(ptr)->hdata,(classid)))
+#define removefromCLAN(ptr,classid) (HPMi->removeFromHPData(HPDT_CLAN,HPMi->pid,(ptr)->hdata,(classid)))
/// HPMi->addCommand
#define addAtcommand(cname,funcname) do { \
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 7fd4ca6ea..f9cbc57de 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -304,6 +304,7 @@ STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and da
#define INFINITE_DURATION (-1) // Infinite duration for status changes
struct hplugin_data_store;
+struct script_code;
enum item_types {
IT_HEALING = 0,
@@ -359,7 +360,7 @@ struct item {
char favorite;
unsigned char bound;
uint64 unique_id;
-
+
struct {
int16 index;
int16 value;
@@ -616,7 +617,7 @@ struct mmo_charstatus {
short manner; // Defines how many minutes a char will be muted, each negative point is equivalent to a minute.
unsigned char karma;
short hair,hair_color,clothes_color,body;
- int party_id,guild_id,pet_id,hom_id,mer_id,ele_id;
+ int party_id,guild_id,clan_id,pet_id,hom_id,mer_id,ele_id;
int fame;
// Mercenary Guilds Rank
@@ -641,6 +642,7 @@ struct mmo_charstatus {
uint32 mapip;
uint16 mapport;
+ int64 last_login;
struct point last_point,save_point,memo_point[MAX_MEMOPOINTS];
struct item inventory[MAX_INVENTORY],cart[MAX_CART];
struct s_skill skill[MAX_SKILL_DB];
@@ -818,6 +820,59 @@ struct guild_castle {
int temp_guardians_max;
};
+/**
+ * Clan Member Struct
+ */
+struct clan_member {
+ int char_id; ///< Char Id of member
+ short online; ///< Flag to know if the player is online or not
+ int64 last_login; ///< Last login of this member, used to kick if inactive for long time
+ struct map_session_data *sd; ///< Player data of member
+};
+
+/**
+ * Clan Buff Struct
+ */
+struct clan_buff {
+ int icon; ///< Status Icon to be shown in client (Use one of the 'SI_' constants)
+ struct script_code *script; ///< The script to be executed as CLan Buff
+};
+
+/**
+ * Clan Relationship Struct
+ */
+struct clan_relationship {
+ char constant[NAME_LENGTH]; ///< Unique name of the related clan
+ int clan_id; ///< Id of the related clan
+};
+
+/**
+ * Clan Struct
+ */
+struct clan {
+ int clan_id; ///< CLan's Id
+ char constant[NAME_LENGTH]; ///< Clan's Unique Name
+ char name[NAME_LENGTH]; ///< Clan's Name
+ char master[NAME_LENGTH]; ///< Name of the clan's master (used for clan information on client)
+ char map[MAP_NAME_LENGTH_EXT]; ///< The map of that clan (used for clan information on client)
+ struct clan_buff buff; ///< The buff for a clan when a member joins it
+ short max_member; ///< Limit of Members
+ short member_count; ///< Holds the amount of members in this clan, online and offline
+ short connect_member; ///< Members that are Online
+ VECTOR_DECL(struct clan_member) members; ///< Vector of Members
+ VECTOR_DECL(struct clan_relationship) allies; ///< Vector of Allies
+ VECTOR_DECL(struct clan_relationship) antagonists; ///< Vector of Antagonists
+ int kick_time; /// Needed inactive time to be kicked
+ int check_time; ///< Interval to check for inactive players
+ int tid; ///< Timer ID for inactivity kick
+ bool received; ///< Whether or not the requested data was received
+ int req_state; ///< Flag for knowing what to do after receiving the data from inter server
+ int req_count_tid; ///< Timer ID for the timer that handles the timeout of requests for interserver to count members
+ int req_kick_tid; ///< Timer ID for the timer that handles the timeout of requests for interserver to kick inactive members
+
+ struct hplugin_data_store *hdata; ///< HPM Plugin Data Store
+};
+
struct fame_list {
int id;
int fame;
@@ -844,12 +899,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/nullpo.h b/src/common/nullpo.h
index 28d058dc0..ae0c82364 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -23,15 +23,10 @@
#include "common/hercules.h"
-// enabled by default on debug builds
-#if defined(DEBUG) && !defined(NULLPO_CHECK)
+// if need disable nullpo checks this line can be commented
#define NULLPO_CHECK
-#endif
-
-// Skip assert checks on release builds
-#if !defined(RELEASE) && !defined(ASSERT_CHECK)
+// if need disable asserts checks this line can be commented
#define ASSERT_CHECK
-#endif
/** Assert */
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);