summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c71
-rw-r--r--src/char/char.h3
-rw-r--r--src/char/int_guild.c4
-rw-r--r--src/char/int_guild.h2
-rw-r--r--src/char/int_pet.c2
-rw-r--r--src/char/int_pet.h2
-rw-r--r--src/char/int_rodex.c140
-rw-r--r--src/char/int_rodex.h6
-rw-r--r--src/char/inter.c6
-rw-r--r--src/char/mapif.c84
-rw-r--r--src/char/mapif.h7
-rw-r--r--src/common/HPMDataCheck.h12
-rw-r--r--src/common/HPMSymbols.inc.h7
-rw-r--r--src/common/mmo.h31
-rw-r--r--src/common/packets/packets2019_len_main.h75
-rw-r--r--src/common/packets/packets2019_len_re.h75
-rw-r--r--src/common/packets/packets2019_len_zero.h4421
-rw-r--r--src/common/packets/packets_len_zero.h8
-rw-r--r--src/common/socket.c20
-rw-r--r--src/common/socket.h3
-rw-r--r--src/common/sysinfo.c8
-rw-r--r--src/login/login.c15
-rw-r--r--src/map/HPMmap.c1
-rw-r--r--src/map/Makefile.in4
-rw-r--r--src/map/achievement.c6
-rw-r--r--src/map/atcommand.c48
-rw-r--r--src/map/atcommand.h6
-rw-r--r--src/map/battle.c11
-rw-r--r--src/map/battle.h9
-rw-r--r--src/map/chat.c8
-rw-r--r--src/map/clif.c368
-rw-r--r--src/map/clif.h64
-rw-r--r--src/map/guild.c6
-rw-r--r--src/map/guild.h2
-rw-r--r--src/map/homunculus.c4
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/intif.c98
-rw-r--r--src/map/intif.h8
-rw-r--r--src/map/itemdb.c3
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/map.h83
-rw-r--r--src/map/mapdefines.h103
-rw-r--r--src/map/messages_main.h127
-rw-r--r--src/map/messages_re.h127
-rw-r--r--src/map/messages_zero.h139
-rw-r--r--src/map/mob.c369
-rw-r--r--src/map/mob.h57
-rw-r--r--src/map/npc.c8
-rw-r--r--src/map/npc.h6
-rw-r--r--src/map/packets.h17
-rw-r--r--src/map/packets_keys_main.h16
-rw-r--r--src/map/packets_keys_zero.h13
-rw-r--r--src/map/packets_shuffle_main.h15
-rw-r--r--src/map/packets_shuffle_re.h15
-rw-r--r--src/map/packets_shuffle_zero.h13
-rw-r--r--src/map/packets_struct.h83
-rw-r--r--src/map/pc.c18
-rw-r--r--src/map/pc.h108
-rw-r--r--src/map/pet.c25
-rw-r--r--src/map/pet.h4
-rw-r--r--src/map/rodex.c96
-rw-r--r--src/map/rodex.h4
-rw-r--r--src/map/script.c505
-rw-r--r--src/map/script.h38
-rw-r--r--src/map/skill.c15
-rw-r--r--src/map/status.c3
-rw-r--r--src/map/stylist.c228
-rw-r--r--src/map/stylist.h69
-rw-r--r--src/plugins/HPMHooking.c1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc170
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc207
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc149
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc38
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc1021
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc1
-rw-r--r--src/plugins/db2sql.c4
-rw-r--r--src/plugins/sample.c9
82 files changed, 8462 insertions, 1158 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 330b0639f..5528fb8aa 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -479,7 +479,8 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p)
(p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) ||
(p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift) ||
(p->clan_id != cp->clan_id) || (p->last_login != cp->last_login) || (p->attendance_count != cp->attendance_count) ||
- (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id) || (p->inventorySize != cp->inventorySize)
+ (p->attendance_timer != cp->attendance_timer) || (p->title_id != cp->title_id) || (p->inventorySize != cp->inventorySize) ||
+ (p->allow_call != cp->allow_call)
) {
//Save status
unsigned int opt = 0;
@@ -491,10 +492,12 @@ static int char_mmo_char_tosql(int char_id, struct mmo_charstatus *p)
p->inventorySize = FIXED_INVENTORY_SIZE;
}
- if( p->allow_party )
+ if (p->allow_party)
opt |= OPT_ALLOW_PARTY;
- if( p->show_equip )
+ if (p->show_equip)
opt |= OPT_SHOW_EQUIP;
+ if (p->allow_call)
+ opt |= OPT_ALLOW_CALL;
if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d',"
"`base_exp`='%"PRIu64"', `job_exp`='%"PRIu64"', `zeny`='%d',"
@@ -1098,7 +1101,7 @@ static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, sizeof p.char_id, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, sizeof p.slot, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof p.name, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT16, &p.class, sizeof p.class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &p.class, sizeof p.class, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, sizeof p.base_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, sizeof p.job_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, sizeof p.base_exp, NULL, NULL)
@@ -1221,7 +1224,7 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, sizeof p->account_id, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, sizeof p->slot, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof p->name, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT16, &p->class, sizeof p->class, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p->class, sizeof p->class, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, sizeof p->base_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, sizeof p->job_level, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, sizeof p->base_exp, NULL, NULL)
@@ -1447,10 +1450,12 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa
SQL->StmtFree(stmt);
/* load options into proper vars */
- if( opt & OPT_ALLOW_PARTY )
+ if (opt & OPT_ALLOW_PARTY)
p->allow_party = true;
- if( opt & OPT_SHOW_EQUIP )
+ if (opt & OPT_SHOW_EQUIP)
p->show_equip = true;
+ if (opt & OPT_ALLOW_CALL)
+ p->allow_call = true;
cp = idb_ensure(chr->char_db_, char_id, chr->create_charstatus);
memcpy(cp, p, sizeof(struct mmo_charstatus));
@@ -1705,7 +1710,7 @@ static int char_check_char_name(const char *name, const char *esc_name)
* -5: 'Symbols in Character Names are forbidden'
* char_id: Success
**/
-static int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int16 starting_class, uint8 sex)
+static int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_class, uint8 sex)
{
char name[NAME_LENGTH];
char esc_name[NAME_LENGTH*2+1];
@@ -1752,22 +1757,22 @@ static int char_make_new_char_sql(struct char_session_data *sd, const char *name
#if PACKETVER >= 20120307
// Insert the new char entry to the database
if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
- "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c')",
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`, `inventory_size`) VALUES ("
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c', '%d')",
char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, 48, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
- mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, sex)) {
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, sex, FIXED_INVENTORY_SIZE)) {
Sql_ShowDebug(inter->sql_handle);
return -2; //No, stop the procedure!
}
#else
//Insert the new char entry to the database
if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
- "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `inventory_size`) VALUES ("
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%d')",
char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
- mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
+ mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, FIXED_INVENTORY_SIZE) )
{
Sql_ShowDebug(inter->sql_handle);
return -2; //No, stop the procedure!
@@ -2141,15 +2146,20 @@ static void char_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data
WFIFOSET(fd, p->packetLen);
// send empty packet if chars count is 3, for trigger final code in client
if (count == 3) {
- WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
- p = WFIFOP(fd, 0);
- p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
- p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
- WFIFOSET(fd, p->packetLen);
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
}
#endif
}
+static void char_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd)
+{
+ WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
+ struct PACKET_HC_ACK_CHARINFO_PER_PAGE *p = WFIFOP(fd, 0);
+ p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
+ p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
+ WFIFOSET(fd, p->packetLen);
+}
+
/* Sends character ban list */
/* Made Possible by Yommy~! <3 */
static void char_mmo_char_send_ban_list(int fd, struct char_session_data *sd)
@@ -2381,19 +2391,29 @@ static void char_ping_login_server(int fd)
static int char_parse_fromlogin_connection_state(int fd)
{
- if (RFIFOB(fd,2)) {
- //printf("connect login server error : %d\n", RFIFOB(fd,2));
+ switch (RFIFOB(fd,2)) {
+ case 0:
+ ShowStatus("Connected to login-server (connection #%d).\n", fd);
+ loginif->on_ready();
+ break;
+ case 1: // Invalid username/password
ShowError("Can not connect to login-server.\n");
ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
ShowError("Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.\n");
ShowError("The communication passwords are set in /conf/map/map-server.conf and /conf/char/char-server.conf\n");
sockt->eof(fd);
return 1;
- } else {
- ShowStatus("Connected to login-server (connection #%d).\n", fd);
- loginif->on_ready();
+ case 2: // IP not allowed
+ ShowError("Can not connect to login-server.\n");
+ ShowError("Please make sure your IP is allowed in conf/network.conf\n");
+ sockt->eof(fd);
+ return 1;
+ default:
+ ShowError("Invalid response from the login-server. Error code: %d\n", (int)RFIFOB(fd,2));
+ sockt->eof(fd);
+ return 1;
}
- RFIFOSKIP(fd,3);
+ RFIFOSKIP(fd, 3);
return 0;
}
@@ -6474,6 +6494,7 @@ void char_defaults(void)
chr->count_users = char_count_users;
chr->mmo_char_tobuf = char_mmo_char_tobuf;
chr->send_HC_ACK_CHARINFO_PER_PAGE = char_send_HC_ACK_CHARINFO_PER_PAGE;
+ chr->send_HC_ACK_CHARINFO_PER_PAGE_tail = char_send_HC_ACK_CHARINFO_PER_PAGE_tail;
chr->mmo_char_send_ban_list = char_mmo_char_send_ban_list;
chr->mmo_char_send_slots_info = char_mmo_char_send_slots_info;
chr->mmo_char_send_characters = char_mmo_char_send_characters;
diff --git a/src/char/char.h b/src/char/char.h
index 914530537..5de3e2a80 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -149,11 +149,12 @@ struct char_interface {
int (*rename_char_sql) (struct char_session_data *sd, int char_id);
bool (*name_exists) (const char *name, const char *esc_name);
int (*check_char_name) (const char *name, const char *esc_name);
- int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+ int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
int (*divorce_char_sql) (int partner_id1, int partner_id2);
int (*count_users) (void);
int (*mmo_char_tobuf) (uint8* buffer, struct mmo_charstatus* p);
void (*send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+ void (*send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
void (*mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
void (*mmo_char_send_slots_info) (int fd, struct char_session_data* sd);
int (*mmo_char_send_characters) (int fd, struct char_session_data* sd);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 56e1c1ba3..9c0be1629 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1060,7 +1060,7 @@ static bool inter_guild_leave(int guild_id, int account_id, int char_id, int fla
}
// Change member info
-static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class)
{
// Could speed up by manipulating only guild_member
struct guild *g;
@@ -1602,7 +1602,7 @@ static int inter_guild_parse_frommap(int fd)
case 0x3032: mapif->parse_GuildAddMember(fd, RFIFOL(fd,4), RFIFOP(fd,8)); break;
case 0x3033: mapif->parse_GuildMasterChange(fd, RFIFOL(fd,4), RFIFOP(fd,8), RFIFOW(fd,2)-8); break;
case 0x3034: mapif->parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOP(fd,15)); break;
- case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17)); break;
+ case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOL(fd,15),RFIFOL(fd,19)); break;
case 0x3036: mapif->parse_BreakGuild(fd,RFIFOL(fd,2)); break;
case 0x3037: mapif->parse_GuildMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break;
case 0x3039: mapif->parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOP(fd,10), RFIFOW(fd,2)-10); break;
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 33873edcd..4ed0f526e 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -72,7 +72,7 @@ struct inter_guild_interface {
struct guild *(*create) (const char *name, const struct guild_member *master);
bool (*add_member) (int guild_id, const struct guild_member *member, int map_fd);
bool (*leave) (int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd);
- bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int class);
bool (*update_member_info) (int guild_id, int account_id, int char_id, int type, const char *data, int len);
bool (*disband) (int guild_id);
bool (*update_basic_info) (int guild_id, int type, const void *data, int len);
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 8f87becff..d31e7545c 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -160,7 +160,7 @@ static int inter_pet_delete(int pet_id)
return 0;
}
//------------------------------------------------------
-static struct s_pet *inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+static struct s_pet *inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name)
{
nullpo_ret(pet_name);
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 104771735..b5852d441 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -37,7 +37,7 @@ struct inter_pet_interface {
int (*delete_) (int pet_id);
int (*parse_frommap) (int fd);
- struct s_pet *(*create) (int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+ struct s_pet *(*create) (int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
struct s_pet *(*load) (int account_id, int char_id, int pet_id);
};
diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c
index 18c277574..ffa5f5452 100644
--- a/src/char/int_rodex.c
+++ b/src/char/int_rodex.c
@@ -268,7 +268,7 @@ static bool inter_rodex_hasnew(int char_id, int account_id)
}
/// Checks player name and retrieves some data
-static bool inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level)
+static bool inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level)
{
char esc_name[NAME_LENGTH * 2 + 1];
bool found = false;
@@ -286,7 +286,7 @@ static bool inter_rodex_checkname(const char *name, int *target_char_id, short *
if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
char *data;
SQL->GetData(inter->sql_handle, 0, &data, NULL); *target_char_id = atoi(data);
- SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = (short)atoi(data);
+ SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = atoi(data);
SQL->GetData(inter->sql_handle, 2, &data, NULL); *target_level = atoi(data);
found = true;
}
@@ -346,11 +346,128 @@ static int64 inter_rodex_savemessage(struct rodex_message *msg)
return msg->id;
}
+static int64 inter_rodex_getzeny(int64 mail_id)
+{
+ Assert_retr(-1, mail_id > 0);
+
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `zeny`, `type` FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
+ Sql_ShowDebug(inter->sql_handle);
+ } else {
+ if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
+ char *data;
+ SQL->GetData(inter->sql_handle, 0, &data, NULL);
+ int64 zeny = atoi(data);
+ SQL->GetData(inter->sql_handle, 1, &data, NULL);
+ uint8 type = atoi(data);
+ SQL->FreeResult(inter->sql_handle);
+ if ((type & MAIL_TYPE_ZENY) == 0)
+ return -1;
+ return zeny;
+ }
+ }
+ SQL->FreeResult(inter->sql_handle);
+
+ return -1;
+}
+
+static int inter_rodex_getitems(int64 mail_id, struct rodex_item *items)
+{
+ Assert_retr(-1, mail_id > 0);
+ nullpo_retr(-1, items);
+
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `type` FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
+ Sql_ShowDebug(inter->sql_handle);
+ return -1;
+ } else {
+ if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) {
+ char *data;
+ SQL->GetData(inter->sql_handle, 0, &data, NULL);
+ uint8 type = atoi(data);
+ SQL->FreeResult(inter->sql_handle);
+ if ((type & MAIL_TYPE_ITEM) == 0)
+ return -1;
+ } else {
+ SQL->FreeResult(inter->sql_handle);
+ return -1;
+ }
+ }
+
+
+ int itemsCount = 0;
+
+ struct SqlStmt *stmt_items = SQL->StmtMalloc(inter->sql_handle);
+
+ if (stmt_items == NULL) {
+ return -1;
+ }
+
+ StringBuf buf;
+ StrBuf->Init(&buf);
+
+ StrBuf->AppendStr(&buf, "SELECT `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`");
+ for (int i = 0; i < MAX_SLOTS; i++) {
+ StrBuf->Printf(&buf, ", `card%d`", i);
+ }
+ for (int i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i);
+ }
+ StrBuf->Printf(&buf, "FROM `%s` WHERE mail_id = ? ORDER BY `mail_id` ASC", rodex_item_db);
+
+ struct item it = { 0 };
+
+ if (SQL_ERROR == SQL->StmtPrepareStr(stmt_items, StrBuf->Value(&buf))
+ || SQL_ERROR == SQL->StmtBindParam(stmt_items, 0, SQLDT_INT64, &mail_id, sizeof mail_id)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+
+ if (SQL_ERROR == SQL->StmtExecute(stmt_items)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 0, SQLDT_INT, &it.nameid, sizeof it.nameid, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 1, SQLDT_SHORT, &it.amount, sizeof it.amount, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 2, SQLDT_UINT, &it.equip, sizeof it.equip, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 3, SQLDT_CHAR, &it.identify, sizeof it.identify, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 4, SQLDT_CHAR, &it.refine, sizeof it.refine, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 5, SQLDT_CHAR, &it.attribute, sizeof it.attribute, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 6, SQLDT_UINT, &it.expire_time, sizeof it.expire_time, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 7, SQLDT_UCHAR, &it.bound, sizeof it.bound, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 8, SQLDT_UINT64, &it.unique_id, sizeof it.unique_id, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (int i = 0; i < MAX_SLOTS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + i, SQLDT_INT, &it.card[i], sizeof it.card[i], NULL, NULL))
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ for (int i = 0; i < MAX_ITEM_OPTIONS; i++) {
+ if (SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].index, sizeof it.option[i].index, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &it.option[i].value, sizeof it.option[i].value, NULL, NULL)
+ ) {
+ SqlStmt_ShowDebug(stmt_items);
+ }
+ }
+
+ for (int i = 0; i < RODEX_MAX_ITEM && SQL_SUCCESS == SQL->StmtNextRow(stmt_items); ++i) {
+ items[i].item = it;
+ items[i].idx = itemsCount;
+ itemsCount++;
+ }
+
+ SQL->StmtFreeResult(stmt_items);
+
+ StrBuf->Destroy(&buf);
+ SQL->StmtFree(stmt_items);
+
+ return itemsCount;
+}
+
/*==========================================
* Update/Delete mail
*------------------------------------------*/
-static bool inter_rodex_updatemail(int64 mail_id, int8 flag)
+static bool inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag)
{
+ Assert_retr(false, fd >= 0);
+ Assert_retr(false, account_id > 0);
+ Assert_retr(false, char_id > 0);
Assert_retr(false, mail_id > 0);
Assert_retr(false, flag >= 0 && flag <= 4);
@@ -361,17 +478,26 @@ static bool inter_rodex_updatemail(int64 mail_id, int8 flag)
break;
case 1: // Get Zeny
- if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
+ {
+ const int64 zeny = inter_rodex->getzeny(mail_id);
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) {
Sql_ShowDebug(inter->sql_handle);
+ break;
+ }
+ mapif->rodex_getzenyack(fd, char_id, mail_id, opentype, zeny);
break;
-
+ }
case 2: // Get Items
+ {
+ struct rodex_item items[RODEX_MAX_ITEM];
+ const int count = inter_rodex->getitems(mail_id, &items[0]);
if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_item_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~4) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
+ mapif->rodex_getitemsack(fd, char_id, mail_id, opentype, count, &items[0]);
break;
-
+ }
case 3: // Delete Mail
if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
@@ -429,4 +555,6 @@ void inter_rodex_defaults(void)
inter_rodex->hasnew = inter_rodex_hasnew;
inter_rodex->checkname = inter_rodex_checkname;
inter_rodex->updatemail = inter_rodex_updatemail;
+ inter_rodex->getzeny = inter_rodex_getzeny;
+ inter_rodex->getitems = inter_rodex_getitems;
}
diff --git a/src/char/int_rodex.h b/src/char/int_rodex.h
index 43e2d891c..a6a172ceb 100644
--- a/src/char/int_rodex.h
+++ b/src/char/int_rodex.h
@@ -34,9 +34,11 @@ struct inter_rodex_interface {
int (*parse_frommap) (int fd);
int (*fromsql) (int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails);
bool (*hasnew) (int char_id, int account_id);
- bool (*checkname) (const char *name, int *target_char_id, short *target_class, int *target_level);
+ bool (*checkname) (const char *name, int *target_char_id, int *target_class, int *target_level);
int64 (*savemessage) (struct rodex_message* msg);
- bool (*updatemail) (int64 mail_id, int8 flag);
+ bool (*updatemail) (int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
+ int64 (*getzeny) (int64 mail_id);
+ int (*getitems) (int64 mail_id, struct rodex_item *items);
};
#ifdef HERCULES_CORE
diff --git a/src/char/inter.c b/src/char/inter.c
index 418c9b0a1..64c840c16 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -73,13 +73,13 @@ static int inter_recv_packet_length[] = {
-1,-1, 7,-1, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000-
6,-1, 6,-1, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- Account Storage, Achievements [Smokexyz]
-1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party
- -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
+ -1, 6,-1,-1, 55,23, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030-
-1, 9, 0, 0, 10,10, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- Clan System(3044-3045)
-1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus], Item Bound [Mhalicot]
6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish]
-1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil]
- 52,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080-
- -1,10,-1, 6, 0, 20,10,11, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets
+ 56,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080-
+ -1,10,-1, 6, 0, 20,10,20, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets
};
static struct DBMap *wis_db = NULL; // int wis_id -> struct WisData*
diff --git a/src/char/mapif.c b/src/char/mapif.c
index dc5735550..8f213ecb5 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -569,7 +569,7 @@ static int mapif_guild_withdraw(int guild_id, int account_id, int char_id, int f
// Send short member's info
static int mapif_guild_memberinfoshort(struct guild *g, int idx)
{
- unsigned char buf[23];
+ unsigned char buf[25];
nullpo_ret(g);
Assert_ret(idx >= 0 && idx < MAX_GUILD);
WBUFW(buf, 0) = 0x3835;
@@ -578,9 +578,9 @@ static int mapif_guild_memberinfoshort(struct guild *g, int idx)
WBUFL(buf, 10) = g->member[idx].char_id;
WBUFB(buf, 14) = (unsigned char)g->member[idx].online;
WBUFW(buf, 15) = g->member[idx].lv;
- WBUFW(buf, 17) = g->member[idx].class;
- WBUFL(buf, 19) = g->member[idx].last_login;
- mapif->sendall(buf, 23);
+ WBUFL(buf, 17) = g->member[idx].class;
+ WBUFL(buf, 21) = g->member[idx].last_login;
+ mapif->sendall(buf, 25);
return 0;
}
@@ -797,7 +797,7 @@ static int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char
}
// Change member info
-static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class)
{
inter_guild->update_member_info_short(guild_id, account_id, char_id, online, lv, class);
return 0;
@@ -1423,18 +1423,18 @@ static int mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, i
static int mapif_pet_created(int fd, int account_id, struct s_pet *p)
{
- WFIFOHEAD(fd, 12);
+ WFIFOHEAD(fd, 14);
WFIFOW(fd, 0) = 0x3880;
WFIFOL(fd, 2) = account_id;
if (p != NULL){
- WFIFOW(fd, 6) = p->class_;
- WFIFOL(fd, 8) = p->pet_id;
+ WFIFOL(fd, 6) = p->class_;
+ WFIFOL(fd, 10) = p->pet_id;
ShowInfo("int_pet: created pet %d - %s\n", p->pet_id, p->name);
} else {
- WFIFOB(fd, 6) = 0;
- WFIFOL(fd, 8) = 0;
+ WFIFOL(fd, 6) = 0;
+ WFIFOL(fd, 10) = 0;
}
- WFIFOSET(fd, 12);
+ WFIFOSET(fd, 14);
return 0;
}
@@ -1521,15 +1521,15 @@ static int mapif_parse_CreatePet(int fd)
account_id = RFIFOL(fd, 2);
pet = inter_pet->create(account_id,
RFIFOL(fd, 6),
- RFIFOW(fd, 10),
- RFIFOW(fd, 12),
+ RFIFOL(fd, 10),
RFIFOL(fd, 14),
RFIFOL(fd, 18),
- RFIFOW(fd, 22),
- RFIFOW(fd, 24),
- RFIFOB(fd, 26),
- RFIFOB(fd, 27),
- RFIFOP(fd, 28));
+ RFIFOL(fd, 22),
+ RFIFOW(fd, 26),
+ RFIFOW(fd, 28),
+ RFIFOB(fd, 30),
+ RFIFOB(fd, 31),
+ RFIFOP(fd, 32));
if (pet != NULL)
mapif->pet_created(fd, account_id, pet);
@@ -1744,10 +1744,13 @@ static void mapif_rodex_sendhasnew(int fd, int char_id, bool has_new)
*------------------------------------------*/
static void mapif_parse_rodex_updatemail(int fd)
{
- int64 mail_id = RFIFOL(fd, 2);
- int8 flag = RFIFOB(fd, 10);
+ int account_id = RFIFOL(fd, 2);
+ int char_id = RFIFOL(fd, 6);
+ int64 mail_id = RFIFOQ(fd, 10);
+ uint8 opentype = RFIFOB(fd, 18);
+ int8 flag = RFIFOB(fd, 19);
- inter_rodex->updatemail(mail_id, flag);
+ inter_rodex->updatemail(fd, account_id, char_id, mail_id, opentype, flag);
}
/*==========================================
@@ -1789,7 +1792,7 @@ static void mapif_parse_rodex_checkname(int fd)
int reqchar_id = RFIFOL(fd, 2);
char name[NAME_LENGTH];
int target_char_id, target_level;
- short target_class;
+ int target_class;
safestrncpy(name, RFIFOP(fd, 6), NAME_LENGTH);
@@ -1799,20 +1802,20 @@ static void mapif_parse_rodex_checkname(int fd)
mapif->rodex_checkname(fd, reqchar_id, 0, 0, 0, name);
}
-static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name)
+static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name)
{
nullpo_retv(name);
Assert_retv(reqchar_id > 0);
Assert_retv(target_char_id >= 0);
- WFIFOHEAD(fd, 16 + NAME_LENGTH);
+ WFIFOHEAD(fd, 18 + NAME_LENGTH);
WFIFOW(fd, 0) = 0x3898;
WFIFOL(fd, 2) = reqchar_id;
WFIFOL(fd, 6) = target_char_id;
- WFIFOW(fd, 10) = target_class;
- WFIFOL(fd, 12) = target_level;
- safestrncpy(WFIFOP(fd, 16), name, NAME_LENGTH);
- WFIFOSET(fd, 16 + NAME_LENGTH);
+ WFIFOL(fd, 10) = target_class;
+ WFIFOL(fd, 14) = target_level;
+ safestrncpy(WFIFOP(fd, 18), name, NAME_LENGTH);
+ WFIFOSET(fd, 18 + NAME_LENGTH);
}
static int mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag)
@@ -2461,6 +2464,29 @@ static void mapif_achievement_save(int char_id, struct char_achievements *p)
inter_achievement->tosql(char_id, cp, p);
}
+static void mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny)
+{
+ WFIFOHEAD(fd, 23);
+ WFIFOW(fd, 0) = 0x3899;
+ WFIFOL(fd, 2) = char_id;
+ WFIFOQ(fd, 6) = zeny;
+ WFIFOQ(fd, 14) = mail_id;
+ WFIFOB(fd, 22) = opentype;
+ WFIFOSET(fd, 23);
+}
+
+static void mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items)
+{
+ WFIFOHEAD(fd, 15 + sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ WFIFOW(fd, 0) = 0x389a;
+ WFIFOL(fd, 2) = char_id;
+ WFIFOQ(fd, 6) = mail_id;
+ WFIFOB(fd, 14) = opentype;
+ WFIFOB(fd, 15) = count;
+ memcpy(WFIFOP(fd, 16), items, sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ WFIFOSET(fd, 16 + sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+}
+
void mapif_defaults(void)
{
mapif = &mapif_s;
@@ -2605,6 +2631,8 @@ void mapif_defaults(void)
mapif->rodex_send = mapif_rodex_send;
mapif->parse_rodex_checkname = mapif_parse_rodex_checkname;
mapif->rodex_checkname = mapif_rodex_checkname;
+ mapif->rodex_getzenyack = mapif_rodex_getzenyack;
+ mapif->rodex_getitemsack = mapif_rodex_getitemsack;
mapif->load_guild_storage = mapif_load_guild_storage;
mapif->save_guild_storage_ack = mapif_save_guild_storage_ack;
mapif->parse_LoadGuildStorage = mapif_parse_LoadGuildStorage;
diff --git a/src/char/mapif.h b/src/char/mapif.h
index bfdefe4ea..71a41f94c 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -24,6 +24,7 @@
#include "common/mmo.h"
struct WisData;
+struct rodex_item;
/**
* mapif interface
@@ -84,7 +85,7 @@ struct mapif_interface {
int (*parse_GuildInfo) (int fd, int guild_id);
int (*parse_GuildAddMember) (int fd, int guild_id, const struct guild_member *m);
int (*parse_GuildLeave) (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
- int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
int (*parse_BreakGuild) (int fd, int guild_id);
int (*parse_GuildMessage) (int fd, int guild_id, int account_id, const char *mes, int len);
int (*parse_GuildBasicInfoChange) (int fd, int guild_id, int type, const void *data, int len);
@@ -167,7 +168,9 @@ struct mapif_interface {
void (*parse_rodex_send) (int fd);
void (*rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result);
void (*parse_rodex_checkname) (int fd);
- void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+ void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
+ void (*rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+ void (*rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
int (*load_guild_storage) (int fd, int account_id, int guild_id, char flag);
int (*save_guild_storage_ack) (int fd, int account_id, int guild_id, int fail);
int (*parse_LoadGuildStorage) (int fd);
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index ecbfc9f2c..02d6c9631 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -230,6 +230,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "party_member", sizeof(struct party_member), SERVER_TYPE_ALL },
{ "point", sizeof(struct point), SERVER_TYPE_ALL },
{ "quest", sizeof(struct quest), SERVER_TYPE_ALL },
+ { "rodex_item", sizeof(struct rodex_item), SERVER_TYPE_ALL },
{ "rodex_maillist", sizeof(struct rodex_maillist), SERVER_TYPE_ALL },
{ "rodex_message", sizeof(struct rodex_message), SERVER_TYPE_ALL },
{ "s_elemental", sizeof(struct s_elemental), SERVER_TYPE_ALL },
@@ -465,7 +466,6 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "hCSData", sizeof(struct hCSData), SERVER_TYPE_MAP },
{ "merge_item", sizeof(struct merge_item), SERVER_TYPE_MAP },
{ "s_packet_db", sizeof(struct s_packet_db), SERVER_TYPE_MAP },
- { "stylist_data_entry", sizeof(struct stylist_data_entry), SERVER_TYPE_MAP },
#else
#define MAP_CLIF_H
#endif // MAP_CLIF_H
@@ -591,8 +591,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "mob_chat", sizeof(struct mob_chat), SERVER_TYPE_MAP },
{ "mob_data", sizeof(struct mob_data), SERVER_TYPE_MAP },
{ "mob_db", sizeof(struct mob_db), SERVER_TYPE_MAP },
+ { "mob_drop", sizeof(struct mob_drop), SERVER_TYPE_MAP },
{ "mob_interface", sizeof(struct mob_interface), SERVER_TYPE_MAP },
{ "mob_skill", sizeof(struct mob_skill), SERVER_TYPE_MAP },
+ { "optdrop_group", sizeof(struct optdrop_group), SERVER_TYPE_MAP },
+ { "optdrop_group_option", sizeof(struct optdrop_group_option), SERVER_TYPE_MAP },
+ { "optdrop_group_optslot", sizeof(struct optdrop_group_optslot), SERVER_TYPE_MAP },
{ "spawn_info", sizeof(struct spawn_info), SERVER_TYPE_MAP },
#else
#define MAP_MOB_H
@@ -963,6 +967,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define MAP_STORAGE_H
#endif // MAP_STORAGE_H
+ #ifdef MAP_STYLIST_H
+ { "stylist_data_entry", sizeof(struct stylist_data_entry), SERVER_TYPE_MAP },
+ { "stylist_interface", sizeof(struct stylist_interface), SERVER_TYPE_MAP },
+ #else
+ #define MAP_STYLIST_H
+ #endif // MAP_STYLIST_H
#ifdef MAP_TRADE_H
{ "trade_interface", sizeof(struct trade_interface), SERVER_TYPE_MAP },
#else
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 6b02b005a..9410f0586 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -281,6 +281,9 @@ struct stringbuf_interface *StrBuf;
#ifdef COMMON_STRLIB_H /* strlib */
struct strlib_interface *strlib;
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+struct stylist_interface *stylist;
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
struct sv_interface *sv;
#endif // COMMON_STRLIB_H
@@ -646,6 +649,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("strlib", strlib))
return "strlib";
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+ if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("stylist", stylist))
+ return "stylist";
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("sv", sv))
return "sv";
diff --git a/src/common/mmo.h b/src/common/mmo.h
index c29da580c..a29b0f2db 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -487,6 +487,7 @@ enum e_mmo_charstatus_opt {
OPT_NONE = 0x0,
OPT_SHOW_EQUIP = 0x1,
OPT_ALLOW_PARTY = 0x2,
+ OPT_ALLOW_CALL = 0x4,
};
enum e_item_bound_type {
@@ -590,7 +591,7 @@ struct s_pet {
int account_id;
int char_id;
int pet_id;
- short class_;
+ int class_;
short level;
int egg_id;//pet egg id
int equip;//pet equip name_id
@@ -606,8 +607,8 @@ struct s_homunculus { //[orn]
char name[NAME_LENGTH];
int hom_id;
int char_id;
- short class_;
- short prev_class;
+ int class_;
+ int prev_class;
int hp,max_hp,sp,max_sp;
unsigned int intimacy;
short hunger;
@@ -638,7 +639,7 @@ struct s_homunculus { //[orn]
struct s_mercenary {
int mercenary_id;
int char_id;
- short class_;
+ int class_;
int hp, sp;
unsigned int kill_count;
unsigned int life_time;
@@ -647,7 +648,7 @@ struct s_mercenary {
struct s_elemental {
int elemental_id;
int char_id;
- short class_;
+ int class_;
uint32 mode;
int hp, sp, max_hp, max_sp, matk, atk, atk2;
short hit, flee, amotion, def, mdef;
@@ -690,7 +691,7 @@ struct mmo_charstatus {
int zeny;
int bank_vault;
- int16 class;
+ int class;
int status_point, skill_point;
int hp,max_hp,sp,max_sp;
unsigned int option;
@@ -733,7 +734,9 @@ struct mmo_charstatus {
#ifdef HOTKEY_SAVING
struct hotkey hotkeys[MAX_HOTKEYS];
#endif
- bool show_equip, allow_party;
+ bool show_equip;
+ bool allow_party;
+ bool allow_call;
unsigned short rename;
unsigned short slotchange;
@@ -805,7 +808,7 @@ struct party_member {
int account_id;
int char_id;
char name[NAME_LENGTH];
- int16 class;
+ int class;
unsigned short map;
unsigned short lv;
unsigned leader : 1,
@@ -825,7 +828,7 @@ struct map_session_data;
struct guild_member {
int account_id, char_id;
short hair,hair_color,gender;
- int16 class;
+ int class;
short lv;
uint64 exp;
int exp_payper;
@@ -975,6 +978,11 @@ enum fame_list_type {
RANKTYPE_PK = 3, //Not supported yet
};
+struct rodex_item {
+ struct item item;
+ int idx;
+};
+
struct rodex_message {
int64 id;
int sender_id;
@@ -984,10 +992,7 @@ struct rodex_message {
char receiver_name[NAME_LENGTH];
char title[RODEX_TITLE_LENGTH];
char body[RODEX_BODY_LENGTH];
- struct {
- struct item item;
- int idx;
- } items[RODEX_MAX_ITEM];
+ struct rodex_item items[RODEX_MAX_ITEM];
int64 zeny;
uint8 type;
int8 opentype;
diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h
index f7ad59577..79c8d3f51 100644
--- a/src/common/packets/packets2019_len_main.h
+++ b/src/common/packets/packets2019_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2019 Hercules Dev Team
- * Copyright (C) 2019 Andrei Karas (4144)
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3787,7 +3787,7 @@ packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
packetLen(0x0a44, -1) // ZC_GROUP_LIST
// Packet: 0x0a46
-packetLen(0x0a46, 14)
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
// Packet: 0x0a47
packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
@@ -3994,13 +3994,13 @@ packetLen(0x0a95, 4)
packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
// Packet: 0x0a97
-packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_EQUIP
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
// Packet: 0x0a98
packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
// Packet: 0x0a99
-packetLen(0x0a99, 4)
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
// Packet: 0x0a9a
packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
@@ -4009,10 +4009,10 @@ packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
// Packet: 0x0a9c
-packetLen(0x0a9c, 2)
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
// Packet: 0x0a9d
-packetLen(0x0a9d, 4)
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
// Packet: 0x0a9e
packetLen(0x0a9e, 2)
@@ -4168,7 +4168,7 @@ packetLen(0x0acf, 68) // CA_LOGIN_OTP
packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
-packetLen(0x0ad1, -1)
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
// Packet: 0x0ad2
packetLen(0x0ad2, 30)
@@ -4288,7 +4288,7 @@ packetLen(0x0afa, 54)
packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
// Packet: 0x0afc
-packetLen(0x0afc, 16)
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
// Packet: 0x0afd
packetLen(0x0afd, -1) // ZC_GUILD_POSITION
@@ -4375,7 +4375,62 @@ packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
// Packet: 0x0b1a
-packetLen(0x0b1a, 29)
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190213
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190227
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190227
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190227
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190306
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271)
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b21, 10)
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b22, 6)
+#endif
+
+// Packet: 0x0b23
+#if PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b23, 10)
+#endif
#endif /* COMMON_PACKETS2019_LEN_MAIN_H */
diff --git a/src/common/packets/packets2019_len_re.h b/src/common/packets/packets2019_len_re.h
index 134102bac..c43b65cd9 100644
--- a/src/common/packets/packets2019_len_re.h
+++ b/src/common/packets/packets2019_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2019 Hercules Dev Team
- * Copyright (C) 2019 Andrei Karas (4144)
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -3793,7 +3793,7 @@ packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
packetLen(0x0a44, -1) // ZC_GROUP_LIST
// Packet: 0x0a46
-packetLen(0x0a46, 14)
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
// Packet: 0x0a47
packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
@@ -4000,13 +4000,13 @@ packetLen(0x0a95, 4)
packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
// Packet: 0x0a97
-packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_EQUIP
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
// Packet: 0x0a98
packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
// Packet: 0x0a99
-packetLen(0x0a99, 4)
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
// Packet: 0x0a9a
packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
@@ -4015,10 +4015,10 @@ packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
// Packet: 0x0a9c
-packetLen(0x0a9c, 2)
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
// Packet: 0x0a9d
-packetLen(0x0a9d, 4)
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
// Packet: 0x0a9e
packetLen(0x0a9e, 2)
@@ -4174,7 +4174,7 @@ packetLen(0x0acf, 68) // CA_LOGIN_OTP
packetLen(0x0ad0, 11) // CA_OTP_CODE
// Packet: 0x0ad1
-packetLen(0x0ad1, -1)
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
// Packet: 0x0ad2
packetLen(0x0ad2, 30)
@@ -4294,7 +4294,7 @@ packetLen(0x0afa, 54)
packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
// Packet: 0x0afc
-packetLen(0x0afc, 16)
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
// Packet: 0x0afd
packetLen(0x0afd, -1) // ZC_GUILD_POSITION
@@ -4381,7 +4381,62 @@ packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
// Packet: 0x0b1a
-packetLen(0x0b1a, 29)
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190213
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190220
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190220
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190227
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190306
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190403
+packetLen(0x0b20, 271)
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190403
+packetLen(0x0b21, 13)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b21, 10)
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190403
+packetLen(0x0b22, 5)
+#elif PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b22, 6)
+#endif
+
+// Packet: 0x0b23
+#if PACKETVER >= 20190306
+// removed
+#elif PACKETVER >= 20190227
+packetLen(0x0b23, 10)
+#endif
#endif /* COMMON_PACKETS2019_LEN_RE_H */
diff --git a/src/common/packets/packets2019_len_zero.h b/src/common/packets/packets2019_len_zero.h
new file mode 100644
index 000000000..85098505a
--- /dev/null
+++ b/src/common/packets/packets2019_len_zero.h
@@ -0,0 +1,4421 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_PACKETS2019_LEN_ZERO_H
+#define COMMON_PACKETS2019_LEN_ZERO_H
+
+/* This file is autogenerated, please do not commit manual changes */
+
+// Packet: 0x0064
+packetLen(0x0064, 55) // CA_LOGIN
+
+// Packet: 0x0065
+packetLen(0x0065, 17) // CH_ENTER
+
+// Packet: 0x0066
+packetLen(0x0066, 3) // CH_SELECT_CHAR
+
+// Packet: 0x0067
+packetLen(0x0067, 37) // CH_MAKE_CHAR
+
+// Packet: 0x0068
+packetLen(0x0068, 46) // CH_DELETE_CHAR
+
+// Packet: 0x0069
+packetLen(0x0069, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x006a
+packetLen(0x006a, 23) // AC_REFUSE_LOGIN
+
+// Packet: 0x006b
+packetLen(0x006b, -1) // HC_ACCEPT_ENTER
+
+// Packet: 0x006c
+packetLen(0x006c, 3) // HC_REFUSE_ENTER
+
+// Packet: 0x006d
+packetLen(0x006d, 157) // HC_ACCEPT_MAKECHAR
+
+// Packet: 0x006e
+packetLen(0x006e, 3) // HC_REFUSE_MAKECHAR
+
+// Packet: 0x006f
+packetLen(0x006f, 2) // HC_ACCEPT_DELETECHAR
+
+// Packet: 0x0070
+packetLen(0x0070, 3) // HC_REFUSE_DELETECHAR
+
+// Packet: 0x0071
+packetLen(0x0071, 28) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0072
+packetLen(0x0072, 22) // CZ_ENTER
+
+// Packet: 0x0073
+packetLen(0x0073, 11) // ZC_ACCEPT_ENTER
+
+// Packet: 0x0074
+packetLen(0x0074, 3) // ZC_REFUSE_ENTER
+
+// Packet: 0x0075
+packetLen(0x0075, -1) // ZC_NOTIFY_INITCHAR
+
+// Packet: 0x0076
+packetLen(0x0076, 9) // ZC_NOTIFY_UPDATECHAR
+
+// Packet: 0x0077
+packetLen(0x0077, 5) // ZC_NOTIFY_UPDATEPLAYER
+
+// Packet: 0x0078
+packetLen(0x0078, 55) // ZC_NOTIFY_STANDENTRY
+
+// Packet: 0x0079
+packetLen(0x0079, 53) // ZC_NOTIFY_NEWENTRY
+
+// Packet: 0x007a
+packetLen(0x007a, 58) // ZC_NOTIFY_ACTENTRY
+
+// Packet: 0x007b
+packetLen(0x007b, 60) // ZC_NOTIFY_MOVEENTRY
+
+// Packet: 0x007c
+packetLen(0x007c, 44) // ZC_NOTIFY_STANDENTRY_NPC
+
+// Packet: 0x007d
+packetLen(0x007d, 2) // CZ_NOTIFY_ACTORINIT
+
+// Packet: 0x007e
+packetLen(0x007e, 105) // CZ_REQUEST_TIME
+
+// Packet: 0x007f
+packetLen(0x007f, 6) // ZC_NOTIFY_TIME
+
+// Packet: 0x0080
+packetLen(0x0080, 7) // ZC_NOTIFY_VANISH
+
+// Packet: 0x0081
+packetLen(0x0081, 3) // SC_NOTIFY_BAN
+
+// Packet: 0x0082
+packetLen(0x0082, 2) // CZ_REQUEST_QUIT
+
+// Packet: 0x0083
+packetLen(0x0083, 2) // ZC_ACCEPT_QUIT
+
+// Packet: 0x0084
+packetLen(0x0084, 2) // ZC_REFUSE_QUIT
+
+// Packet: 0x0085
+packetLen(0x0085, 10) // CZ_REQUEST_MOVE
+
+// Packet: 0x0086
+packetLen(0x0086, 16) // ZC_NOTIFY_MOVE
+
+// Packet: 0x0087
+packetLen(0x0087, 12) // ZC_NOTIFY_PLAYERMOVE
+
+// Packet: 0x0088
+packetLen(0x0088, 10) // ZC_STOPMOVE
+
+// Packet: 0x0089
+packetLen(0x0089, 11) // CZ_REQUEST_ACT
+
+// Packet: 0x008a
+packetLen(0x008a, 29) // ZC_NOTIFY_ACT
+
+// Packet: 0x008b
+packetLen(0x008b, 23) // ZC_NOTIFY_ACT_POSITION
+
+// Packet: 0x008c
+packetLen(0x008c, 14)
+
+// Packet: 0x008d
+packetLen(0x008d, -1) // ZC_NOTIFY_CHAT
+
+// Packet: 0x008e
+packetLen(0x008e, -1) // ZC_NOTIFY_PLAYERCHAT
+
+// Packet: 0x0090
+packetLen(0x0090, 7) // CZ_CONTACTNPC
+
+// Packet: 0x0091
+packetLen(0x0091, 22) // ZC_NPCACK_MAPMOVE
+
+// Packet: 0x0092
+packetLen(0x0092, 28) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0093
+packetLen(0x0093, 2) // ZC_NPCACK_ENABLE
+
+// Packet: 0x0094
+packetLen(0x0094, 19) // CZ_REQNAME
+
+// Packet: 0x0095
+packetLen(0x0095, 30) // ZC_ACK_REQNAME
+
+// Packet: 0x0096
+packetLen(0x0096, -1) // CZ_WHISPER
+
+// Packet: 0x0097
+packetLen(0x0097, -1) // ZC_WHISPER
+
+// Packet: 0x0098
+packetLen(0x0098, 3) // ZC_ACK_WHISPER
+
+// Packet: 0x0099
+packetLen(0x0099, -1) // CZ_BROADCAST
+
+// Packet: 0x009a
+packetLen(0x009a, -1) // ZC_BROADCAST
+
+// Packet: 0x009b
+packetLen(0x009b, 34) // CZ_CHANGE_DIRECTION
+
+// Packet: 0x009c
+packetLen(0x009c, 9) // ZC_CHANGE_DIRECTION
+
+// Packet: 0x009d
+packetLen(0x009d, 19) // ZC_ITEM_ENTRY
+
+// Packet: 0x009e
+packetLen(0x009e, 19) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x009f
+packetLen(0x009f, 20) // CZ_ITEM_PICKUP
+
+// Packet: 0x00a0
+packetLen(0x00a0, 33) // ZC_ITEM_PICKUP_ACK
+
+// Packet: 0x00a1
+packetLen(0x00a1, 6) // ZC_ITEM_DISAPPEAR
+
+// Packet: 0x00a2
+packetLen(0x00a2, 14) // CZ_ITEM_THROW
+
+// Packet: 0x00a3
+packetLen(0x00a3, -1) // ZC_NORMAL_ITEMLIST
+
+// Packet: 0x00a4
+packetLen(0x00a4, -1) // ZC_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a5
+packetLen(0x00a5, -1) // ZC_STORE_NORMAL_ITEMLIST
+
+// Packet: 0x00a6
+packetLen(0x00a6, -1) // ZC_STORE_EQUIPMENT_ITEMLIST
+
+// Packet: 0x00a7
+packetLen(0x00a7, 9)
+
+// Packet: 0x00a8
+packetLen(0x00a8, 7) // ZC_USE_ITEM_ACK
+
+// Packet: 0x00a9
+packetLen(0x00a9, 6) // CZ_REQ_WEAR_EQUIP
+
+// Packet: 0x00aa
+packetLen(0x00aa, 9) // ZC_REQ_WEAR_EQUIP_ACK
+
+// Packet: 0x00ab
+packetLen(0x00ab, 4) // CZ_REQ_TAKEOFF_EQUIP
+
+// Packet: 0x00ac
+packetLen(0x00ac, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK
+
+// Packet: 0x00ae
+packetLen(0x00ae, -1) // ZC_REQ_ITEM_EXPLANATION_ACK
+
+// Packet: 0x00af
+packetLen(0x00af, 6) // ZC_ITEM_THROW_ACK
+
+// Packet: 0x00b0
+packetLen(0x00b0, 8) // ZC_PAR_CHANGE
+
+// Packet: 0x00b1
+packetLen(0x00b1, 8) // ZC_LONGPAR_CHANGE
+
+// Packet: 0x00b2
+packetLen(0x00b2, 3) // CZ_RESTART
+
+// Packet: 0x00b3
+packetLen(0x00b3, 3) // ZC_RESTART_ACK
+
+// Packet: 0x00b4
+packetLen(0x00b4, -1) // ZC_SAY_DIALOG
+
+// Packet: 0x00b5
+packetLen(0x00b5, 6) // ZC_WAIT_DIALOG
+
+// Packet: 0x00b6
+packetLen(0x00b6, 6) // ZC_CLOSE_DIALOG
+
+// Packet: 0x00b7
+packetLen(0x00b7, -1) // ZC_MENU_LIST
+
+// Packet: 0x00b8
+packetLen(0x00b8, 7) // CZ_CHOOSE_MENU
+
+// Packet: 0x00b9
+packetLen(0x00b9, 6) // CZ_REQ_NEXT_SCRIPT
+
+// Packet: 0x00ba
+packetLen(0x00ba, 2) // CZ_REQ_STATUS
+
+// Packet: 0x00bb
+packetLen(0x00bb, 5) // CZ_STATUS_CHANGE
+
+// Packet: 0x00bc
+packetLen(0x00bc, 6) // ZC_STATUS_CHANGE_ACK
+
+// Packet: 0x00bd
+packetLen(0x00bd, 44) // ZC_STATUS
+
+// Packet: 0x00be
+packetLen(0x00be, 5) // ZC_STATUS_CHANGE
+
+// Packet: 0x00bf
+packetLen(0x00bf, 3) // CZ_REQ_EMOTION
+
+// Packet: 0x00c0
+packetLen(0x00c0, 7) // ZC_EMOTION
+
+// Packet: 0x00c1
+packetLen(0x00c1, 2) // CZ_REQ_USER_COUNT
+
+// Packet: 0x00c2
+packetLen(0x00c2, 6) // ZC_USER_COUNT
+
+// Packet: 0x00c3
+packetLen(0x00c3, 8) // ZC_SPRITE_CHANGE
+
+// Packet: 0x00c4
+packetLen(0x00c4, 6) // ZC_SELECT_DEALTYPE
+
+// Packet: 0x00c5
+packetLen(0x00c5, 7) // CZ_ACK_SELECT_DEALTYPE
+
+// Packet: 0x00c6
+packetLen(0x00c6, -1) // ZC_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c7
+packetLen(0x00c7, -1) // ZC_PC_SELL_ITEMLIST
+
+// Packet: 0x00c8
+packetLen(0x00c8, -1) // CZ_PC_PURCHASE_ITEMLIST
+
+// Packet: 0x00c9
+packetLen(0x00c9, -1) // CZ_PC_SELL_ITEMLIST
+
+// Packet: 0x00ca
+packetLen(0x00ca, 3) // ZC_PC_PURCHASE_RESULT
+
+// Packet: 0x00cb
+packetLen(0x00cb, 3) // ZC_PC_SELL_RESULT
+
+// Packet: 0x00cc
+packetLen(0x00cc, 6) // CZ_DISCONNECT_CHARACTER
+
+// Packet: 0x00cd
+packetLen(0x00cd, 3) // ZC_ACK_DISCONNECT_CHARACTER
+
+// Packet: 0x00ce
+packetLen(0x00ce, 2) // CZ_DISCONNECT_ALL_CHARACTER
+
+// Packet: 0x00cf
+packetLen(0x00cf, 27) // CZ_SETTING_WHISPER_PC
+
+// Packet: 0x00d0
+packetLen(0x00d0, 3) // CZ_SETTING_WHISPER_STATE
+
+// Packet: 0x00d1
+packetLen(0x00d1, 4) // ZC_SETTING_WHISPER_PC
+
+// Packet: 0x00d2
+packetLen(0x00d2, 4) // ZC_SETTING_WHISPER_STATE
+
+// Packet: 0x00d3
+packetLen(0x00d3, 2) // CZ_REQ_WHISPER_LIST
+
+// Packet: 0x00d4
+packetLen(0x00d4, -1) // ZC_WHISPER_LIST
+
+// Packet: 0x00d5
+packetLen(0x00d5, -1) // CZ_CREATE_CHATROOM
+
+// Packet: 0x00d6
+packetLen(0x00d6, 3) // ZC_ACK_CREATE_CHATROOM
+
+// Packet: 0x00d7
+packetLen(0x00d7, -1) // ZC_ROOM_NEWENTRY
+
+// Packet: 0x00d8
+packetLen(0x00d8, 6) // ZC_DESTROY_ROOM
+
+// Packet: 0x00d9
+packetLen(0x00d9, 14) // CZ_REQ_ENTER_ROOM
+
+// Packet: 0x00da
+packetLen(0x00da, 3) // ZC_REFUSE_ENTER_ROOM
+
+// Packet: 0x00db
+packetLen(0x00db, -1) // ZC_ENTER_ROOM
+
+// Packet: 0x00dc
+packetLen(0x00dc, 28) // ZC_MEMBER_NEWENTRY
+
+// Packet: 0x00dd
+packetLen(0x00dd, 29) // ZC_MEMBER_EXIT
+
+// Packet: 0x00de
+packetLen(0x00de, -1) // CZ_CHANGE_CHATROOM
+
+// Packet: 0x00df
+packetLen(0x00df, -1) // ZC_CHANGE_CHATROOM
+
+// Packet: 0x00e0
+packetLen(0x00e0, 30) // CZ_REQ_ROLE_CHANGE
+
+// Packet: 0x00e1
+packetLen(0x00e1, 30) // ZC_ROLE_CHANGE
+
+// Packet: 0x00e2
+packetLen(0x00e2, 26) // CZ_REQ_EXPEL_MEMBER
+
+// Packet: 0x00e3
+packetLen(0x00e3, 2) // CZ_EXIT_ROOM
+
+// Packet: 0x00e4
+packetLen(0x00e4, 6) // CZ_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e5
+packetLen(0x00e5, 26) // ZC_REQ_EXCHANGE_ITEM
+
+// Packet: 0x00e6
+packetLen(0x00e6, 3) // CZ_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e7
+packetLen(0x00e7, 3) // ZC_ACK_EXCHANGE_ITEM
+
+// Packet: 0x00e8
+packetLen(0x00e8, 8) // CZ_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00e9
+packetLen(0x00e9, 29) // ZC_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00ea
+packetLen(0x00ea, 5) // ZC_ACK_ADD_EXCHANGE_ITEM
+
+// Packet: 0x00eb
+packetLen(0x00eb, 2) // CZ_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ec
+packetLen(0x00ec, 3) // ZC_CONCLUDE_EXCHANGE_ITEM
+
+// Packet: 0x00ed
+packetLen(0x00ed, 2) // CZ_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ee
+packetLen(0x00ee, 2) // ZC_CANCEL_EXCHANGE_ITEM
+
+// Packet: 0x00ef
+packetLen(0x00ef, 2) // CZ_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f0
+packetLen(0x00f0, 3) // ZC_EXEC_EXCHANGE_ITEM
+
+// Packet: 0x00f1
+packetLen(0x00f1, 2) // ZC_EXCHANGEITEM_UNDO
+
+// Packet: 0x00f2
+packetLen(0x00f2, 6) // ZC_NOTIFY_STOREITEM_COUNTINFO
+
+// Packet: 0x00f3
+packetLen(0x00f3, -1) // CZ_REQUEST_CHAT
+
+// Packet: 0x00f4
+packetLen(0x00f4, 31) // ZC_ADD_ITEM_TO_STORE
+
+// Packet: 0x00f5
+packetLen(0x00f5, 11) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY
+
+// Packet: 0x00f6
+packetLen(0x00f6, 8) // ZC_DELETE_ITEM_FROM_STORE
+
+// Packet: 0x00f7
+packetLen(0x00f7, 17) // CZ_REQUEST_TIME
+
+// Packet: 0x00f8
+packetLen(0x00f8, 2) // ZC_CLOSE_STORE
+
+// Packet: 0x00f9
+packetLen(0x00f9, 26) // CZ_MAKE_GROUP
+
+// Packet: 0x00fa
+packetLen(0x00fa, 3) // ZC_ACK_MAKE_GROUP
+
+// Packet: 0x00fb
+packetLen(0x00fb, -1) // ZC_GROUP_LIST
+
+// Packet: 0x00fc
+packetLen(0x00fc, 6) // CZ_REQ_JOIN_GROUP
+
+// Packet: 0x00fd
+packetLen(0x00fd, 27) // ZC_ACK_REQ_JOIN_GROUP
+
+// Packet: 0x00fe
+packetLen(0x00fe, 30) // ZC_REQ_JOIN_GROUP
+
+// Packet: 0x00ff
+packetLen(0x00ff, 10) // CZ_JOIN_GROUP
+
+// Packet: 0x0100
+packetLen(0x0100, 2) // CZ_REQ_LEAVE_GROUP
+
+// Packet: 0x0101
+packetLen(0x0101, 6) // ZC_GROUPINFO_CHANGE
+
+// Packet: 0x0102
+packetLen(0x0102, 6) // CZ_CHANGE_GROUPEXPOPTION
+
+// Packet: 0x0103
+packetLen(0x0103, 30) // CZ_REQ_EXPEL_GROUP_MEMBER
+
+// Packet: 0x0104
+packetLen(0x0104, 79) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0105
+packetLen(0x0105, 31) // ZC_DELETE_MEMBER_FROM_GROUP
+
+// Packet: 0x0106
+packetLen(0x0106, 10) // ZC_NOTIFY_HP_TO_GROUPM
+
+// Packet: 0x0107
+packetLen(0x0107, 10) // ZC_NOTIFY_POSITION_TO_GROUPM
+
+// Packet: 0x0108
+packetLen(0x0108, -1) // CZ_REQUEST_CHAT_PARTY
+
+// Packet: 0x0109
+packetLen(0x0109, -1) // ZC_NOTIFY_CHAT_PARTY
+
+// Packet: 0x010a
+packetLen(0x010a, 6) // ZC_MVP_GETTING_ITEM
+
+// Packet: 0x010b
+packetLen(0x010b, 6) // ZC_MVP_GETTING_SPECIAL_EXP
+
+// Packet: 0x010c
+packetLen(0x010c, 6) // ZC_MVP
+
+// Packet: 0x010d
+packetLen(0x010d, 2) // ZC_THROW_MVPITEM
+
+// Packet: 0x010e
+packetLen(0x010e, 11) // ZC_SKILLINFO_UPDATE
+
+// Packet: 0x010f
+packetLen(0x010f, -1) // ZC_SKILLINFO_LIST
+
+// Packet: 0x0110
+packetLen(0x0110, 14) // ZC_ACK_TOUSESKILL
+
+// Packet: 0x0111
+packetLen(0x0111, 39) // ZC_ADD_SKILL
+
+// Packet: 0x0112
+packetLen(0x0112, 4) // CZ_UPGRADE_SKILLLEVEL
+
+// Packet: 0x0113
+packetLen(0x0113, 25) // CZ_USE_SKILL
+
+// Packet: 0x0114
+packetLen(0x0114, 31) // ZC_NOTIFY_SKILL
+
+// Packet: 0x0115
+packetLen(0x0115, 35) // ZC_NOTIFY_SKILL_POSITION
+
+// Packet: 0x0116
+packetLen(0x0116, 17) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0117
+packetLen(0x0117, 18) // ZC_NOTIFY_GROUNDSKILL
+
+// Packet: 0x0118
+packetLen(0x0118, 2) // CZ_CANCEL_LOCKON
+
+// Packet: 0x0119
+packetLen(0x0119, 13) // ZC_STATE_CHANGE
+
+// Packet: 0x011a
+packetLen(0x011a, 15) // ZC_USE_SKILL
+
+// Packet: 0x011b
+packetLen(0x011b, 20) // CZ_SELECT_WARPPOINT
+
+// Packet: 0x011c
+packetLen(0x011c, 68) // ZC_WARPLIST
+
+// Packet: 0x011d
+packetLen(0x011d, 2) // CZ_REMEMBER_WARPPOINT
+
+// Packet: 0x011e
+packetLen(0x011e, 3) // ZC_ACK_REMEMBER_WARPPOINT
+
+// Packet: 0x011f
+packetLen(0x011f, 16) // ZC_SKILL_ENTRY
+
+// Packet: 0x0120
+packetLen(0x0120, 6) // ZC_SKILL_DISAPPEAR
+
+// Packet: 0x0121
+packetLen(0x0121, 14) // ZC_NOTIFY_CARTITEM_COUNTINFO
+
+// Packet: 0x0122
+packetLen(0x0122, -1) // ZC_CART_EQUIPMENT_ITEMLIST
+
+// Packet: 0x0123
+packetLen(0x0123, -1) // ZC_CART_NORMAL_ITEMLIST
+
+// Packet: 0x0124
+packetLen(0x0124, 31) // ZC_ADD_ITEM_TO_CART
+
+// Packet: 0x0125
+packetLen(0x0125, 8) // ZC_DELETE_ITEM_FROM_CART
+
+// Packet: 0x0126
+packetLen(0x0126, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_CART
+
+// Packet: 0x0127
+packetLen(0x0127, 8) // CZ_MOVE_ITEM_FROM_CART_TO_BODY
+
+// Packet: 0x0128
+packetLen(0x0128, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_CART
+
+// Packet: 0x0129
+packetLen(0x0129, 8) // CZ_MOVE_ITEM_FROM_CART_TO_STORE
+
+// Packet: 0x012a
+packetLen(0x012a, 2) // CZ_REQ_CARTOFF
+
+// Packet: 0x012b
+packetLen(0x012b, 2) // ZC_CARTOFF
+
+// Packet: 0x012c
+packetLen(0x012c, 3) // ZC_ACK_ADDITEM_TO_CART
+
+// Packet: 0x012d
+packetLen(0x012d, 4) // ZC_OPENSTORE
+
+// Packet: 0x012e
+packetLen(0x012e, 2) // CZ_REQ_CLOSESTORE
+
+// Packet: 0x012f
+packetLen(0x012f, -1) // CZ_REQ_OPENSTORE
+
+// Packet: 0x0130
+packetLen(0x0130, 6) // CZ_REQ_BUY_FROMMC
+
+// Packet: 0x0131
+packetLen(0x0131, 86) // ZC_STORE_ENTRY
+
+// Packet: 0x0132
+packetLen(0x0132, 6) // ZC_DISAPPEAR_ENTRY
+
+// Packet: 0x0133
+packetLen(0x0133, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0134
+packetLen(0x0134, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC
+
+// Packet: 0x0135
+packetLen(0x0135, 7) // ZC_PC_PURCHASE_RESULT_FROMMC
+
+// Packet: 0x0136
+packetLen(0x0136, -1) // ZC_PC_PURCHASE_MYITEMLIST
+
+// Packet: 0x0137
+packetLen(0x0137, 6) // ZC_DELETEITEM_FROM_MCSTORE
+
+// Packet: 0x0138
+packetLen(0x0138, 3) // CZ_PKMODE_CHANGE
+
+// Packet: 0x0139
+packetLen(0x0139, 16) // ZC_ATTACK_FAILURE_FOR_DISTANCE
+
+// Packet: 0x013a
+packetLen(0x013a, 4) // ZC_ATTACK_RANGE
+
+// Packet: 0x013b
+packetLen(0x013b, 4) // ZC_ACTION_FAILURE
+
+// Packet: 0x013c
+packetLen(0x013c, 4) // ZC_EQUIP_ARROW
+
+// Packet: 0x013d
+packetLen(0x013d, 6) // ZC_RECOVERY
+
+// Packet: 0x013e
+packetLen(0x013e, 24) // ZC_USESKILL_ACK
+
+// Packet: 0x013f
+packetLen(0x013f, 26) // CZ_ITEM_CREATE
+
+// Packet: 0x0140
+packetLen(0x0140, 22) // CZ_MOVETO_MAP
+
+// Packet: 0x0141
+packetLen(0x0141, 14) // ZC_COUPLESTATUS
+
+// Packet: 0x0142
+packetLen(0x0142, 6) // ZC_OPEN_EDITDLG
+
+// Packet: 0x0143
+packetLen(0x0143, 10) // CZ_INPUT_EDITDLG
+
+// Packet: 0x0144
+packetLen(0x0144, 23) // ZC_COMPASS
+
+// Packet: 0x0145
+packetLen(0x0145, 19) // ZC_SHOW_IMAGE
+
+// Packet: 0x0146
+packetLen(0x0146, 6) // CZ_CLOSE_DIALOG
+
+// Packet: 0x0147
+packetLen(0x0147, 39) // ZC_AUTORUN_SKILL
+
+// Packet: 0x0148
+packetLen(0x0148, 8) // ZC_RESURRECTION
+
+// Packet: 0x0149
+packetLen(0x0149, 9) // CZ_REQ_GIVE_MANNER_POINT
+
+// Packet: 0x014a
+packetLen(0x014a, 6) // ZC_ACK_GIVE_MANNER_POINT
+
+// Packet: 0x014b
+packetLen(0x014b, 27) // ZC_NOTIFY_MANNER_POINT_GIVEN
+
+// Packet: 0x014c
+packetLen(0x014c, -1) // ZC_MYGUILD_BASIC_INFO
+
+// Packet: 0x014d
+packetLen(0x014d, 2) // CZ_REQ_GUILD_MENUINTERFACE
+
+// Packet: 0x014e
+packetLen(0x014e, 6) // ZC_ACK_GUILD_MENUINTERFACE
+
+// Packet: 0x014f
+packetLen(0x014f, 6) // CZ_REQ_GUILD_MENU
+
+// Packet: 0x0150
+packetLen(0x0150, 110) // ZC_GUILD_INFO
+
+// Packet: 0x0151
+packetLen(0x0151, 6) // CZ_REQ_GUILD_EMBLEM_IMG
+
+// Packet: 0x0152
+packetLen(0x0152, -1) // ZC_GUILD_EMBLEM_IMG
+
+// Packet: 0x0153
+packetLen(0x0153, -1) // CZ_REGISTER_GUILD_EMBLEM_IMG
+
+// Packet: 0x0154
+packetLen(0x0154, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0155
+packetLen(0x0155, -1) // CZ_REQ_CHANGE_MEMBERPOS
+
+// Packet: 0x0156
+packetLen(0x0156, -1) // ZC_ACK_REQ_CHANGE_MEMBERS
+
+// Packet: 0x0157
+packetLen(0x0157, 6) // CZ_REQ_OPEN_MEMBER_INFO
+
+// Packet: 0x0159
+packetLen(0x0159, 54) // CZ_REQ_LEAVE_GUILD
+
+// Packet: 0x015a
+packetLen(0x015a, 66) // ZC_ACK_LEAVE_GUILD
+
+// Packet: 0x015b
+packetLen(0x015b, 54) // CZ_REQ_BAN_GUILD
+
+// Packet: 0x015c
+packetLen(0x015c, 90) // ZC_ACK_BAN_GUILD
+
+// Packet: 0x015d
+packetLen(0x015d, 42) // CZ_REQ_DISORGANIZE_GUILD
+
+// Packet: 0x015e
+packetLen(0x015e, 6) // ZC_ACK_DISORGANIZE_GUILD_RESULT
+
+// Packet: 0x015f
+packetLen(0x015f, 42) // ZC_ACK_DISORGANIZE_GUILD
+
+// Packet: 0x0160
+packetLen(0x0160, -1) // ZC_POSITION_INFO
+
+// Packet: 0x0161
+packetLen(0x0161, -1) // CZ_REG_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0162
+packetLen(0x0162, -1) // ZC_GUILD_SKILLINFO
+
+// Packet: 0x0163
+packetLen(0x0163, -1) // ZC_BAN_LIST
+
+// Packet: 0x0164
+packetLen(0x0164, -1) // ZC_OTHER_GUILD_LIST
+
+// Packet: 0x0165
+packetLen(0x0165, 30) // CZ_REQ_MAKE_GUILD
+
+// Packet: 0x0166
+packetLen(0x0166, -1) // ZC_POSITION_ID_NAME_INFO
+
+// Packet: 0x0167
+packetLen(0x0167, 3) // ZC_RESULT_MAKE_GUILD
+
+// Packet: 0x0168
+packetLen(0x0168, 14) // CZ_REQ_JOIN_GUILD
+
+// Packet: 0x0169
+packetLen(0x0169, 3) // ZC_ACK_REQ_JOIN_GUILD
+
+// Packet: 0x016a
+packetLen(0x016a, 30) // ZC_REQ_JOIN_GUILD
+
+// Packet: 0x016b
+packetLen(0x016b, 10) // CZ_JOIN_GUILD
+
+// Packet: 0x016c
+packetLen(0x016c, 43) // ZC_UPDATE_GDID
+
+// Packet: 0x016d
+packetLen(0x016d, 14) // ZC_UPDATE_CHARSTAT
+
+// Packet: 0x016e
+packetLen(0x016e, 186) // CZ_GUILD_NOTICE
+
+// Packet: 0x016f
+packetLen(0x016f, 182) // ZC_GUILD_NOTICE
+
+// Packet: 0x0170
+packetLen(0x0170, 14) // CZ_REQ_ALLY_GUILD
+
+// Packet: 0x0171
+packetLen(0x0171, 30) // ZC_REQ_ALLY_GUILD
+
+// Packet: 0x0172
+packetLen(0x0172, 10) // CZ_ALLY_GUILD
+
+// Packet: 0x0173
+packetLen(0x0173, 3) // ZC_ACK_REQ_ALLY_GUILD
+
+// Packet: 0x0174
+packetLen(0x0174, -1) // ZC_ACK_CHANGE_GUILD_POSITIONINFO
+
+// Packet: 0x0175
+packetLen(0x0175, 6) // CZ_REQ_GUILD_MEMBER_INFO
+
+// Packet: 0x0176
+packetLen(0x0176, 106) // ZC_ACK_GUILD_MEMBER_INFO
+
+// Packet: 0x0177
+packetLen(0x0177, -1) // ZC_ITEMIDENTIFY_LIST
+
+// Packet: 0x0178
+packetLen(0x0178, 4) // CZ_REQ_ITEMIDENTIFY
+
+// Packet: 0x0179
+packetLen(0x0179, 5) // ZC_ACK_ITEMIDENTIFY
+
+// Packet: 0x017a
+packetLen(0x017a, 4) // CZ_REQ_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017b
+packetLen(0x017b, -1) // ZC_ITEMCOMPOSITION_LIST
+
+// Packet: 0x017c
+packetLen(0x017c, 6) // CZ_REQ_ITEMCOMPOSITION
+
+// Packet: 0x017d
+packetLen(0x017d, 7) // ZC_ACK_ITEMCOMPOSITION
+
+// Packet: 0x017e
+packetLen(0x017e, -1) // CZ_GUILD_CHAT
+
+// Packet: 0x017f
+packetLen(0x017f, -1) // ZC_GUILD_CHAT
+
+// Packet: 0x0180
+packetLen(0x0180, 6) // CZ_REQ_HOSTILE_GUILD
+
+// Packet: 0x0181
+packetLen(0x0181, 3) // ZC_ACK_REQ_HOSTILE_GUILD
+
+// Packet: 0x0182
+packetLen(0x0182, 106) // ZC_MEMBER_ADD
+
+// Packet: 0x0183
+packetLen(0x0183, 10) // CZ_REQ_DELETE_RELATED_GUILD
+
+// Packet: 0x0184
+packetLen(0x0184, 10) // ZC_DELETE_RELATED_GUILD
+
+// Packet: 0x0185
+packetLen(0x0185, 34) // ZC_ADD_RELATED_GUILD
+
+// Packet: 0x0187
+packetLen(0x0187, 6) // CH_UNKNOWN_PING
+
+// Packet: 0x0188
+packetLen(0x0188, 8) // ZC_ACK_ITEMREFINING
+
+// Packet: 0x0189
+packetLen(0x0189, 4) // ZC_NOTIFY_MAPINFO
+
+// Packet: 0x018a
+packetLen(0x018a, 4) // CZ_REQ_DISCONNECT
+
+// Packet: 0x018b
+packetLen(0x018b, 4) // ZC_ACK_REQ_DISCONNECT
+
+// Packet: 0x018c
+packetLen(0x018c, 29) // ZC_MONSTER_INFO
+
+// Packet: 0x018d
+packetLen(0x018d, -1) // ZC_MAKABLEITEMLIST
+
+// Packet: 0x018e
+packetLen(0x018e, 18) // CZ_REQMAKINGITEM
+
+// Packet: 0x018f
+packetLen(0x018f, 8) // ZC_ACK_REQMAKINGITEM
+
+// Packet: 0x0190
+packetLen(0x0190, 23) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX
+
+// Packet: 0x0191
+packetLen(0x0191, 86) // ZC_TALKBOX_CHATCONTENTS
+
+// Packet: 0x0192
+packetLen(0x0192, 24) // ZC_UPDATE_MAPINFO
+
+// Packet: 0x0193
+packetLen(0x0193, 2) // CZ_REQNAME_BYGID
+
+// Packet: 0x0194
+packetLen(0x0194, 30) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0195
+packetLen(0x0195, 102) // ZC_ACK_REQNAMEALL
+
+// Packet: 0x0196
+packetLen(0x0196, 9) // ZC_MSG_STATE_CHANGE
+
+// Packet: 0x0197
+packetLen(0x0197, 4) // CZ_RESET
+
+// Packet: 0x0198
+packetLen(0x0198, 8) // CZ_CHANGE_MAPTYPE
+
+// Packet: 0x0199
+packetLen(0x0199, 4) // ZC_NOTIFY_MAPPROPERTY
+
+// Packet: 0x019a
+packetLen(0x019a, 14) // ZC_NOTIFY_RANKING
+
+// Packet: 0x019b
+packetLen(0x019b, 10) // ZC_NOTIFY_EFFECT
+
+// Packet: 0x019c
+packetLen(0x019c, -1) // CZ_LOCALBROADCAST
+
+// Packet: 0x019d
+packetLen(0x019d, 6) // CZ_CHANGE_EFFECTSTATE
+
+// Packet: 0x019e
+packetLen(0x019e, 2) // ZC_START_CAPTURE
+
+// Packet: 0x019f
+packetLen(0x019f, 6) // CZ_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a0
+packetLen(0x01a0, 3) // ZC_TRYCAPTURE_MONSTER
+
+// Packet: 0x01a1
+packetLen(0x01a1, 3) // CZ_COMMAND_PET
+
+// Packet: 0x01a2
+packetLen(0x01a2, 37) // ZC_PROPERTY_PET
+
+// Packet: 0x01a3
+packetLen(0x01a3, 7) // ZC_FEED_PET
+
+// Packet: 0x01a4
+packetLen(0x01a4, 11) // ZC_CHANGESTATE_PET
+
+// Packet: 0x01a5
+packetLen(0x01a5, 26) // CZ_RENAME_PET
+
+// Packet: 0x01a6
+packetLen(0x01a6, -1) // ZC_PETEGG_LIST
+
+// Packet: 0x01a7
+packetLen(0x01a7, 4) // CZ_SELECT_PETEGG
+
+// Packet: 0x01a8
+packetLen(0x01a8, 4) // CZ_PETEGG_INFO
+
+// Packet: 0x01a9
+packetLen(0x01a9, 6) // CZ_PET_ACT
+
+// Packet: 0x01aa
+packetLen(0x01aa, 10) // ZC_PET_ACT
+
+// Packet: 0x01ab
+packetLen(0x01ab, 12) // ZC_PAR_CHANGE_USER
+
+// Packet: 0x01ac
+packetLen(0x01ac, 6) // ZC_SKILL_UPDATE
+
+// Packet: 0x01ad
+packetLen(0x01ad, -1) // ZC_MAKINGARROW_LIST
+
+// Packet: 0x01ae
+packetLen(0x01ae, 6) // CZ_REQ_MAKINGARROW
+
+// Packet: 0x01af
+packetLen(0x01af, 4) // CZ_REQ_CHANGECART
+
+// Packet: 0x01b0
+packetLen(0x01b0, 11) // ZC_NPCSPRITE_CHANGE
+
+// Packet: 0x01b1
+packetLen(0x01b1, 7) // ZC_SHOWDIGIT
+
+// Packet: 0x01b2
+packetLen(0x01b2, -1) // CZ_REQ_OPENSTORE2
+
+// Packet: 0x01b3
+packetLen(0x01b3, 67) // ZC_SHOW_IMAGE2
+
+// Packet: 0x01b4
+packetLen(0x01b4, 12) // ZC_CHANGE_GUILD
+
+// Packet: 0x01b5
+packetLen(0x01b5, 18) // SC_BILLING_INFO
+
+// Packet: 0x01b6
+packetLen(0x01b6, 114) // ZC_GUILD_INFO2
+
+// Packet: 0x01b7
+packetLen(0x01b7, 6) // CZ_GUILD_ZENY
+
+// Packet: 0x01b8
+packetLen(0x01b8, 3) // ZC_GUILD_ZENY_ACK
+
+// Packet: 0x01b9
+packetLen(0x01b9, 6) // ZC_DISPEL
+
+// Packet: 0x01ba
+packetLen(0x01ba, 26) // CZ_REMOVE_AID
+
+// Packet: 0x01bb
+packetLen(0x01bb, 26) // CZ_SHIFT
+
+// Packet: 0x01bc
+packetLen(0x01bc, 26) // CZ_RECALL
+
+// Packet: 0x01bd
+packetLen(0x01bd, 26) // CZ_RECALL_GID
+
+// Packet: 0x01be
+packetLen(0x01be, 2) // AC_ASK_PNGAMEROOM
+
+// Packet: 0x01bf
+packetLen(0x01bf, 3) // CA_REPLY_PNGAMEROOM
+
+// Packet: 0x01c0
+packetLen(0x01c0, 2) // CZ_REQ_REMAINTIME
+
+// Packet: 0x01c1
+packetLen(0x01c1, 14) // ZC_REPLY_REMAINTIME
+
+// Packet: 0x01c2
+packetLen(0x01c2, 10) // ZC_INFO_REMAINTIME
+
+// Packet: 0x01c3
+packetLen(0x01c3, -1) // ZC_BROADCAST2
+
+// Packet: 0x01c4
+packetLen(0x01c4, 32) // ZC_ADD_ITEM_TO_STORE2
+
+// Packet: 0x01c5
+packetLen(0x01c5, 32) // ZC_ADD_ITEM_TO_CART2
+
+// Packet: 0x01c6
+packetLen(0x01c6, 4) // CS_REQ_ENCRYPTION
+
+// Packet: 0x01c7
+packetLen(0x01c7, 2) // SC_ACK_ENCRYPTION
+
+// Packet: 0x01c8
+packetLen(0x01c8, 15) // ZC_USE_ITEM_ACK2
+
+// Packet: 0x01c9
+packetLen(0x01c9, 97) // ZC_SKILL_ENTRY2
+
+// Packet: 0x01ca
+packetLen(0x01ca, 3) // CZ_REQMAKINGHOMUN
+
+// Packet: 0x01cb
+packetLen(0x01cb, 9) // CZ_MONSTER_TALK
+
+// Packet: 0x01cc
+packetLen(0x01cc, 9) // ZC_MONSTER_TALK
+
+// Packet: 0x01cd
+packetLen(0x01cd, 30) // ZC_AUTOSPELLLIST
+
+// Packet: 0x01ce
+packetLen(0x01ce, 6) // CZ_SELECTAUTOSPELL
+
+// Packet: 0x01cf
+packetLen(0x01cf, 28) // ZC_DEVOTIONLIST
+
+// Packet: 0x01d0
+packetLen(0x01d0, 8) // ZC_SPIRITS
+
+// Packet: 0x01d1
+packetLen(0x01d1, 14) // ZC_BLADESTOP
+
+// Packet: 0x01d2
+packetLen(0x01d2, 10) // ZC_COMBODELAY
+
+// Packet: 0x01d3
+packetLen(0x01d3, 35) // ZC_SOUND
+
+// Packet: 0x01d4
+packetLen(0x01d4, 6) // ZC_OPEN_EDITDLGSTR
+
+// Packet: 0x01d5
+packetLen(0x01d5, -1) // CZ_INPUT_EDITDLGSTR
+
+// Packet: 0x01d6
+packetLen(0x01d6, 4) // ZC_NOTIFY_MAPPROPERTY2
+
+// Packet: 0x01d7
+packetLen(0x01d7, 15) // ZC_SPRITE_CHANGE2
+
+// Packet: 0x01d8
+packetLen(0x01d8, 58) // ZC_NOTIFY_STANDENTRY2
+
+// Packet: 0x01d9
+packetLen(0x01d9, 57) // ZC_NOTIFY_NEWENTRY2
+
+// Packet: 0x01da
+packetLen(0x01da, 64) // ZC_NOTIFY_MOVEENTRY2
+
+// Packet: 0x01db
+packetLen(0x01db, 2) // CA_REQ_HASH
+
+// Packet: 0x01dc
+packetLen(0x01dc, -1) // AC_ACK_HASH
+
+// Packet: 0x01dd
+packetLen(0x01dd, 47) // CA_LOGIN2
+
+// Packet: 0x01de
+packetLen(0x01de, 33) // ZC_NOTIFY_SKILL2
+
+// Packet: 0x01df
+packetLen(0x01df, 6) // CZ_REQ_ACCOUNTNAME
+
+// Packet: 0x01e0
+packetLen(0x01e0, 30) // ZC_ACK_ACCOUNTNAME
+
+// Packet: 0x01e1
+packetLen(0x01e1, 8) // ZC_SPIRITS2
+
+// Packet: 0x01e2
+packetLen(0x01e2, 34) // ZC_REQ_COUPLE
+
+// Packet: 0x01e3
+packetLen(0x01e3, 14) // CZ_JOIN_COUPLE
+
+// Packet: 0x01e4
+packetLen(0x01e4, 2) // ZC_START_COUPLE
+
+// Packet: 0x01e5
+packetLen(0x01e5, 6) // CZ_REQ_JOIN_COUPLE
+
+// Packet: 0x01e6
+packetLen(0x01e6, 26) // ZC_COUPLENAME
+
+// Packet: 0x01e7
+packetLen(0x01e7, 2) // CZ_DORIDORI
+
+// Packet: 0x01e8
+packetLen(0x01e8, 28) // CZ_MAKE_GROUP2
+
+// Packet: 0x01e9
+packetLen(0x01e9, 81) // ZC_ADD_MEMBER_TO_GROUP2
+
+// Packet: 0x01ea
+packetLen(0x01ea, 6) // ZC_CONGRATULATION
+
+// Packet: 0x01eb
+packetLen(0x01eb, 10) // ZC_NOTIFY_POSITION_TO_GUILDM
+
+// Packet: 0x01ec
+packetLen(0x01ec, 26) // ZC_GUILD_MEMBER_MAP_CHANGE
+
+// Packet: 0x01ed
+packetLen(0x01ed, 2) // CZ_CHOPOKGI
+
+// Packet: 0x01ee
+packetLen(0x01ee, -1) // ZC_NORMAL_ITEMLIST2
+
+// Packet: 0x01ef
+packetLen(0x01ef, -1) // ZC_CART_NORMAL_ITEMLIST2
+
+// Packet: 0x01f0
+packetLen(0x01f0, -1) // ZC_STORE_NORMAL_ITEMLIST2
+
+// Packet: 0x01f1
+packetLen(0x01f1, -1) // AC_NOTIFY_ERROR
+
+// Packet: 0x01f2
+packetLen(0x01f2, 20) // ZC_UPDATE_CHARSTAT2
+
+// Packet: 0x01f3
+packetLen(0x01f3, 10) // ZC_NOTIFY_EFFECT2
+
+// Packet: 0x01f4
+packetLen(0x01f4, 32) // ZC_REQ_EXCHANGE_ITEM2
+
+// Packet: 0x01f5
+packetLen(0x01f5, 9) // ZC_ACK_EXCHANGE_ITEM2
+
+// Packet: 0x01f6
+packetLen(0x01f6, 34) // ZC_REQ_BABY
+
+// Packet: 0x01f7
+packetLen(0x01f7, 14) // CZ_JOIN_BABY
+
+// Packet: 0x01f8
+packetLen(0x01f8, 2) // ZC_START_BABY
+
+// Packet: 0x01f9
+packetLen(0x01f9, 6) // CZ_REQ_JOIN_BABY
+
+// Packet: 0x01fa
+packetLen(0x01fa, 48) // CA_LOGIN3
+
+// Packet: 0x01fb
+packetLen(0x01fb, 56) // CH_DELETE_CHAR2
+
+// Packet: 0x01fc
+packetLen(0x01fc, -1) // ZC_REPAIRITEMLIST
+
+// Packet: 0x01fd
+packetLen(0x01fd, 25) // CZ_REQ_ITEMREPAIR
+
+// Packet: 0x01fe
+packetLen(0x01fe, 5) // ZC_ACK_ITEMREPAIR
+
+// Packet: 0x01ff
+packetLen(0x01ff, 10) // ZC_HIGHJUMP
+
+// Packet: 0x0200
+packetLen(0x0200, 26) // CA_CONNECT_INFO_CHANGED
+
+// Packet: 0x0201
+packetLen(0x0201, -1) // ZC_FRIENDS_LIST
+
+// Packet: 0x0202
+packetLen(0x0202, 26) // CZ_ADD_FRIENDS
+
+// Packet: 0x0203
+packetLen(0x0203, 10) // CZ_DELETE_FRIENDS
+
+// Packet: 0x0204
+packetLen(0x0204, 18) // CA_EXE_HASHCHECK
+
+// Packet: 0x0205
+packetLen(0x0205, 26) // ZC_DIVORCE
+
+// Packet: 0x0206
+packetLen(0x0206, 35) // ZC_FRIENDS_STATE
+
+// Packet: 0x0207
+packetLen(0x0207, 34) // ZC_REQ_ADD_FRIENDS
+
+// Packet: 0x0208
+packetLen(0x0208, 14) // CZ_ACK_REQ_ADD_FRIENDS
+
+// Packet: 0x0209
+packetLen(0x0209, 36) // ZC_ADD_FRIENDS_LIST
+
+// Packet: 0x020a
+packetLen(0x020a, 10) // ZC_DELETE_FRIENDS
+
+// Packet: 0x020d
+packetLen(0x020d, -1) // HC_BLOCK_CHARACTER
+
+// Packet: 0x020e
+packetLen(0x020e, 32) // ZC_STARSKILL
+
+// Packet: 0x0212
+packetLen(0x0212, 26) // CZ_REQ_GIVE_MANNER_BYNAME
+
+// Packet: 0x0213
+packetLen(0x0213, 26) // CZ_REQ_STATUS_GM
+
+// Packet: 0x0214
+packetLen(0x0214, 42) // ZC_ACK_STATUS_GM
+
+// Packet: 0x0215
+packetLen(0x0215, 6) // ZC_SKILLMSG
+
+// Packet: 0x0216
+packetLen(0x0216, 6) // ZC_BABYMSG
+
+// Packet: 0x0217
+packetLen(0x0217, 2) // CZ_BLACKSMITH_RANK
+
+// Packet: 0x0218
+packetLen(0x0218, 2) // CZ_ALCHEMIST_RANK
+
+// Packet: 0x0219
+packetLen(0x0219, 282) // ZC_BLACKSMITH_RANK
+
+// Packet: 0x021a
+packetLen(0x021a, 282) // ZC_ALCHEMIST_RANK
+
+// Packet: 0x021b
+packetLen(0x021b, 10) // ZC_BLACKSMITH_POINT
+
+// Packet: 0x021c
+packetLen(0x021c, 10) // ZC_ALCHEMIST_POINT
+
+// Packet: 0x021d
+packetLen(0x021d, 6) // CZ_LESSEFFECT
+
+// Packet: 0x021e
+packetLen(0x021e, 6) // ZC_LESSEFFECT
+
+// Packet: 0x021f
+packetLen(0x021f, 66) // ZC_NOTIFY_PKINFO
+
+// Packet: 0x0220
+packetLen(0x0220, 10) // ZC_NOTIFY_CRAZYKILLER
+
+// Packet: 0x0221
+packetLen(0x0221, -1) // ZC_NOTIFY_WEAPONITEMLIST
+
+// Packet: 0x0222
+packetLen(0x0222, 6) // CZ_REQ_WEAPONREFINE
+
+// Packet: 0x0223
+packetLen(0x0223, 10) // ZC_ACK_WEAPONREFINE
+
+// Packet: 0x0224
+packetLen(0x0224, 10) // ZC_TAEKWON_POINT
+
+// Packet: 0x0225
+packetLen(0x0225, 2) // CZ_TAEKWON_RANK
+
+// Packet: 0x0226
+packetLen(0x0226, 282) // ZC_TAEKWON_RANK
+
+// Packet: 0x0227
+packetLen(0x0227, 18) // ZC_GAME_GUARD
+
+// Packet: 0x0228
+packetLen(0x0228, 18) // CZ_ACK_GAME_GUARD
+
+// Packet: 0x0229
+packetLen(0x0229, 15) // ZC_STATE_CHANGE3
+
+// Packet: 0x022a
+packetLen(0x022a, 62) // ZC_NOTIFY_STANDENTRY3
+
+// Packet: 0x022b
+packetLen(0x022b, 61) // ZC_NOTIFY_NEWENTRY3
+
+// Packet: 0x022c
+packetLen(0x022c, 69) // ZC_NOTIFY_MOVEENTRY3
+
+// Packet: 0x022d
+packetLen(0x022d, 5) // CZ_COMMAND_MER
+
+// Packet: 0x022e
+packetLen(0x022e, 73) // ZC_PROPERTY_HOMUN
+
+// Packet: 0x022f
+packetLen(0x022f, 7) // ZC_FEED_MER
+
+// Packet: 0x0230
+packetLen(0x0230, 12) // ZC_CHANGESTATE_MER
+
+// Packet: 0x0231
+packetLen(0x0231, 26) // CZ_RENAME_MER
+
+// Packet: 0x0232
+packetLen(0x0232, 9) // CZ_REQUEST_MOVENPC
+
+// Packet: 0x0233
+packetLen(0x0233, 11) // CZ_REQUEST_ACTNPC
+
+// Packet: 0x0234
+packetLen(0x0234, 6) // CZ_REQUEST_MOVETOOWNER
+
+// Packet: 0x0235
+packetLen(0x0235, -1) // ZC_HOSKILLINFO_LIST
+
+// Packet: 0x0236
+packetLen(0x0236, 10) // ZC_KILLER_POINT
+
+// Packet: 0x0237
+packetLen(0x0237, 2) // CZ_KILLER_RANK
+
+// Packet: 0x0238
+packetLen(0x0238, 282) // ZC_KILLER_RANK
+
+// Packet: 0x0239
+packetLen(0x0239, 11) // ZC_HOSKILLINFO_UPDATE
+
+// Packet: 0x023a
+packetLen(0x023a, 4) // ZC_REQ_STORE_PASSWORD
+
+// Packet: 0x023b
+packetLen(0x023b, 36) // CZ_ACK_STORE_PASSWORD
+
+// Packet: 0x023c
+packetLen(0x023c, 6) // ZC_RESULT_STORE_PASSWORD
+
+// Packet: 0x023d
+packetLen(0x023d, 6) // AC_EVENT_RESULT
+
+// Packet: 0x023e
+packetLen(0x023e, 8) // HC_REQUEST_CHARACTER_PASSWORD
+
+// Packet: 0x023f
+packetLen(0x023f, 2) // CZ_MAIL_GET_LIST
+
+// Packet: 0x0240
+packetLen(0x0240, -1) // ZC_MAIL_REQ_GET_LIST
+
+// Packet: 0x0241
+packetLen(0x0241, 6) // CZ_MAIL_OPEN
+
+// Packet: 0x0242
+packetLen(0x0242, -1) // ZC_MAIL_REQ_OPEN
+
+// Packet: 0x0243
+packetLen(0x0243, 6) // CZ_MAIL_DELETE
+
+// Packet: 0x0244
+packetLen(0x0244, 6) // CZ_MAIL_GET_ITEM
+
+// Packet: 0x0245
+packetLen(0x0245, 3) // ZC_MAIL_REQ_GET_ITEM
+
+// Packet: 0x0246
+packetLen(0x0246, 4) // CZ_MAIL_RESET_ITEM
+
+// Packet: 0x0247
+packetLen(0x0247, 8) // CZ_MAIL_ADD_ITEM
+
+// Packet: 0x0248
+packetLen(0x0248, -1) // CZ_MAIL_SEND
+
+// Packet: 0x0249
+packetLen(0x0249, 3) // ZC_MAIL_REQ_SEND
+
+// Packet: 0x024a
+packetLen(0x024a, 70) // ZC_MAIL_RECEIVE
+
+// Packet: 0x024b
+packetLen(0x024b, 4) // CZ_AUCTION_CREATE
+
+// Packet: 0x024c
+packetLen(0x024c, 8) // CZ_AUCTION_ADD_ITEM
+
+// Packet: 0x024d
+packetLen(0x024d, 12) // CZ_AUCTION_ADD
+
+// Packet: 0x024e
+packetLen(0x024e, 6) // CZ_AUCTION_ADD_CANCEL
+
+// Packet: 0x024f
+packetLen(0x024f, 10) // CZ_AUCTION_BUY
+
+// Packet: 0x0250
+packetLen(0x0250, 3) // ZC_AUCTION_RESULT
+
+// Packet: 0x0251
+packetLen(0x0251, 34) // CZ_AUCTION_ITEM_SEARCH
+
+// Packet: 0x0252
+packetLen(0x0252, -1) // ZC_AUCTION_ITEM_REQ_SEARCH
+
+// Packet: 0x0253
+packetLen(0x0253, 3) // ZC_STARPLACE
+
+// Packet: 0x0254
+packetLen(0x0254, 3) // CZ_AGREE_STARPLACE
+
+// Packet: 0x0255
+packetLen(0x0255, 5) // ZC_ACK_MAIL_ADD_ITEM
+
+// Packet: 0x0256
+packetLen(0x0256, 5) // ZC_ACK_AUCTION_ADD_ITEM
+
+// Packet: 0x0257
+packetLen(0x0257, 8) // ZC_ACK_MAIL_DELETE
+
+// Packet: 0x0258
+packetLen(0x0258, 2) // CA_REQ_GAME_GUARD_CHECK
+
+// Packet: 0x0259
+packetLen(0x0259, 3) // AC_ACK_GAME_GUARD
+
+// Packet: 0x025a
+packetLen(0x025a, -1) // ZC_MAKINGITEM_LIST
+
+// Packet: 0x025b
+packetLen(0x025b, 8) // CZ_REQ_MAKINGITEM
+
+// Packet: 0x025c
+packetLen(0x025c, 4) // CZ_AUCTION_REQ_MY_INFO
+
+// Packet: 0x025d
+packetLen(0x025d, 6) // CZ_AUCTION_REQ_MY_SELL_STOP
+
+// Packet: 0x025e
+packetLen(0x025e, 4) // ZC_AUCTION_ACK_MY_SELL_STOP
+
+// Packet: 0x025f
+packetLen(0x025f, 6) // ZC_AUCTION_WINDOWS
+
+// Packet: 0x0260
+packetLen(0x0260, 6) // ZC_MAIL_WINDOWS
+
+// Packet: 0x0261
+packetLen(0x0261, 11) // AC_REQ_LOGIN_OLDEKEY
+
+// Packet: 0x0262
+packetLen(0x0262, 11) // AC_REQ_LOGIN_NEWEKEY
+
+// Packet: 0x0263
+packetLen(0x0263, 11) // AC_REQ_LOGIN_CARDPASS
+
+// Packet: 0x0264
+packetLen(0x0264, 20) // CA_ACK_LOGIN_OLDEKEY
+
+// Packet: 0x0265
+packetLen(0x0265, 20) // CA_ACK_LOGIN_NEWEKEY
+
+// Packet: 0x0266
+packetLen(0x0266, 30) // CA_ACK_LOGIN_CARDPASS
+
+// Packet: 0x0267
+packetLen(0x0267, 4) // AC_ACK_EKEY_FAIL_NOTEXIST
+
+// Packet: 0x0268
+packetLen(0x0268, 4) // AC_ACK_EKEY_FAIL_NOTUSESEKEY
+
+// Packet: 0x0269
+packetLen(0x0269, 4) // AC_ACK_EKEY_FAIL_NOTUSEDEKEY
+
+// Packet: 0x026a
+packetLen(0x026a, 4) // AC_ACK_EKEY_FAIL_AUTHREFUSE
+
+// Packet: 0x026b
+packetLen(0x026b, 4) // AC_ACK_EKEY_FAIL_INPUTEKEY
+
+// Packet: 0x026c
+packetLen(0x026c, 4) // AC_ACK_EKEY_FAIL_NOTICE
+
+// Packet: 0x026d
+packetLen(0x026d, 4) // AC_ACK_EKEY_FAIL_NEEDCARDPASS
+
+// Packet: 0x026f
+packetLen(0x026f, 2) // AC_ACK_FIRST_LOGIN
+
+// Packet: 0x0270
+packetLen(0x0270, 2) // AC_REQ_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0271
+packetLen(0x0271, 40) // CA_ACK_LOGIN_ACCOUNT_INFO
+
+// Packet: 0x0272
+packetLen(0x0272, 44) // AC_ACK_PT_ID_INFO
+
+// Packet: 0x0273
+packetLen(0x0273, 30) // CZ_REQ_MAIL_RETURN
+
+// Packet: 0x0274
+packetLen(0x0274, 8) // ZC_ACK_MAIL_RETURN
+
+// Packet: 0x0275
+packetLen(0x0275, 37) // CH_ENTER2
+
+// Packet: 0x0276
+packetLen(0x0276, -1) // AC_ACCEPT_LOGIN2
+
+// Packet: 0x0277
+packetLen(0x0277, 84) // CA_LOGIN_PCBANG
+
+// Packet: 0x0278
+packetLen(0x0278, 2) // ZC_NOTIFY_PCBANG
+
+// Packet: 0x0279
+packetLen(0x0279, 2) // CZ_HUNTINGLIST
+
+// Packet: 0x027a
+packetLen(0x027a, -1) // ZC_HUNTINGLIST
+
+// Packet: 0x027b
+packetLen(0x027b, 14) // ZC_PCBANG_EFFECT
+
+// Packet: 0x027c
+packetLen(0x027c, 60) // CA_LOGIN4
+
+// Packet: 0x027d
+packetLen(0x027d, 62) // ZC_PROPERTY_MERCE
+
+// Packet: 0x027e
+packetLen(0x027e, -1) // ZC_SHANDA_PROTECT
+
+// Packet: 0x027f
+packetLen(0x027f, 8) // CA_CLIENT_TYPE
+
+// Packet: 0x0280
+packetLen(0x0280, 12) // ZC_GANGSI_POINT
+
+// Packet: 0x0281
+packetLen(0x0281, 4) // CZ_GANGSI_RANK
+
+// Packet: 0x0282
+packetLen(0x0282, 284) // ZC_GANGSI_RANK
+
+// Packet: 0x0283
+packetLen(0x0283, 6) // ZC_AID
+
+// Packet: 0x0284
+packetLen(0x0284, 14) // ZC_NOTIFY_EFFECT3
+
+// Packet: 0x0285
+packetLen(0x0285, 6) // ZC_DEATH_QUESTION
+
+// Packet: 0x0286
+packetLen(0x0286, 4) // CZ_DEATH_QUESTION
+
+// Packet: 0x0287
+packetLen(0x0287, -1) // ZC_PC_CASH_POINT_ITEMLIST
+
+// Packet: 0x0288
+packetLen(0x0288, -1) // CZ_PC_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0289
+packetLen(0x0289, 12) // ZC_PC_CASH_POINT_UPDATE
+
+// Packet: 0x028a
+packetLen(0x028a, 18) // ZC_NPC_SHOWEFST_UPDATE
+
+// Packet: 0x028b
+packetLen(0x028b, -1) // HC_CHARNOTBEENSELECTED
+
+// Packet: 0x028c
+packetLen(0x028c, 46) // CH_SELECT_CHAR_GOINGTOBEUSED
+
+// Packet: 0x028d
+packetLen(0x028d, 34) // CH_REQ_IS_VALID_CHARNAME
+
+// Packet: 0x028e
+packetLen(0x028e, 4) // HC_ACK_IS_VALID_CHARNAME
+
+// Packet: 0x028f
+packetLen(0x028f, 6) // CH_REQ_CHANGE_CHARNAME
+
+// Packet: 0x0290
+packetLen(0x0290, 4) // HC_ACK_CHANGE_CHARNAME
+
+// Packet: 0x0291
+packetLen(0x0291, 4) // ZC_MSG
+
+// Packet: 0x0292
+packetLen(0x0292, 2) // CZ_STANDING_RESURRECTION
+
+// Packet: 0x0293
+packetLen(0x0293, 70) // ZC_BOSS_INFO
+
+// Packet: 0x0294
+packetLen(0x0294, 10) // ZC_READ_BOOK
+
+// Packet: 0x0295
+packetLen(0x0295, -1) // ZC_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0296
+packetLen(0x0296, -1) // ZC_STORE_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0297
+packetLen(0x0297, -1) // ZC_CART_EQUIPMENT_ITEMLIST2
+
+// Packet: 0x0298
+packetLen(0x0298, 10) // ZC_CASH_TIME_COUNTER
+
+// Packet: 0x0299
+packetLen(0x0299, 8) // ZC_CASH_ITEM_DELETE
+
+// Packet: 0x029a
+packetLen(0x029a, 37) // ZC_ITEM_PICKUP_ACK2
+
+// Packet: 0x029b
+packetLen(0x029b, 80) // ZC_MER_INIT
+
+// Packet: 0x029c
+packetLen(0x029c, 66) // ZC_MER_PROPERTY
+
+// Packet: 0x029d
+packetLen(0x029d, -1) // ZC_MER_SKILLINFO_LIST
+
+// Packet: 0x029e
+packetLen(0x029e, 11) // ZC_MER_SKILLINFO_UPDATE
+
+// Packet: 0x029f
+packetLen(0x029f, 3) // CZ_MER_COMMAND
+
+// Packet: 0x02a2
+packetLen(0x02a2, 8) // ZC_MER_PAR_CHANGE
+
+// Packet: 0x02a5
+packetLen(0x02a5, 8) // CZ_KSY_EVENT
+
+// Packet: 0x02a6
+packetLen(0x02a6, -1) // ZC_HACKSH_CPX_MSG
+
+// Packet: 0x02a7
+packetLen(0x02a7, -1) // CZ_HACKSH_CPX_MSG
+
+// Packet: 0x02aa
+packetLen(0x02aa, 4) // ZC_REQ_CASH_PASSWORD
+
+// Packet: 0x02ab
+packetLen(0x02ab, 36) // CZ_ACK_CASH_PASSWORD
+
+// Packet: 0x02ac
+packetLen(0x02ac, 6) // ZC_RESULT_CASH_PASSWORD
+
+// Packet: 0x02ad
+packetLen(0x02ad, 8) // AC_REQUEST_SECOND_PASSWORD
+
+// Packet: 0x02b0
+packetLen(0x02b0, 85) // CA_LOGIN_HAN
+
+// Packet: 0x02b1
+packetLen(0x02b1, -1) // ZC_ALL_QUEST_LIST
+
+// Packet: 0x02b2
+packetLen(0x02b2, -1) // ZC_ALL_QUEST_MISSION
+
+// Packet: 0x02b3
+packetLen(0x02b3, 107) // ZC_ADD_QUEST
+
+// Packet: 0x02b4
+packetLen(0x02b4, 6) // ZC_DEL_QUEST
+
+// Packet: 0x02b5
+packetLen(0x02b5, -1) // ZC_UPDATE_MISSION_HUNT
+
+// Packet: 0x02b6
+packetLen(0x02b6, 7) // CZ_ACTIVE_QUEST
+
+// Packet: 0x02b7
+packetLen(0x02b7, 7) // ZC_ACTIVE_QUEST
+
+// Packet: 0x02b8
+packetLen(0x02b8, 32) // ZC_ITEM_PICKUP_PARTY
+
+// Packet: 0x02b9
+packetLen(0x02b9, 191) // ZC_SHORTCUT_KEY_LIST
+
+// Packet: 0x02ba
+packetLen(0x02ba, 11) // CZ_SHORTCUT_KEY_CHANGE
+
+// Packet: 0x02bb
+packetLen(0x02bb, 8) // ZC_EQUIPITEM_DAMAGED
+
+// Packet: 0x02bc
+packetLen(0x02bc, 6) // ZC_NOTIFY_PCBANG_PLAYING_TIME
+
+// Packet: 0x02c1
+packetLen(0x02c1, -1) // ZC_NPC_CHAT
+
+// Packet: 0x02c2
+packetLen(0x02c2, -1) // ZC_FORMATSTRING_MSG
+
+// Packet: 0x02c4
+packetLen(0x02c4, 26) // CZ_PARTY_JOIN_REQ
+
+// Packet: 0x02c5
+packetLen(0x02c5, 30) // ZC_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c6
+packetLen(0x02c6, 30) // ZC_PARTY_JOIN_REQ
+
+// Packet: 0x02c7
+packetLen(0x02c7, 7) // CZ_PARTY_JOIN_REQ_ACK
+
+// Packet: 0x02c8
+packetLen(0x02c8, 3) // CZ_PARTY_CONFIG
+
+// Packet: 0x02c9
+packetLen(0x02c9, 3) // ZC_PARTY_CONFIG
+
+// Packet: 0x02ca
+packetLen(0x02ca, 3) // HC_REFUSE_SELECTCHAR
+
+// Packet: 0x02cb
+packetLen(0x02cb, 65) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_INFO
+
+// Packet: 0x02cc
+packetLen(0x02cc, 4) // ZC_MEMORIALDUNGEON_SUBSCRIPTION_NOTIFY
+
+// Packet: 0x02cd
+packetLen(0x02cd, 71) // ZC_MEMORIALDUNGEON_INFO
+
+// Packet: 0x02ce
+packetLen(0x02ce, 10) // ZC_MEMORIALDUNGEON_NOTIFY
+
+// Packet: 0x02cf
+packetLen(0x02cf, 6) // CZ_MEMORIALDUNGEON_COMMAND
+
+// Packet: 0x02d0
+packetLen(0x02d0, -1) // ZC_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d1
+packetLen(0x02d1, -1) // ZC_STORE_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d2
+packetLen(0x02d2, -1) // ZC_CART_EQUIPMENT_ITEMLIST3
+
+// Packet: 0x02d3
+packetLen(0x02d3, 4) // ZC_NOTIFY_BIND_ON_EQUIP
+
+// Packet: 0x02d4
+packetLen(0x02d4, 39) // ZC_ITEM_PICKUP_ACK3
+
+// Packet: 0x02d5
+packetLen(0x02d5, 2) // ZC_ISVR_DISCONNECT
+
+// Packet: 0x02d6
+packetLen(0x02d6, 6) // CZ_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d7
+packetLen(0x02d7, -1) // ZC_EQUIPWIN_MICROSCOPE
+
+// Packet: 0x02d8
+packetLen(0x02d8, 10) // CZ_CONFIG
+
+// Packet: 0x02d9
+packetLen(0x02d9, 10) // ZC_CONFIG
+
+// Packet: 0x02da
+packetLen(0x02da, 3) // ZC_CONFIG_NOTIFY
+
+// Packet: 0x02db
+packetLen(0x02db, -1) // CZ_BATTLEFIELD_CHAT
+
+// Packet: 0x02dc
+packetLen(0x02dc, -1) // ZC_BATTLEFIELD_CHAT
+
+// Packet: 0x02dd
+packetLen(0x02dd, 32) // ZC_BATTLEFIELD_NOTIFY_CAMPINFO
+
+// Packet: 0x02de
+packetLen(0x02de, 6) // ZC_BATTLEFIELD_NOTIFY_POINT
+
+// Packet: 0x02df
+packetLen(0x02df, 36) // ZC_BATTLEFIELD_NOTIFY_POSITION
+
+// Packet: 0x02e0
+packetLen(0x02e0, 34) // ZC_BATTLEFIELD_NOTIFY_HP
+
+// Packet: 0x02e1
+packetLen(0x02e1, 33) // ZC_NOTIFY_ACT2
+
+// Packet: 0x02e2
+packetLen(0x02e2, 20) // CZ_USE_ITEM_NEW_JAPEN
+
+// Packet: 0x02e3
+packetLen(0x02e3, 22) // CZ_USE_SKILL_NEW_JAPEN
+
+// Packet: 0x02e4
+packetLen(0x02e4, 11) // CZ_ITEM_PICKUP_NEW_JAPEN
+
+// Packet: 0x02e5
+packetLen(0x02e5, 9) // CZ_REQUEST_MOVE_NEW_JAPEN
+
+// Packet: 0x02e6
+packetLen(0x02e6, 6) // CZ_BOT_CHECK
+
+// Packet: 0x02e7
+packetLen(0x02e7, -1) // ZC_MAPPROPERTY
+
+// Packet: 0x02e8
+packetLen(0x02e8, -1) // ZC_NORMAL_ITEMLIST3
+
+// Packet: 0x02e9
+packetLen(0x02e9, -1) // ZC_CART_NORMAL_ITEMLIST3
+
+// Packet: 0x02ea
+packetLen(0x02ea, -1) // ZC_STORE_NORMAL_ITEMLIST3
+
+// Packet: 0x02eb
+packetLen(0x02eb, 13) // ZC_ACCEPT_ENTER2
+
+// Packet: 0x02ec
+packetLen(0x02ec, 71) // ZC_NOTIFY_MOVEENTRY4
+
+// Packet: 0x02ed
+packetLen(0x02ed, 63) // ZC_NOTIFY_NEWENTRY4
+
+// Packet: 0x02ee
+packetLen(0x02ee, 64) // ZC_NOTIFY_STANDENTRY4
+
+// Packet: 0x02ef
+packetLen(0x02ef, 8) // ZC_NOTIFY_FONT
+
+// Packet: 0x02f0
+packetLen(0x02f0, 10) // ZC_PROGRESS
+
+// Packet: 0x02f1
+packetLen(0x02f1, 2) // CZ_PROGRESS
+
+// Packet: 0x02f2
+packetLen(0x02f2, 2) // ZC_PROGRESS_CANCEL
+
+// Packet: 0x02f3
+packetLen(0x02f3, -1) // CZ_IRMAIL_SEND
+
+// Packet: 0x02f4
+packetLen(0x02f4, 3) // ZC_IRMAIL_SEND_RES
+
+// Packet: 0x02f5
+packetLen(0x02f5, 7) // ZC_IRMAIL_NOTIFY
+
+// Packet: 0x02f6
+packetLen(0x02f6, 7) // CZ_IRMAIL_LIST
+
+// Packet: 0x035c
+packetLen(0x035c, 2) // CZ_OPEN_SIMPLE_CASHSHOP_ITEMLIST
+
+// Packet: 0x035d
+packetLen(0x035d, -1) // ZC_SIMPLE_CASHSHOP_POINT_ITEMLIST
+
+// Packet: 0x035e
+packetLen(0x035e, 2) // CZ_CLOSE_WINDOW
+
+// Packet: 0x035f
+packetLen(0x035f, 5) // CZ_REQUEST_MOVE2
+
+// Packet: 0x0360
+packetLen(0x0360, 6) // CZ_REQUEST_TIME2
+
+// Packet: 0x0361
+packetLen(0x0361, 5) // CZ_CHANGE_DIRECTION2
+
+// Packet: 0x0362
+packetLen(0x0362, 6) // CZ_ITEM_PICKUP2
+
+// Packet: 0x0363
+packetLen(0x0363, 6) // CZ_ITEM_THROW2
+
+// Packet: 0x0364
+packetLen(0x0364, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_STORE2
+
+// Packet: 0x0365
+packetLen(0x0365, 8) // CZ_MOVE_ITEM_FROM_STORE_TO_BODY2
+
+// Packet: 0x0366
+packetLen(0x0366, 10) // CZ_USE_SKILL_TOGROUND2
+
+// Packet: 0x0367
+packetLen(0x0367, 90) // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2
+
+// Packet: 0x0368
+packetLen(0x0368, 6) // CZ_REQNAME2
+
+// Packet: 0x0369
+packetLen(0x0369, 6) // CZ_REQNAME_BYGID2
+
+// Packet: 0x03dd
+packetLen(0x03dd, 18) // AHC_GAME_GUARD
+
+// Packet: 0x03de
+packetLen(0x03de, 18) // CAH_ACK_GAME_GUARD
+
+// Packet: 0x0436
+packetLen(0x0436, 19) // CZ_ENTER2
+
+// Packet: 0x0437
+packetLen(0x0437, 7) // CZ_REQUEST_ACT2
+
+// Packet: 0x0438
+packetLen(0x0438, 10) // CZ_USE_SKILL2
+
+// Packet: 0x0439
+packetLen(0x0439, 8) // CZ_USE_ITEM2
+
+// Packet: 0x043d
+packetLen(0x043d, 8) // ZC_SKILL_POSTDELAY
+
+// Packet: 0x043e
+packetLen(0x043e, -1) // ZC_SKILL_POSTDELAY_LIST
+
+// Packet: 0x043f
+packetLen(0x043f, 25) // ZC_MSG_STATE_CHANGE2
+
+// Packet: 0x0440
+packetLen(0x0440, 10) // ZC_MILLENNIUMSHIELD
+
+// Packet: 0x0441
+packetLen(0x0441, 4) // ZC_SKILLINFO_DELETE
+
+// Packet: 0x0442
+packetLen(0x0442, -1) // ZC_SKILL_SELECT_REQUEST
+
+// Packet: 0x0443
+packetLen(0x0443, 8) // CZ_SKILL_SELECT_RESPONSE
+
+// Packet: 0x0444
+packetLen(0x0444, -1) // ZC_SIMPLE_CASH_POINT_ITEMLIST
+
+// Packet: 0x0445
+packetLen(0x0445, 12) // CZ_SIMPLE_BUY_CASH_POINT_ITEM
+
+// Packet: 0x0446
+packetLen(0x0446, 14) // ZC_QUEST_NOTIFY_EFFECT
+
+// Packet: 0x0447
+packetLen(0x0447, 2) // CZ_BLOCKING_PLAY_CANCEL
+
+// Packet: 0x0448
+packetLen(0x0448, -1) // HC_CHARACTER_LIST
+
+// Packet: 0x0449
+packetLen(0x0449, 4) // ZC_HACKSH_ERROR_MSG
+
+// Packet: 0x044a
+packetLen(0x044a, 6) // CZ_CLIENT_VERSION
+
+// Packet: 0x044b
+packetLen(0x044b, 2) // CZ_CLOSE_SIMPLECASH_SHOP
+
+// Packet: 0x07d7
+packetLen(0x07d7, 8) // CZ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d8
+packetLen(0x07d8, 8) // ZC_REQ_GROUPINFO_CHANGE_V2
+
+// Packet: 0x07d9
+packetLen(0x07d9, 268) // ZC_SHORTCUT_KEY_LIST_V2
+
+// Packet: 0x07da
+packetLen(0x07da, 6) // CZ_CHANGE_GROUP_MASTER
+
+// Packet: 0x07db
+packetLen(0x07db, 8) // ZC_HO_PAR_CHANGE
+
+// Packet: 0x07dc
+packetLen(0x07dc, 6) // CZ_SEEK_PARTY
+
+// Packet: 0x07dd
+packetLen(0x07dd, 54) // ZC_SEEK_PARTY
+
+// Packet: 0x07de
+packetLen(0x07de, 30) // CZ_SEEK_PARTY_MEMBER
+
+// Packet: 0x07df
+packetLen(0x07df, 54) // ZC_SEEK_PARTY_MEMBER
+
+// Packet: 0x07e0
+packetLen(0x07e0, 58) // ZC_ES_NOTI_MYINFO
+
+// Packet: 0x07e1
+packetLen(0x07e1, 15) // ZC_SKILLINFO_UPDATE2
+
+// Packet: 0x07e2
+packetLen(0x07e2, 8) // ZC_MSG_VALUE
+
+// Packet: 0x07e3
+packetLen(0x07e3, 6) // ZC_ITEMLISTWIN_OPEN
+
+// Packet: 0x07e4
+packetLen(0x07e4, -1) // CZ_ITEMLISTWIN_RES
+
+// Packet: 0x07e5
+packetLen(0x07e5, 4) // CH_ENTER_CHECKBOT
+
+// Packet: 0x07e6
+packetLen(0x07e6, 8) // ZC_MSG_SKILL
+
+// Packet: 0x07e7
+packetLen(0x07e7, 32) // CH_CHECKBOT
+
+// Packet: 0x07e8
+packetLen(0x07e8, -1) // HC_CHECKBOT
+
+// Packet: 0x07e9
+packetLen(0x07e9, 5) // HC_CHECKBOT_RESULT
+
+// Packet: 0x07ea
+packetLen(0x07ea, 2) // CZ_BATTLE_FIELD_LIST
+
+// Packet: 0x07eb
+packetLen(0x07eb, -1) // ZC_BATTLE_FIELD_LIST
+
+// Packet: 0x07ec
+packetLen(0x07ec, 8) // CZ_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ed
+packetLen(0x07ed, 10) // ZC_JOIN_BATTLE_FIELD
+
+// Packet: 0x07ee
+packetLen(0x07ee, 6) // CZ_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07ef
+packetLen(0x07ef, 8) // ZC_CANCEL_BATTLE_FIELD
+
+// Packet: 0x07f0
+packetLen(0x07f0, 6) // CZ_REQ_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f1
+packetLen(0x07f1, 18) // ZC_ACK_BATTLE_STATE_MONITOR
+
+// Packet: 0x07f2
+packetLen(0x07f2, 8) // ZC_BATTLE_NOTI_START_STEP
+
+// Packet: 0x07f3
+packetLen(0x07f3, 6) // ZC_BATTLE_JOIN_NOTI_DEFER
+
+// Packet: 0x07f4
+packetLen(0x07f4, 3) // ZC_BATTLE_JOIN_DISABLE_STATE
+
+// Packet: 0x07f5
+packetLen(0x07f5, 6) // CZ_GM_FULLSTRIP
+
+// Packet: 0x07f6
+packetLen(0x07f6, 14) // ZC_NOTIFY_EXP
+
+// Packet: 0x07f7
+packetLen(0x07f7, -1) // ZC_NOTIFY_MOVEENTRY7
+
+// Packet: 0x07f8
+packetLen(0x07f8, -1) // ZC_NOTIFY_NEWENTRY5
+
+// Packet: 0x07f9
+packetLen(0x07f9, -1) // ZC_NOTIFY_STANDENTRY5
+
+// Packet: 0x07fa
+packetLen(0x07fa, 8) // ZC_DELETE_ITEM_FROM_BODY
+
+// Packet: 0x07fb
+packetLen(0x07fb, 25) // ZC_USESKILL_ACK2
+
+// Packet: 0x07fc
+packetLen(0x07fc, 10) // ZC_CHANGE_GROUP_MASTER
+
+// Packet: 0x07fd
+packetLen(0x07fd, -1) // ZC_BROADCASTING_SPECIAL_ITEM_OBTAIN
+
+// Packet: 0x07fe
+packetLen(0x07fe, 26) // ZC_PLAY_NPC_BGM
+
+// Packet: 0x0800
+packetLen(0x0800, -1) // ZC_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0801
+packetLen(0x0801, -1) // CZ_PC_PURCHASE_ITEMLIST_FROMMC2
+
+// Packet: 0x0802
+packetLen(0x0802, 18) // CZ_PARTY_BOOKING_REQ_REGISTER
+
+// Packet: 0x0803
+packetLen(0x0803, 4) // ZC_PARTY_BOOKING_ACK_REGISTER
+
+// Packet: 0x0804
+packetLen(0x0804, 14) // CZ_PARTY_BOOKING_REQ_SEARCH
+
+// Packet: 0x0805
+packetLen(0x0805, -1) // ZC_PARTY_BOOKING_ACK_SEARCH
+
+// Packet: 0x0806
+packetLen(0x0806, 2) // CZ_PARTY_BOOKING_REQ_DELETE
+
+// Packet: 0x0807
+packetLen(0x0807, 4) // ZC_PARTY_BOOKING_ACK_DELETE
+
+// Packet: 0x0808
+packetLen(0x0808, 14) // CZ_PARTY_BOOKING_REQ_UPDATE
+
+// Packet: 0x0809
+packetLen(0x0809, 50) // ZC_PARTY_BOOKING_NOTIFY_INSERT
+
+// Packet: 0x080a
+packetLen(0x080a, 18) // ZC_PARTY_BOOKING_NOTIFY_UPDATE
+
+// Packet: 0x080b
+packetLen(0x080b, 6) // ZC_PARTY_BOOKING_NOTIFY_DELETE
+
+// Packet: 0x080c
+packetLen(0x080c, 2) // CZ_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080d
+packetLen(0x080d, 3) // ZC_SIMPLE_CASH_BTNSHOW
+
+// Packet: 0x080e
+packetLen(0x080e, 14) // ZC_NOTIFY_HP_TO_GROUPM_R2
+
+// Packet: 0x080f
+packetLen(0x080f, 30) // ZC_ADD_EXCHANGE_ITEM2
+
+// Packet: 0x0810
+packetLen(0x0810, 3) // ZC_OPEN_BUYING_STORE
+
+// Packet: 0x0811
+packetLen(0x0811, -1) // CZ_REQ_OPEN_BUYING_STORE
+
+// Packet: 0x0812
+packetLen(0x0812, 8) // ZC_FAILED_OPEN_BUYING_STORE_TO_BUYER
+
+// Packet: 0x0813
+packetLen(0x0813, -1) // ZC_MYITEMLIST_BUYING_STORE
+
+// Packet: 0x0814
+packetLen(0x0814, 86) // ZC_BUYING_STORE_ENTRY
+
+// Packet: 0x0815
+packetLen(0x0815, 2) // CZ_REQ_CLOSE_BUYING_STORE
+
+// Packet: 0x0816
+packetLen(0x0816, 6) // ZC_DISAPPEAR_BUYING_STORE_ENTRY
+
+// Packet: 0x0817
+packetLen(0x0817, 6) // CZ_REQ_CLICK_TO_BUYING_STORE
+
+// Packet: 0x0818
+packetLen(0x0818, -1) // ZC_ACK_ITEMLIST_BUYING_STORE
+
+// Packet: 0x0819
+packetLen(0x0819, -1) // CZ_REQ_TRADE_BUYING_STORE
+
+// Packet: 0x081a
+packetLen(0x081a, 4) // ZC_FAILED_TRADE_BUYING_STORE_TO_BUYER
+
+// Packet: 0x081b
+packetLen(0x081b, 12) // ZC_UPDATE_ITEM_FROM_BUYING_STORE
+
+// Packet: 0x081c
+packetLen(0x081c, 10) // ZC_ITEM_DELETE_BUYING_STORE
+
+// Packet: 0x081d
+packetLen(0x081d, 22) // ZC_EL_INIT
+
+// Packet: 0x081e
+packetLen(0x081e, 8) // ZC_EL_PAR_CHANGE
+
+// Packet: 0x081f
+packetLen(0x081f, -1) // ZC_BROADCAST4
+
+// Packet: 0x0820
+packetLen(0x0820, 11) // ZC_COSTUME_SPRITE_CHANGE
+
+// Packet: 0x0821
+packetLen(0x0821, 2) // AC_OTP_USER
+
+// Packet: 0x0822
+packetLen(0x0822, 9) // CA_OTP_AUTH_REQ
+
+// Packet: 0x0823
+packetLen(0x0823, -1) // AC_OTP_AUTH_ACK
+
+// Packet: 0x0824
+packetLen(0x0824, 8) // ZC_FAILED_TRADE_BUYING_STORE_TO_SELLER
+
+// Packet: 0x0825
+packetLen(0x0825, -1) // CA_SSO_LOGIN_REQ
+
+// Packet: 0x0827
+packetLen(0x0827, 6) // CH_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0828
+packetLen(0x0828, 14) // HC_DELETE_CHAR3_RESERVED
+
+// Packet: 0x0829
+packetLen(0x0829, 12) // CH_DELETE_CHAR3
+
+// Packet: 0x082a
+packetLen(0x082a, 10) // HC_DELETE_CHAR3
+
+// Packet: 0x082b
+packetLen(0x082b, 6) // CH_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082c
+packetLen(0x082c, 10) // HC_DELETE_CHAR3_CANCEL
+
+// Packet: 0x082d
+packetLen(0x082d, -1) // HC_ACCEPT_ENTER2
+
+// Packet: 0x0835
+packetLen(0x0835, -1) // CZ_SEARCH_STORE_INFO
+
+// Packet: 0x0836
+packetLen(0x0836, -1) // ZC_SEARCH_STORE_INFO_ACK
+
+// Packet: 0x0837
+packetLen(0x0837, 3) // ZC_SEARCH_STORE_INFO_FAILED
+
+// Packet: 0x0838
+packetLen(0x0838, 2) // CZ_SEARCH_STORE_INFO_NEXT_PAGE
+
+// Packet: 0x0839
+packetLen(0x0839, 66) // ZC_ACK_BAN_GUILD_SSO
+
+// Packet: 0x083a
+packetLen(0x083a, 5) // ZC_OPEN_SEARCH_STORE_INFO
+
+// Packet: 0x083b
+packetLen(0x083b, 2) // CZ_CLOSE_SEARCH_STORE_INFO
+
+// Packet: 0x083c
+packetLen(0x083c, 14) // CZ_SSILIST_ITEM_CLICK
+
+// Packet: 0x083d
+packetLen(0x083d, 6) // ZC_SSILIST_ITEM_CLICK_ACK
+
+// Packet: 0x083e
+packetLen(0x083e, 26) // AC_REFUSE_LOGIN2
+
+// Packet: 0x0840
+packetLen(0x0840, -1) // HC_NOTIFY_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0841
+packetLen(0x0841, 4) // CH_SELECT_ACCESSIBLE_MAPNAME
+
+// Packet: 0x0842
+packetLen(0x0842, 6) // CZ_RECALL_SSO
+
+// Packet: 0x0843
+packetLen(0x0843, 6) // CZ_REMOVE_AID_SSO
+
+// Packet: 0x0844
+packetLen(0x0844, 2) // CZ_SE_CASHSHOP_OPEN
+
+// Packet: 0x0845
+packetLen(0x0845, 10) // ZC_SE_CASHSHOP_OPEN
+
+// Packet: 0x0846
+packetLen(0x0846, 4) // CZ_REQ_SE_CASH_TAB_CODE
+
+// Packet: 0x0847
+packetLen(0x0847, -1) // ZC_ACK_SE_CASH_ITEM_LIST
+
+// Packet: 0x0848
+packetLen(0x0848, -1) // CZ_SE_PC_BUY_CASHITEM_LIST
+
+// Packet: 0x0849
+packetLen(0x0849, 16) // ZC_SE_PC_BUY_CASHITEM_RESULT
+
+// Packet: 0x084a
+packetLen(0x084a, 2) // CZ_SE_CASHSHOP_CLOSE
+
+// Packet: 0x084b
+packetLen(0x084b, 21) // ZC_ITEM_FALL_ENTRY4
+
+// Packet: 0x084c
+packetLen(0x084c, 10) // CZ_MACRO_USE_SKILL
+
+// Packet: 0x084d
+packetLen(0x084d, 10) // CZ_MACRO_USE_SKILL_TOGROUND
+
+// Packet: 0x084e
+packetLen(0x084e, 5) // CZ_MACRO_REQUEST_MOVE
+
+// Packet: 0x084f
+packetLen(0x084f, 6) // CZ_MACRO_ITEM_PICKUP
+
+// Packet: 0x0850
+packetLen(0x0850, 7) // CZ_MACRO_REQUEST_ACT
+
+// Packet: 0x0851
+packetLen(0x0851, -1) // ZC_GPK_DYNCODE
+
+// Packet: 0x0852
+packetLen(0x0852, 2) // CZ_GPK_DYNCODE_RELOAD
+
+// Packet: 0x0853
+packetLen(0x0853, -1) // ZC_GPK_AUTH
+
+// Packet: 0x0854
+packetLen(0x0854, -1) // CZ_GPK_AUTH
+
+// Packet: 0x0855
+packetLen(0x0855, 6) // ZC_MACRO_ITEMPICKUP_FAIL
+
+// Packet: 0x0856
+packetLen(0x0856, -1) // ZC_NOTIFY_MOVEENTRY8
+
+// Packet: 0x0857
+packetLen(0x0857, -1) // ZC_NOTIFY_STANDENTRY7
+
+// Packet: 0x0858
+packetLen(0x0858, -1) // ZC_NOTIFY_NEWENTRY6
+
+// Packet: 0x0859
+packetLen(0x0859, -1) // ZC_EQUIPWIN_MICROSCOPE2
+
+// Packet: 0x085a
+packetLen(0x085a, 2) // ZC_REASSEMBLY_AUTH01
+
+// Packet: 0x085b
+packetLen(0x085b, 2) // ZC_REASSEMBLY_AUTH02
+
+// Packet: 0x085c
+packetLen(0x085c, 2) // ZC_REASSEMBLY_AUTH03
+
+// Packet: 0x085d
+packetLen(0x085d, 2) // ZC_REASSEMBLY_AUTH04
+
+// Packet: 0x085e
+packetLen(0x085e, 2) // ZC_REASSEMBLY_AUTH05
+
+// Packet: 0x085f
+packetLen(0x085f, 2) // ZC_REASSEMBLY_AUTH06
+
+// Packet: 0x0860
+packetLen(0x0860, 2) // ZC_REASSEMBLY_AUTH07
+
+// Packet: 0x0861
+packetLen(0x0861, 2) // ZC_REASSEMBLY_AUTH08
+
+// Packet: 0x0862
+packetLen(0x0862, 2) // ZC_REASSEMBLY_AUTH09
+
+// Packet: 0x0863
+packetLen(0x0863, 2) // ZC_REASSEMBLY_AUTH10
+
+// Packet: 0x0864
+packetLen(0x0864, 2) // ZC_REASSEMBLY_AUTH11
+
+// Packet: 0x0865
+packetLen(0x0865, 2) // ZC_REASSEMBLY_AUTH12
+
+// Packet: 0x0866
+packetLen(0x0866, 2) // ZC_REASSEMBLY_AUTH13
+
+// Packet: 0x0867
+packetLen(0x0867, 2) // ZC_REASSEMBLY_AUTH14
+
+// Packet: 0x0868
+packetLen(0x0868, 2) // ZC_REASSEMBLY_AUTH15
+
+// Packet: 0x0869
+packetLen(0x0869, 2) // ZC_REASSEMBLY_AUTH16
+
+// Packet: 0x086a
+packetLen(0x086a, 2) // ZC_REASSEMBLY_AUTH17
+
+// Packet: 0x086b
+packetLen(0x086b, 2) // ZC_REASSEMBLY_AUTH18
+
+// Packet: 0x086c
+packetLen(0x086c, 2) // ZC_REASSEMBLY_AUTH19
+
+// Packet: 0x086d
+packetLen(0x086d, 2) // ZC_REASSEMBLY_AUTH20
+
+// Packet: 0x086e
+packetLen(0x086e, 2) // ZC_REASSEMBLY_AUTH21
+
+// Packet: 0x086f
+packetLen(0x086f, 2) // ZC_REASSEMBLY_AUTH22
+
+// Packet: 0x0870
+packetLen(0x0870, 2) // ZC_REASSEMBLY_AUTH23
+
+// Packet: 0x0871
+packetLen(0x0871, 2) // ZC_REASSEMBLY_AUTH24
+
+// Packet: 0x0872
+packetLen(0x0872, 2)
+
+// Packet: 0x0873
+packetLen(0x0873, 2) // ZC_REASSEMBLY_AUTH26
+
+// Packet: 0x0874
+packetLen(0x0874, 2) // ZC_REASSEMBLY_AUTH27
+
+// Packet: 0x0875
+packetLen(0x0875, 2) // ZC_REASSEMBLY_AUTH28
+
+// Packet: 0x0876
+packetLen(0x0876, 2) // ZC_REASSEMBLY_AUTH29
+
+// Packet: 0x0877
+packetLen(0x0877, 2) // ZC_REASSEMBLY_AUTH30
+
+// Packet: 0x0878
+packetLen(0x0878, 2) // ZC_REASSEMBLY_AUTH31
+
+// Packet: 0x0879
+packetLen(0x0879, 2) // ZC_REASSEMBLY_AUTH32
+
+// Packet: 0x087a
+packetLen(0x087a, 2) // ZC_REASSEMBLY_AUTH33
+
+// Packet: 0x087b
+packetLen(0x087b, 2) // ZC_REASSEMBLY_AUTH34
+
+// Packet: 0x087c
+packetLen(0x087c, 2) // ZC_REASSEMBLY_AUTH35
+
+// Packet: 0x087d
+packetLen(0x087d, 2) // ZC_REASSEMBLY_AUTH36
+
+// Packet: 0x087e
+packetLen(0x087e, 2) // ZC_REASSEMBLY_AUTH37
+
+// Packet: 0x087f
+packetLen(0x087f, 2) // ZC_REASSEMBLY_AUTH38
+
+// Packet: 0x0880
+packetLen(0x0880, 2) // ZC_REASSEMBLY_AUTH39
+
+// Packet: 0x0881
+packetLen(0x0881, 2) // ZC_REASSEMBLY_AUTH40
+
+// Packet: 0x0882
+packetLen(0x0882, 2) // ZC_REASSEMBLY_AUTH41
+
+// Packet: 0x0883
+packetLen(0x0883, 2) // ZC_REASSEMBLY_AUTH42
+
+// Packet: 0x0884
+packetLen(0x0884, 2) // CZ_REASSEMBLY_AUTH01
+
+// Packet: 0x0885
+packetLen(0x0885, 2) // CZ_REASSEMBLY_AUTH02
+
+// Packet: 0x0886
+packetLen(0x0886, 2) // CZ_REASSEMBLY_AUTH03
+
+// Packet: 0x0887
+packetLen(0x0887, 2) // CZ_REASSEMBLY_AUTH04
+
+// Packet: 0x0888
+packetLen(0x0888, 2) // CZ_REASSEMBLY_AUTH05
+
+// Packet: 0x0889
+packetLen(0x0889, 2) // CZ_REASSEMBLY_AUTH06
+
+// Packet: 0x088a
+packetLen(0x088a, 2) // CZ_REASSEMBLY_AUTH07
+
+// Packet: 0x088b
+packetLen(0x088b, 2) // CZ_REASSEMBLY_AUTH08
+
+// Packet: 0x088c
+packetLen(0x088c, 2) // CZ_REASSEMBLY_AUTH09
+
+// Packet: 0x088d
+packetLen(0x088d, 2) // CZ_REASSEMBLY_AUTH10
+
+// Packet: 0x088e
+packetLen(0x088e, 2) // CZ_REASSEMBLY_AUTH11
+
+// Packet: 0x088f
+packetLen(0x088f, 2) // CZ_REASSEMBLY_AUTH12
+
+// Packet: 0x0890
+packetLen(0x0890, 2) // CZ_REASSEMBLY_AUTH13
+
+// Packet: 0x0891
+packetLen(0x0891, 2) // CZ_REASSEMBLY_AUTH14
+
+// Packet: 0x0892
+packetLen(0x0892, 2) // CZ_REASSEMBLY_AUTH15
+
+// Packet: 0x0893
+packetLen(0x0893, 2) // CZ_REASSEMBLY_AUTH16
+
+// Packet: 0x0894
+packetLen(0x0894, 2) // CZ_REASSEMBLY_AUTH17
+
+// Packet: 0x0895
+packetLen(0x0895, 2) // CZ_REASSEMBLY_AUTH18
+
+// Packet: 0x0896
+packetLen(0x0896, 2) // CZ_REASSEMBLY_AUTH19
+
+// Packet: 0x0897
+packetLen(0x0897, 2) // CZ_REASSEMBLY_AUTH20
+
+// Packet: 0x0898
+packetLen(0x0898, 2) // CZ_REASSEMBLY_AUTH21
+
+// Packet: 0x0899
+packetLen(0x0899, 2) // CZ_REASSEMBLY_AUTH22
+
+// Packet: 0x089a
+packetLen(0x089a, 2) // CZ_REASSEMBLY_AUTH23
+
+// Packet: 0x089b
+packetLen(0x089b, 2) // CZ_REASSEMBLY_AUTH24
+
+// Packet: 0x089c
+packetLen(0x089c, 2) // CZ_REASSEMBLY_AUTH25
+
+// Packet: 0x089d
+packetLen(0x089d, 2) // CZ_REASSEMBLY_AUTH26
+
+// Packet: 0x089e
+packetLen(0x089e, 2) // CZ_REASSEMBLY_AUTH27
+
+// Packet: 0x089f
+packetLen(0x089f, 2) // CZ_REASSEMBLY_AUTH28
+
+// Packet: 0x08a0
+packetLen(0x08a0, 2) // CZ_REASSEMBLY_AUTH29
+
+// Packet: 0x08a1
+packetLen(0x08a1, 2) // CZ_REASSEMBLY_AUTH30
+
+// Packet: 0x08a2
+packetLen(0x08a2, 2) // CZ_REASSEMBLY_AUTH31
+
+// Packet: 0x08a3
+packetLen(0x08a3, 2) // CZ_REASSEMBLY_AUTH32
+
+// Packet: 0x08a4
+packetLen(0x08a4, 2) // CZ_REASSEMBLY_AUTH33
+
+// Packet: 0x08a5
+packetLen(0x08a5, 2) // CZ_REASSEMBLY_AUTH34
+
+// Packet: 0x08a6
+packetLen(0x08a6, 2) // CZ_REASSEMBLY_AUTH35
+
+// Packet: 0x08a7
+packetLen(0x08a7, 2) // CZ_REASSEMBLY_AUTH36
+
+// Packet: 0x08a8
+packetLen(0x08a8, 2) // CZ_REASSEMBLY_AUTH37
+
+// Packet: 0x08a9
+packetLen(0x08a9, 2) // CZ_REASSEMBLY_AUTH38
+
+// Packet: 0x08aa
+packetLen(0x08aa, 2) // CZ_REASSEMBLY_AUTH39
+
+// Packet: 0x08ab
+packetLen(0x08ab, 2) // CZ_REASSEMBLY_AUTH40
+
+// Packet: 0x08ac
+packetLen(0x08ac, 2) // CZ_REASSEMBLY_AUTH41
+
+// Packet: 0x08ad
+packetLen(0x08ad, 2) // CZ_REASSEMBLY_AUTH42
+
+// Packet: 0x08af
+packetLen(0x08af, 10) // HC_WAITING_LOGIN
+
+// Packet: 0x08b0
+packetLen(0x08b0, 17) // CH_WAITING_LOGIN
+
+// Packet: 0x08b1
+packetLen(0x08b1, -1) // ZC_MCSTORE_NOTMOVEITEM_LIST
+
+// Packet: 0x08b2
+packetLen(0x08b2, -1) // AC_REALNAME_AUTH
+
+// Packet: 0x08b3
+packetLen(0x08b3, -1) // ZC_SHOWSCRIPT
+
+// Packet: 0x08b4
+packetLen(0x08b4, 2) // ZC_START_COLLECTION
+
+// Packet: 0x08b5
+packetLen(0x08b5, 6) // CZ_TRYCOLLECTION
+
+// Packet: 0x08b6
+packetLen(0x08b6, 3) // ZC_TRYCOLLECTION
+
+// Packet: 0x08b8
+packetLen(0x08b8, 10) // CH_SECOND_PASSWD_ACK
+
+// Packet: 0x08b9
+packetLen(0x08b9, 12) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x08ba
+packetLen(0x08ba, 10) // CH_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bb
+packetLen(0x08bb, 8) // HC_MAKE_SECOND_PASSWD
+
+// Packet: 0x08bc
+packetLen(0x08bc, 10) // CH_DELETE_SECOND_PASSWD
+
+// Packet: 0x08bd
+packetLen(0x08bd, 8) // HC_DELETE_SECOND_PASSWD
+
+// Packet: 0x08be
+packetLen(0x08be, 14) // CH_EDIT_SECOND_PASSWD
+
+// Packet: 0x08bf
+packetLen(0x08bf, 8) // HC_EDIT_SECOND_PASSWD
+
+// Packet: 0x08c0
+packetLen(0x08c0, -1) // ZC_ACK_SE_CASH_ITEM_LIST2
+
+// Packet: 0x08c1
+packetLen(0x08c1, 2) // CZ_MACRO_START
+
+// Packet: 0x08c2
+packetLen(0x08c2, 2) // CZ_MACRO_STOP
+
+// Packet: 0x08c3
+packetLen(0x08c3, 10) // CH_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c4
+packetLen(0x08c4, 8) // HC_NOT_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c5
+packetLen(0x08c5, 6) // CH_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c6
+packetLen(0x08c6, 4) // HC_AVAILABLE_SECOND_PASSWD
+
+// Packet: 0x08c7
+packetLen(0x08c7, -1) // ZC_SKILL_ENTRY3
+
+// Packet: 0x08c8
+packetLen(0x08c8, 34) // ZC_NOTIFY_ACT3
+
+// Packet: 0x08c9
+packetLen(0x08c9, 2) // CZ_REQ_SCHEDULER_CASHITEM
+
+// Packet: 0x08ca
+packetLen(0x08ca, -1) // ZC_ACK_SCHEDULER_CASHITEM
+
+// Packet: 0x08cb
+packetLen(0x08cb, -1) // ZC_PERSONAL_INFOMATION
+
+// Packet: 0x08cc
+packetLen(0x08cc, 109) // CA_LOGIN5
+
+// Packet: 0x08cd
+packetLen(0x08cd, 10) // ZC_STOPMOVE_FORCE
+
+// Packet: 0x08ce
+packetLen(0x08ce, 2) // ZC_FAILED_GET_ITEM_FROM_ZONEDA
+
+// Packet: 0x08cf
+packetLen(0x08cf, 10) // ZC_SPIRITS_ATTRIBUTE
+
+// Packet: 0x08d0
+packetLen(0x08d0, 9) // ZC_REQ_WEAR_EQUIP_ACK2
+
+// Packet: 0x08d1
+packetLen(0x08d1, 7) // ZC_REQ_TAKEOFF_EQUIP_ACK2
+
+// Packet: 0x08d2
+packetLen(0x08d2, 10) // ZC_FASTMOVE
+
+// Packet: 0x08d3
+packetLen(0x08d3, 10) // ZC_SE_CASHSHOP_UPDATE
+
+// Packet: 0x08d4
+packetLen(0x08d4, 8) // CH_REQ_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d5
+packetLen(0x08d5, -1) // HC_ACK_CHANGE_CHARACTER_SLOT
+
+// Packet: 0x08d6
+packetLen(0x08d6, 6) // ZC_CLEAR_DIALOG
+
+// Packet: 0x08d7
+packetLen(0x08d7, 28) // CZ_REQ_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d8
+packetLen(0x08d8, 27) // ZC_ACK_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08d9
+packetLen(0x08d9, 30) // ZC_NOTIFY_ENTRY_QUEUE_APPLY
+
+// Packet: 0x08da
+packetLen(0x08da, 26) // CZ_REQ_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08db
+packetLen(0x08db, 27) // ZC_ACK_ENTRY_QUEUE_CANCEL
+
+// Packet: 0x08dc
+packetLen(0x08dc, 26) // ZC_NOTIFY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08dd
+packetLen(0x08dd, 27) // CZ_REPLY_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08de
+packetLen(0x08de, 27) // ZC_REPLY_ACK_ENTRY_QUEUE_ADMISSION
+
+// Packet: 0x08df
+packetLen(0x08df, 50) // ZC_NOTIFY_LOBBY_ADMISSION
+
+// Packet: 0x08e0
+packetLen(0x08e0, 51) // CZ_REPLY_LOBBY_ADMISSION
+
+// Packet: 0x08e1
+packetLen(0x08e1, 51) // ZC_REPLY_ACK_LOBBY_ADMISSION
+
+// Packet: 0x08e2
+packetLen(0x08e2, 27) // ZC_NAVIGATION_ACTIVE
+
+// Packet: 0x08e3
+packetLen(0x08e3, 157) // HC_UPDATE_CHARINFO
+
+// Packet: 0x08e4
+packetLen(0x08e4, 6) // AC_SHUTDOWN_INFO
+
+// Packet: 0x08fc
+packetLen(0x08fc, 30) // CH_REQ_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fd
+packetLen(0x08fd, 6) // CH_ACK_CHANGE_CHARACTERNAME
+
+// Packet: 0x08fe
+packetLen(0x08fe, -1) // ZC_HUNTING_QUEST_INFO
+
+// Packet: 0x08ff
+packetLen(0x08ff, 24) // ZC_EFST_SET_ENTER
+
+// Packet: 0x0900
+packetLen(0x0900, -1) // ZC_INVENTORY_ITEMLIST_NORMAL
+
+// Packet: 0x0901
+packetLen(0x0901, -1) // ZC_INVENTORY_ITEMLIST_EQUIP
+
+// Packet: 0x0902
+packetLen(0x0902, -1) // ZC_CART_ITEMLIST_NORMAL
+
+// Packet: 0x0903
+packetLen(0x0903, -1) // ZC_CART_ITEMLIST_EQUIP
+
+// Packet: 0x0904
+packetLen(0x0904, -1) // ZC_STORE_ITEMLIST_NORMAL
+
+// Packet: 0x0905
+packetLen(0x0905, -1) // ZC_STORE_ITEMLIST_EQUIP
+
+// Packet: 0x0906
+packetLen(0x0906, -1) // ZC_MICROSCOPE
+
+// Packet: 0x0907
+packetLen(0x0907, 5) // CZ_INVENTORY_TAB
+
+// Packet: 0x0908
+packetLen(0x0908, 5) // ZC_INVENTORY_TAB
+
+// Packet: 0x090a
+packetLen(0x090a, 26) // CZ_REQ_ENTRY_QUEUE_RANKING
+
+// Packet: 0x090d
+packetLen(0x090d, -1) // ZC_PREMIUM_CAMPAIGN_INFO
+
+// Packet: 0x090e
+packetLen(0x090e, 2) // ZC_ENTRY_QUEUE_INIT
+
+// Packet: 0x090f
+packetLen(0x090f, -1) // ZC_NOTIFY_NEWENTRY7
+
+// Packet: 0x0910
+packetLen(0x0910, 10) // CZ_REQ_PARTY_NAME
+
+// Packet: 0x0911
+packetLen(0x0911, 30) // ZC_ACK_PARTY_NAME
+
+// Packet: 0x0912
+packetLen(0x0912, 10) // CZ_REQ_GUILD_NAME
+
+// Packet: 0x0913
+packetLen(0x0913, 30) // ZC_ACK_GUILD_NAME
+
+// Packet: 0x0914
+packetLen(0x0914, -1) // ZC_NOTIFY_MOVEENTRY9
+
+// Packet: 0x0915
+packetLen(0x0915, -1) // ZC_NOTIFY_STANDENTRY8
+
+// Packet: 0x0916
+packetLen(0x0916, 26) // CZ_REQ_JOIN_GUILD2
+
+// Packet: 0x0917
+packetLen(0x0917, 2) // ZC_REASSEMBLY_AUTH43
+
+// Packet: 0x0918
+packetLen(0x0918, 2) // ZC_REASSEMBLY_AUTH44
+
+// Packet: 0x0919
+packetLen(0x0919, 2) // ZC_REASSEMBLY_AUTH45
+
+// Packet: 0x091a
+packetLen(0x091a, 2) // ZC_REASSEMBLY_AUTH46
+
+// Packet: 0x091b
+packetLen(0x091b, 2) // ZC_PRNPC_STATE
+
+// Packet: 0x091c
+packetLen(0x091c, 2) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x091d
+packetLen(0x091d, 2) // ZC_REASSEMBLY_AUTH49
+
+// Packet: 0x091e
+packetLen(0x091e, 2) // ZC_REASSEMBLY_AUTH50
+
+// Packet: 0x091f
+packetLen(0x091f, 2) // ZC_REASSEMBLY_AUTH51
+
+// Packet: 0x0920
+packetLen(0x0920, 2) // ZC_REASSEMBLY_AUTH52
+
+// Packet: 0x0921
+packetLen(0x0921, 2) // ZC_REASSEMBLY_AUTH53
+
+// Packet: 0x0922
+packetLen(0x0922, 2) // ZC_REASSEMBLY_AUTH54
+
+// Packet: 0x0923
+packetLen(0x0923, 2) // ZC_REASSEMBLY_AUTH55
+
+// Packet: 0x0924
+packetLen(0x0924, 2) // ZC_REASSEMBLY_AUTH56
+
+// Packet: 0x0925
+packetLen(0x0925, 2) // ZC_REASSEMBLY_AUTH57
+
+// Packet: 0x0926
+packetLen(0x0926, 2) // ZC_REASSEMBLY_AUTH58
+
+// Packet: 0x0927
+packetLen(0x0927, 2) // ZC_REASSEMBLY_AUTH59
+
+// Packet: 0x0928
+packetLen(0x0928, 2) // ZC_REASSEMBLY_AUTH60
+
+// Packet: 0x0929
+packetLen(0x0929, 2) // ZC_REASSEMBLY_AUTH61
+
+// Packet: 0x092a
+packetLen(0x092a, 2) // ZC_REASSEMBLY_AUTH62
+
+// Packet: 0x092b
+packetLen(0x092b, 2) // ZC_REASSEMBLY_AUTH63
+
+// Packet: 0x092c
+packetLen(0x092c, 2) // ZC_REASSEMBLY_AUTH64
+
+// Packet: 0x092d
+packetLen(0x092d, 2) // ZC_REASSEMBLY_AUTH65
+
+// Packet: 0x092e
+packetLen(0x092e, 2) // ZC_REASSEMBLY_AUTH66
+
+// Packet: 0x092f
+packetLen(0x092f, 2) // ZC_REASSEMBLY_AUTH67
+
+// Packet: 0x0930
+packetLen(0x0930, 2) // ZC_REASSEMBLY_AUTH68
+
+// Packet: 0x0931
+packetLen(0x0931, 2) // ZC_REASSEMBLY_AUTH69
+
+// Packet: 0x0932
+packetLen(0x0932, 2) // ZC_REASSEMBLY_AUTH70
+
+// Packet: 0x0933
+packetLen(0x0933, 2) // ZC_REASSEMBLY_AUTH71
+
+// Packet: 0x0934
+packetLen(0x0934, 2) // ZC_REASSEMBLY_AUTH72
+
+// Packet: 0x0935
+packetLen(0x0935, 2) // ZC_REASSEMBLY_AUTH73
+
+// Packet: 0x0936
+packetLen(0x0936, 2) // ZC_REASSEMBLY_AUTH74
+
+// Packet: 0x0937
+packetLen(0x0937, 2) // ZC_REASSEMBLY_AUTH75
+
+// Packet: 0x0938
+packetLen(0x0938, 2) // ZC_REASSEMBLY_AUTH76
+
+// Packet: 0x0939
+packetLen(0x0939, 2) // ZC_REASSEMBLY_AUTH77
+
+// Packet: 0x093a
+packetLen(0x093a, 2) // ZC_REASSEMBLY_AUTH78
+
+// Packet: 0x093b
+packetLen(0x093b, 2) // ZC_REASSEMBLY_AUTH79
+
+// Packet: 0x093c
+packetLen(0x093c, 2) // ZC_REASSEMBLY_AUTH80
+
+// Packet: 0x093d
+packetLen(0x093d, 2) // ZC_REASSEMBLY_AUTH81
+
+// Packet: 0x093e
+packetLen(0x093e, 2) // ZC_REASSEMBLY_AUTH82
+
+// Packet: 0x093f
+packetLen(0x093f, 2) // ZC_REASSEMBLY_AUTH83
+
+// Packet: 0x0940
+packetLen(0x0940, 2) // ZC_REASSEMBLY_AUTH84
+
+// Packet: 0x0941
+packetLen(0x0941, 2) // CZ_REASSEMBLY_AUTH43
+
+// Packet: 0x0942
+packetLen(0x0942, 2) // CZ_REASSEMBLY_AUTH44
+
+// Packet: 0x0943
+packetLen(0x0943, 2) // CZ_REASSEMBLY_AUTH45
+
+// Packet: 0x0944
+packetLen(0x0944, 2) // CZ_REASSEMBLY_AUTH46
+
+// Packet: 0x0945
+packetLen(0x0945, 2) // CZ_REASSEMBLY_AUTH47
+
+// Packet: 0x0946
+packetLen(0x0946, 2) // CZ_REASSEMBLY_AUTH48
+
+// Packet: 0x0947
+packetLen(0x0947, 2) // CZ_REASSEMBLY_AUTH49
+
+// Packet: 0x0948
+packetLen(0x0948, 2) // CZ_REASSEMBLY_AUTH50
+
+// Packet: 0x0949
+packetLen(0x0949, 2) // CZ_REASSEMBLY_AUTH51
+
+// Packet: 0x094a
+packetLen(0x094a, 2) // CZ_REASSEMBLY_AUTH52
+
+// Packet: 0x094b
+packetLen(0x094b, 2) // CZ_REASSEMBLY_AUTH53
+
+// Packet: 0x094c
+packetLen(0x094c, 2) // CZ_REASSEMBLY_AUTH54
+
+// Packet: 0x094d
+packetLen(0x094d, 2) // CZ_REASSEMBLY_AUTH55
+
+// Packet: 0x094e
+packetLen(0x094e, 2) // CZ_REASSEMBLY_AUTH56
+
+// Packet: 0x094f
+packetLen(0x094f, 2) // CZ_REASSEMBLY_AUTH57
+
+// Packet: 0x0950
+packetLen(0x0950, 2) // CZ_REASSEMBLY_AUTH58
+
+// Packet: 0x0951
+packetLen(0x0951, 2) // CZ_REASSEMBLY_AUTH59
+
+// Packet: 0x0952
+packetLen(0x0952, 2) // CZ_REASSEMBLY_AUTH60
+
+// Packet: 0x0953
+packetLen(0x0953, 2) // CZ_REASSEMBLY_AUTH61
+
+// Packet: 0x0954
+packetLen(0x0954, 2) // CZ_REASSEMBLY_AUTH62
+
+// Packet: 0x0955
+packetLen(0x0955, 2) // CZ_REASSEMBLY_AUTH63
+
+// Packet: 0x0956
+packetLen(0x0956, 2) // CZ_REASSEMBLY_AUTH64
+
+// Packet: 0x0957
+packetLen(0x0957, 2) // CZ_REASSEMBLY_AUTH65
+
+// Packet: 0x0958
+packetLen(0x0958, 2) // CZ_REASSEMBLY_AUTH66
+
+// Packet: 0x0959
+packetLen(0x0959, 2) // CZ_REASSEMBLY_AUTH67
+
+// Packet: 0x095a
+packetLen(0x095a, 2) // CZ_REASSEMBLY_AUTH68
+
+// Packet: 0x095b
+packetLen(0x095b, 2) // CZ_REASSEMBLY_AUTH69
+
+// Packet: 0x095c
+packetLen(0x095c, 2) // CZ_REASSEMBLY_AUTH70
+
+// Packet: 0x095d
+packetLen(0x095d, 2) // CZ_REASSEMBLY_AUTH71
+
+// Packet: 0x095e
+packetLen(0x095e, 2) // CZ_REASSEMBLY_AUTH72
+
+// Packet: 0x095f
+packetLen(0x095f, 2) // CZ_REASSEMBLY_AUTH73
+
+// Packet: 0x0960
+packetLen(0x0960, 2) // CZ_REASSEMBLY_AUTH74
+
+// Packet: 0x0961
+packetLen(0x0961, 2) // CZ_REASSEMBLY_AUTH75
+
+// Packet: 0x0962
+packetLen(0x0962, 2) // CZ_REASSEMBLY_AUTH76
+
+// Packet: 0x0963
+packetLen(0x0963, 2) // CZ_REASSEMBLY_AUTH77
+
+// Packet: 0x0964
+packetLen(0x0964, 2) // CZ_REASSEMBLY_AUTH78
+
+// Packet: 0x0965
+packetLen(0x0965, 2) // CZ_REASSEMBLY_AUTH79
+
+// Packet: 0x0966
+packetLen(0x0966, 2) // CZ_REASSEMBLY_AUTH80
+
+// Packet: 0x0967
+packetLen(0x0967, 2) // CZ_REASSEMBLY_AUTH81
+
+// Packet: 0x0968
+packetLen(0x0968, 2) // CZ_REASSEMBLY_AUTH82
+
+// Packet: 0x0969
+packetLen(0x0969, 2) // CZ_REASSEMBLY_AUTH83
+
+// Packet: 0x096a
+packetLen(0x096a, 2) // CZ_REASSEMBLY_AUTH84
+
+// Packet: 0x096b
+packetLen(0x096b, 4) // ZC_PRNPC_STATE
+
+// Packet: 0x096c
+packetLen(0x096c, 6) // ZC_PARTY_RECRUIT_CANCEL_VOLUNTEER_TO_PM
+
+// Packet: 0x096d
+packetLen(0x096d, -1) // ZC_MERGE_ITEM_OPEN
+
+// Packet: 0x096e
+packetLen(0x096e, -1) // CZ_REQ_MERGE_ITEM
+
+// Packet: 0x096f
+packetLen(0x096f, 7) // ZC_ACK_MERGE_ITEM
+
+// Packet: 0x0970
+packetLen(0x0970, 31) // CH_MAKE_CHAR_NOT_STATS
+
+// Packet: 0x0971
+packetLen(0x0971, 6) // ZC_PARTY_RECRUIT_REFUSE_VOLUNTEER_TO_PM
+
+// Packet: 0x0972
+packetLen(0x0972, -1) // ZC_SAY_DIALOG2
+
+// Packet: 0x0973
+packetLen(0x0973, 7) // ZC_WAIT_DIALOG2
+
+// Packet: 0x0974
+packetLen(0x0974, 2) // CZ_CANCEL_MERGE_ITEM
+
+// Packet: 0x0975
+packetLen(0x0975, -1) // ZC_STORE_ITEMLIST_NORMAL_V2
+
+// Packet: 0x0976
+packetLen(0x0976, -1) // ZC_STORE_ITEMLIST_EQUIP_V2
+
+// Packet: 0x0977
+packetLen(0x0977, 14) // ZC_HP_INFO
+
+// Packet: 0x0978
+packetLen(0x0978, 6) // CZ_REQ_BEFORE_WORLD_INFO
+
+// Packet: 0x0979
+packetLen(0x0979, 50) // ZC_ACK_BEFORE_WORLD_INFO
+
+// Packet: 0x097a
+packetLen(0x097a, -1) // ZC_ALL_QUEST_LIST2
+
+// Packet: 0x097b
+packetLen(0x097b, -1) // ZC_PERSONAL_INFOMATION2
+
+// Packet: 0x097c
+packetLen(0x097c, 4) // CZ_REQ_RANKING
+
+// Packet: 0x097d
+packetLen(0x097d, 288) // ZC_ACK_RANKING
+
+// Packet: 0x097e
+packetLen(0x097e, 12) // ZC_UPDATE_RANKING_POINT
+
+// Packet: 0x097f
+packetLen(0x097f, -1) // ZC_SELECTCART
+
+// Packet: 0x0980
+packetLen(0x0980, 7) // CZ_SELECTCART
+
+// Packet: 0x0981
+packetLen(0x0981, -1) // ZC_PERSONAL_INFOMATION_CHN
+
+// Packet: 0x0982
+packetLen(0x0982, 7) // ZC_FATIGUE_CHN
+
+// Packet: 0x0983
+packetLen(0x0983, 29) // ZC_MSG_STATE_CHANGE3
+
+// Packet: 0x0984
+packetLen(0x0984, 28) // ZC_EFST_SET_ENTER2
+
+// Packet: 0x0985
+packetLen(0x0985, -1) // ZC_SKILL_POSTDELAY_LIST2
+
+// Packet: 0x0986
+packetLen(0x0986, 10) // AC_SHUTDOWN_NOTIFY
+
+// Packet: 0x0987
+packetLen(0x0987, -1) // CA_LOGIN6
+
+// Packet: 0x0988
+packetLen(0x0988, 6) // ZC_NOTIFY_CLAN_CONNECTINFO
+
+// Packet: 0x0989
+packetLen(0x0989, 2) // ZC_ACK_CLAN_LEAVE
+
+// Packet: 0x098a
+packetLen(0x098a, -1) // ZC_CLANINFO
+
+// Packet: 0x098b
+packetLen(0x098b, 2) // AC_REQ_NEW_USER
+
+// Packet: 0x098c
+packetLen(0x098c, 4) // CA_ACK_NEW_USER
+
+// Packet: 0x098d
+packetLen(0x098d, -1) // CZ_CLAN_CHAT
+
+// Packet: 0x098e
+packetLen(0x098e, -1) // ZC_NOTIFY_CLAN_CHAT
+
+// Packet: 0x098f
+packetLen(0x098f, -1) // CH_DELETE_CHAR3_EXT
+
+// Packet: 0x0990
+packetLen(0x0990, 41) // ZC_ITEM_PICKUP_ACK_V5
+
+// Packet: 0x0991
+packetLen(0x0991, -1) // ZC_INVENTORY_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0992
+packetLen(0x0992, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0993
+packetLen(0x0993, -1) // ZC_CART_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0994
+packetLen(0x0994, -1) // ZC_CART_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0995
+packetLen(0x0995, -1) // ZC_STORE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x0996
+packetLen(0x0996, -1) // ZC_STORE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x0997
+packetLen(0x0997, -1) // ZC_EQUIPWIN_MICROSCOPE_V5
+
+// Packet: 0x0998
+packetLen(0x0998, 8) // CZ_REQ_WEAR_EQUIP_V5
+
+// Packet: 0x0999
+packetLen(0x0999, 11) // ZC_ACK_WEAR_EQUIP_V5
+
+// Packet: 0x099a
+packetLen(0x099a, 9) // ZC_ACK_TAKEOFF_EQUIP_V5
+
+// Packet: 0x099b
+packetLen(0x099b, 8) // ZC_MAPPROPERTY_R2
+
+// Packet: 0x099c
+packetLen(0x099c, 6) // CH_REQ_CHARINFO_PER_PAGE
+
+// Packet: 0x099d
+packetLen(0x099d, -1) // HC_ACK_CHARINFO_PER_PAGE
+
+// Packet: 0x099e
+packetLen(0x099e, 12) // HC_QUEUE_ORDER
+
+// Packet: 0x099f
+packetLen(0x099f, -1) // ZC_SKILL_ENTRY4
+
+// Packet: 0x09a0
+packetLen(0x09a0, 6) // HC_CHARLIST_NOTIFY
+
+// Packet: 0x09a1
+packetLen(0x09a1, 2) // CH_CHARLIST_REQ
+
+// Packet: 0x09a2
+packetLen(0x09a2, 6) // AC_REQ_MOBILE_OTP
+
+// Packet: 0x09a3
+packetLen(0x09a3, -1) // CA_ACK_MOBILE_OTP
+
+// Packet: 0x09a4
+packetLen(0x09a4, 18) // ZC_DISPATCH_TIMING_INFO_CHN
+
+// Packet: 0x09a5
+packetLen(0x09a5, 7) // AC_REFUSE_LOGIN3
+
+// Packet: 0x09a6
+packetLen(0x09a6, 12) // ZC_BANKING_CHECK
+
+// Packet: 0x09a7
+packetLen(0x09a7, 10) // CZ_REQ_BANKING_DEPOSIT
+
+// Packet: 0x09a8
+packetLen(0x09a8, 16) // ZC_ACK_BANKING_DEPOSIT
+
+// Packet: 0x09a9
+packetLen(0x09a9, 10) // CZ_REQ_BANKING_WITHDRAW
+
+// Packet: 0x09aa
+packetLen(0x09aa, 16) // ZC_ACK_BANKING_WITHDRAW
+
+// Packet: 0x09ab
+packetLen(0x09ab, 6) // CZ_REQ_BANKING_CHECK
+
+// Packet: 0x09ac
+packetLen(0x09ac, -1) // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ad
+packetLen(0x09ad, 12) // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO
+
+// Packet: 0x09ae
+packetLen(0x09ae, 19) // CZ_REQ_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09af
+packetLen(0x09af, 4) // ZC_ACK_APPLY_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b0
+packetLen(0x09b0, 10) // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b1
+packetLen(0x09b1, 4) // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM
+
+// Packet: 0x09b2
+packetLen(0x09b2, 10) // ZC_NOTIFY_BARGAIN_SALE_SELLING
+
+// Packet: 0x09b3
+packetLen(0x09b3, 6) // ZC_NOTIFY_BARGAIN_SALE_CLOSE
+
+// Packet: 0x09b4
+packetLen(0x09b4, 6) // CZ_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b5
+packetLen(0x09b5, 2) // ZC_OPEN_BARGAIN_SALE_TOOL
+
+// Packet: 0x09b6
+packetLen(0x09b6, 6) // CZ_REQ_OPEN_BANKING
+
+// Packet: 0x09b7
+packetLen(0x09b7, 4) // ZC_ACK_OPEN_BANKING
+
+// Packet: 0x09b8
+packetLen(0x09b8, 6) // CZ_REQ_CLOSE_BANKING
+
+// Packet: 0x09b9
+packetLen(0x09b9, 4) // ZC_ACK_CLOSE_BANKING
+
+// Packet: 0x09ba
+packetLen(0x09ba, 2) // CZ_REQ_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bb
+packetLen(0x09bb, 6) // ZC_ACK_OPEN_GUILD_STORAGE
+
+// Packet: 0x09bc
+packetLen(0x09bc, 6) // CZ_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09bd
+packetLen(0x09bd, 2) // ZC_CLOSE_BARGAIN_SALE_TOOL
+
+// Packet: 0x09be
+packetLen(0x09be, 2) // CZ_REQ_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09bf
+packetLen(0x09bf, 4) // ZC_ACK_CLOSE_GUILD_STORAGE
+
+// Packet: 0x09c1
+packetLen(0x09c1, 10) // ZC_C_MARKERINFO
+
+// Packet: 0x09c2
+packetLen(0x09c2, -1) // HC_SECRETSCAN_DATA
+
+// Packet: 0x09c3
+packetLen(0x09c3, 10) // CZ_REQ_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c4
+packetLen(0x09c4, 10) // ZC_ACK_COUNT_BARGAIN_SALE_ITEM
+
+// Packet: 0x09c5
+packetLen(0x09c5, 1042) // CS_LOGIN_QUERY
+
+// Packet: 0x09c6
+packetLen(0x09c6, -1) // SC_LOGIN_ANSWER
+
+// Packet: 0x09c7
+packetLen(0x09c7, 18) // SC_LOGIN_ERROR
+
+// Packet: 0x09c8
+packetLen(0x09c8, -1) // CA_LOGIN_OTP
+
+// Packet: 0x09c9
+packetLen(0x09c9, -1) // SC_SOCT
+
+// Packet: 0x09ca
+packetLen(0x09ca, -1) // ZC_SKILL_ENTRY5
+
+// Packet: 0x09cb
+packetLen(0x09cb, 17) // ZC_USE_SKILL2
+
+// Packet: 0x09cc
+packetLen(0x09cc, -1) // ZC_SECRETSCAN_DATA
+
+// Packet: 0x09cd
+packetLen(0x09cd, 8) // ZC_MSG_COLOR
+
+// Packet: 0x09ce
+packetLen(0x09ce, 102) // CZ_ITEM_CREATE_EX
+
+// Packet: 0x09cf
+packetLen(0x09cf, -1) // ZC_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d0
+packetLen(0x09d0, -1) // CZ_NPROTECTGAMEGUARDCSAUTH
+
+// Packet: 0x09d1
+packetLen(0x09d1, 14) // ZC_PROGRESS_ACTOR
+
+// Packet: 0x09d2
+packetLen(0x09d2, -1) // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5
+
+// Packet: 0x09d3
+packetLen(0x09d3, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5
+
+// Packet: 0x09d4
+packetLen(0x09d4, 2) // CZ_NPC_TRADE_QUIT
+
+// Packet: 0x09d5
+packetLen(0x09d5, -1) // ZC_NPC_MARKET_OPEN
+
+// Packet: 0x09d6
+packetLen(0x09d6, -1) // CZ_NPC_MARKET_PURCHASE
+
+// Packet: 0x09d7
+packetLen(0x09d7, -1) // ZC_NPC_MARKET_PURCHASE_RESULT
+
+// Packet: 0x09d8
+packetLen(0x09d8, 2) // CZ_NPC_MARKET_CLOSE
+
+// Packet: 0x09d9
+packetLen(0x09d9, 4) // CZ_REQ_GUILDSTORAGE_LOG
+
+// Packet: 0x09da
+packetLen(0x09da, -1) // ZC_ACK_GUILDSTORAGE_LOG
+
+// Packet: 0x09db
+packetLen(0x09db, -1) // ZC_NOTIFY_MOVEENTRY10
+
+// Packet: 0x09dc
+packetLen(0x09dc, -1) // ZC_NOTIFY_NEWENTRY10
+
+// Packet: 0x09dd
+packetLen(0x09dd, -1) // ZC_NOTIFY_STANDENTRY10
+
+// Packet: 0x09de
+packetLen(0x09de, -1) // ZC_WHISPER02
+
+// Packet: 0x09df
+packetLen(0x09df, 7) // ZC_ACK_WHISPER02
+
+// Packet: 0x09e0
+packetLen(0x09e0, -1) // SC_LOGIN_ANSWER_WITH_ID
+
+// Packet: 0x09e1
+packetLen(0x09e1, 8) // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE
+
+// Packet: 0x09e2
+packetLen(0x09e2, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY
+
+// Packet: 0x09e3
+packetLen(0x09e3, 8) // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE
+
+// Packet: 0x09e4
+packetLen(0x09e4, 8) // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART
+
+// Packet: 0x09e5
+packetLen(0x09e5, 18) // ZC_DELETEITEM_FROM_MCSTORE2
+
+// Packet: 0x09e6
+packetLen(0x09e6, 24) // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
+
+// Packet: 0x09e7
+packetLen(0x09e7, 3) // ZC_NOTIFY_UNREAD_RODEX
+
+// Packet: 0x09e8
+packetLen(0x09e8, 11) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x09e9
+packetLen(0x09e9, 2) // CZ_CLOSE_RODEXBOX
+
+// Packet: 0x09ea
+packetLen(0x09ea, 11) // CZ_REQ_READ_RODEX
+
+// Packet: 0x09eb
+packetLen(0x09eb, -1) // ZC_ACK_READ_RODEX
+
+// Packet: 0x09ec
+packetLen(0x09ec, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x09ed
+packetLen(0x09ed, 3) // ZC_ACK_SEND_RODEX
+
+// Packet: 0x09ee
+packetLen(0x09ee, 11) // CZ_REQ_NEXT_RODEX
+
+// Packet: 0x09ef
+packetLen(0x09ef, 11) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x09f0
+packetLen(0x09f0, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x09f1
+packetLen(0x09f1, 11) // CZ_REQ_ZENY_FROM_RODEX
+
+// Packet: 0x09f2
+packetLen(0x09f2, 12) // ZC_ACK_ZENY_FROM_RODEX
+
+// Packet: 0x09f3
+packetLen(0x09f3, 11) // CZ_REQ_ITEM_FROM_RODEX
+
+// Packet: 0x09f4
+packetLen(0x09f4, 12) // ZC_ACK_ITEM_FROM_RODEX
+
+// Packet: 0x09f5
+packetLen(0x09f5, 11) // CZ_REQ_DELETE_RODEX
+
+// Packet: 0x09f6
+packetLen(0x09f6, 11) // ZC_ACK_DELETE_RODEX
+
+// Packet: 0x09f7
+packetLen(0x09f7, 77) // ZC_PROPERTY_HOMUN_2
+
+// Packet: 0x09f8
+packetLen(0x09f8, -1) // ZC_ALL_QUEST_LIST3
+
+// Packet: 0x09f9
+packetLen(0x09f9, 143) // ZC_ADD_QUEST_EX
+
+// Packet: 0x09fa
+packetLen(0x09fa, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x09fb
+packetLen(0x09fb, -1) // CZ_PET_EVOLUTION
+
+// Packet: 0x09fc
+packetLen(0x09fc, 6) // ZC_PET_EVOLUTION_RESULT
+
+// Packet: 0x09fd
+packetLen(0x09fd, -1) // ZC_NOTIFY_MOVEENTRY11
+
+// Packet: 0x09fe
+packetLen(0x09fe, -1) // ZC_NOTIFY_NEWENTRY11
+
+// Packet: 0x09ff
+packetLen(0x09ff, -1) // ZC_NOTIFY_STANDENTRY11
+
+// Packet: 0x0a00
+packetLen(0x0a00, 269) // ZC_SHORTCUT_KEY_LIST_V3
+
+// Packet: 0x0a01
+packetLen(0x0a01, 3) // CZ_SHORTCUTKEYBAR_ROTATE
+
+// Packet: 0x0a02
+packetLen(0x0a02, 4) // ZC_DRESSROOM_OPEN
+
+// Packet: 0x0a03
+packetLen(0x0a03, 2) // CZ_REQ_CANCEL_WRITE_RODEX
+
+// Packet: 0x0a04
+packetLen(0x0a04, 6) // CZ_REQ_ADD_ITEM_RODEX
+
+// Packet: 0x0a05
+packetLen(0x0a05, 63) // ZC_ACK_ADD_ITEM_RODEX
+
+// Packet: 0x0a06
+packetLen(0x0a06, 6) // CZ_REQ_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a07
+packetLen(0x0a07, 9) // ZC_ACK_REMOVE_RODEX_ITEM
+
+// Packet: 0x0a08
+packetLen(0x0a08, 26) // CZ_REQ_OPEN_WRITE_RODEX
+
+// Packet: 0x0a09
+packetLen(0x0a09, 55) // ZC_ADD_EXCHANGE_ITEM3
+
+// Packet: 0x0a0a
+packetLen(0x0a0a, 57) // ZC_ADD_ITEM_TO_STORE3
+
+// Packet: 0x0a0b
+packetLen(0x0a0b, 57) // ZC_ADD_ITEM_TO_CART3
+
+// Packet: 0x0a0c
+packetLen(0x0a0c, 66) // ZC_ITEM_PICKUP_ACK_V6
+
+// Packet: 0x0a0d
+packetLen(0x0a0d, -1) // ZC_INVENTORY_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a0e
+packetLen(0x0a0e, 14) // ZC_BATTLEFIELD_NOTIFY_HP2
+
+// Packet: 0x0a0f
+packetLen(0x0a0f, -1) // ZC_CART_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a10
+packetLen(0x0a10, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a11
+packetLen(0x0a11, -1) // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0a12
+packetLen(0x0a12, 27) // ZC_ACK_OPEN_WRITE_RODEX
+
+// Packet: 0x0a13
+packetLen(0x0a13, 26) // CZ_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a14
+packetLen(0x0a14, 10) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a15
+packetLen(0x0a15, 12) // ZC_GOLDPCCAFE_POINT
+
+// Packet: 0x0a16
+packetLen(0x0a16, 26) // CZ_DYNAMICNPC_CREATE_REQUEST
+
+// Packet: 0x0a17
+packetLen(0x0a17, 6) // ZC_DYNAMICNPC_CREATE_RESULT
+
+// Packet: 0x0a18
+packetLen(0x0a18, 14) // ZC_ACCEPT_ENTER3
+
+// Packet: 0x0a19
+packetLen(0x0a19, 2) // CZ_REQ_OPEN_ROULETTE
+
+// Packet: 0x0a1a
+packetLen(0x0a1a, 25) // ZC_ACK_OPEN_ROULETTE
+
+// Packet: 0x0a1b
+packetLen(0x0a1b, 2) // CZ_REQ_ROULETTE_INFO
+
+// Packet: 0x0a1c
+packetLen(0x0a1c, -1) // ZC_ACK_ROULEITTE_INFO
+
+// Packet: 0x0a1d
+packetLen(0x0a1d, 2) // CZ_REQ_CLOSE_ROULETTE
+
+// Packet: 0x0a1e
+packetLen(0x0a1e, 3) // ZC_ACK_CLOSE_ROULETTE
+
+// Packet: 0x0a1f
+packetLen(0x0a1f, 2) // CZ_REQ_GENERATE_ROULETTE
+
+// Packet: 0x0a20
+packetLen(0x0a20, 23) // ZC_ACK_GENERATE_ROULETTE
+
+// Packet: 0x0a21
+packetLen(0x0a21, 3) // CZ_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a22
+packetLen(0x0a22, 7) // ZC_RECV_ROULETTE_ITEM
+
+// Packet: 0x0a23
+packetLen(0x0a23, -1) // ZC_ALL_ACH_LIST
+
+// Packet: 0x0a24
+packetLen(0x0a24, 66) // ZC_ACH_UPDATE
+
+// Packet: 0x0a25
+packetLen(0x0a25, 6) // CZ_REQ_ACH_REWARD
+
+// Packet: 0x0a26
+packetLen(0x0a26, 7) // ZC_REQ_ACH_REWARD_ACK
+
+// Packet: 0x0a27
+packetLen(0x0a27, 8) // ZC_RECOVERY2
+
+// Packet: 0x0a28
+packetLen(0x0a28, 3) // ZC_ACK_OPENSTORE2
+
+// Packet: 0x0a29
+packetLen(0x0a29, 6) // ZC_REQ_AU_BOT
+
+// Packet: 0x0a2a
+packetLen(0x0a2a, 6) // CZ_ACK_AU_BOT
+
+// Packet: 0x0a2b
+packetLen(0x0a2b, 14) // ZC_SE_CASHSHOP_OPEN2
+
+// Packet: 0x0a2c
+packetLen(0x0a2c, 12) // ZC_SE_PC_BUY_TAIWANCASHITEM_RESULT
+
+// Packet: 0x0a2d
+packetLen(0x0a2d, -1) // ZC_EQUIPWIN_MICROSCOPE_V6
+
+// Packet: 0x0a2e
+packetLen(0x0a2e, 6) // CZ_REQ_CHANGE_TITLE
+
+// Packet: 0x0a2f
+packetLen(0x0a2f, 7) // ZC_ACK_CHANGE_TITLE
+
+// Packet: 0x0a30
+packetLen(0x0a30, 106) // ZC_ACK_REQNAMEALL2
+
+// Packet: 0x0a31
+packetLen(0x0a31, -1) // ZC_RESULT_PACKAGE_ITEM_TEST
+
+// Packet: 0x0a32
+packetLen(0x0a32, 2) // ZC_OPEN_RODEX_THROUGH_NPC_ONLY
+
+// Packet: 0x0a33
+packetLen(0x0a33, 7) // ZC_UPDATE_ROULETTE_COIN
+
+// Packet: 0x0a34
+packetLen(0x0a34, 6) // ZC_UPDATE_TAIWANCASH
+
+// Packet: 0x0a35
+packetLen(0x0a35, 4) // CZ_REQ_ONECLICK_ITEMIDENTIFY
+
+// Packet: 0x0a36
+packetLen(0x0a36, 7) // ZC_HP_INFO_TINY
+
+// Packet: 0x0a37
+packetLen(0x0a37, 69) // ZC_ITEM_PICKUP_ACK_V7
+
+// Packet: 0x0a38
+packetLen(0x0a38, 3) // ZC_OPEN_UI
+
+// Packet: 0x0a39
+packetLen(0x0a39, 36) // CH_MAKE_CHAR
+
+// Packet: 0x0a3a
+packetLen(0x0a3a, 12)
+
+// Packet: 0x0a3b
+packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+
+// Packet: 0x0a3c
+packetLen(0x0a3c, -1)
+
+// Packet: 0x0a3d
+packetLen(0x0a3d, 20)
+
+// Packet: 0x0a3e
+packetLen(0x0a3e, -1)
+
+// Packet: 0x0a3f
+packetLen(0x0a3f, 11)
+
+// Packet: 0x0a40
+packetLen(0x0a40, 11)
+
+// Packet: 0x0a41
+packetLen(0x0a41, 18) // ZC_AOE_EFFECT_SKILL
+
+// Packet: 0x0a42
+packetLen(0x0a42, 43)
+
+// Packet: 0x0a43
+packetLen(0x0a43, 85) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0a44
+packetLen(0x0a44, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0a46
+packetLen(0x0a46, 14) // CZ_REQ_STYLE_CHANGE
+
+// Packet: 0x0a47
+packetLen(0x0a47, 3) // ZC_STYLE_CHANGE_RES
+
+// Packet: 0x0a48
+packetLen(0x0a48, 2)
+
+// Packet: 0x0a49
+packetLen(0x0a49, 22) // CZ_PRIVATE_AIRSHIP_REQUEST
+
+// Packet: 0x0a4a
+packetLen(0x0a4a, 6) // ZC_PRIVATE_AIRSHIP_RESPONSE
+
+// Packet: 0x0a4b
+packetLen(0x0a4b, 22) // ZC_AIRSHIP_MAPMOVE
+
+// Packet: 0x0a4c
+packetLen(0x0a4c, 28) // ZC_AIRSHIP_SERVERMOVE
+
+// Packet: 0x0a4d
+packetLen(0x0a4d, -1)
+
+// Packet: 0x0a4e
+packetLen(0x0a4e, 6)
+
+// Packet: 0x0a4f
+packetLen(0x0a4f, -1)
+
+// Packet: 0x0a50
+packetLen(0x0a50, 4)
+
+// Packet: 0x0a51
+packetLen(0x0a51, 34) // ZC_CHECK_RECEIVE_CHARACTER_NAME
+
+// Packet: 0x0a52
+packetLen(0x0a52, 20)
+
+// Packet: 0x0a53
+packetLen(0x0a53, 10)
+
+// Packet: 0x0a54
+packetLen(0x0a54, -1)
+
+// Packet: 0x0a55
+packetLen(0x0a55, 2)
+
+// Packet: 0x0a56
+packetLen(0x0a56, 6)
+
+// Packet: 0x0a57
+packetLen(0x0a57, 6)
+
+// Packet: 0x0a58
+packetLen(0x0a58, 8)
+
+// Packet: 0x0a59
+packetLen(0x0a59, -1)
+
+// Packet: 0x0a5a
+packetLen(0x0a5a, 2)
+
+// Packet: 0x0a5b
+packetLen(0x0a5b, 7)
+
+// Packet: 0x0a5c
+packetLen(0x0a5c, 18)
+
+// Packet: 0x0a5d
+packetLen(0x0a5d, 6)
+
+// Packet: 0x0a68
+packetLen(0x0a68, 3) // CZ_REQ_OPEN_UI
+
+// Packet: 0x0a69
+packetLen(0x0a69, 6)
+
+// Packet: 0x0a6a
+packetLen(0x0a6a, 12)
+
+// Packet: 0x0a6b
+packetLen(0x0a6b, -1)
+
+// Packet: 0x0a6c
+packetLen(0x0a6c, 7)
+
+// Packet: 0x0a6d
+packetLen(0x0a6d, -1)
+
+// Packet: 0x0a6e
+packetLen(0x0a6e, -1) // CZ_REQ_SEND_RODEX
+
+// Packet: 0x0a6f
+packetLen(0x0a6f, -1) // ZC_FORMATSTRING_MSG_COLOR
+
+// Packet: 0x0a70
+packetLen(0x0a70, 2)
+
+// Packet: 0x0a71
+packetLen(0x0a71, -1)
+
+// Packet: 0x0a72
+packetLen(0x0a72, 61)
+
+// Packet: 0x0a73
+packetLen(0x0a73, 2)
+
+// Packet: 0x0a74
+packetLen(0x0a74, 8)
+
+// Packet: 0x0a76
+packetLen(0x0a76, 80)
+
+// Packet: 0x0a77
+packetLen(0x0a77, 15)
+
+// Packet: 0x0a78
+packetLen(0x0a78, 15)
+
+// Packet: 0x0a79
+packetLen(0x0a79, -1)
+
+// Packet: 0x0a7b
+packetLen(0x0a7b, -1)
+
+// Packet: 0x0a7c
+packetLen(0x0a7c, -1)
+
+// Packet: 0x0a7d
+packetLen(0x0a7d, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0a7e
+packetLen(0x0a7e, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS_READY
+
+// Packet: 0x0a7f
+packetLen(0x0a7f, -1) // CZ_OFFLINE_STORE_CREATE
+
+// Packet: 0x0a80
+packetLen(0x0a80, 6)
+
+// Packet: 0x0a81
+packetLen(0x0a81, 4)
+
+// Packet: 0x0a82
+packetLen(0x0a82, 46)
+
+// Packet: 0x0a83
+packetLen(0x0a83, 46)
+
+// Packet: 0x0a84
+packetLen(0x0a84, 94) // ZC_GUILD_INFO
+
+// Packet: 0x0a85
+packetLen(0x0a85, 82)
+
+// Packet: 0x0a86
+packetLen(0x0a86, -1)
+
+// Packet: 0x0a87
+packetLen(0x0a87, -1)
+
+// Packet: 0x0a88
+packetLen(0x0a88, 2)
+
+// Packet: 0x0a89
+packetLen(0x0a89, 61) // ZC_NOTIFY_OFFLINE_STORE
+
+// Packet: 0x0a8a
+packetLen(0x0a8a, 6) // ZC_OFFLINE_STORE_VANISH
+
+// Packet: 0x0a8b
+packetLen(0x0a8b, 2)
+
+// Packet: 0x0a8c
+packetLen(0x0a8c, 2)
+
+// Packet: 0x0a8d
+packetLen(0x0a8d, -1) // ZC_OFFLINE_STORE_OWNER_ITEMS
+
+// Packet: 0x0a8e
+packetLen(0x0a8e, 2)
+
+// Packet: 0x0a8f
+packetLen(0x0a8f, 2)
+
+// Packet: 0x0a90
+packetLen(0x0a90, 3)
+
+// Packet: 0x0a91
+packetLen(0x0a91, -1) // ZC_OFFLINE_STORE_ITEMS
+
+// Packet: 0x0a92
+packetLen(0x0a92, -1)
+
+// Packet: 0x0a93
+packetLen(0x0a93, 3)
+
+// Packet: 0x0a94
+packetLen(0x0a94, 2)
+
+// Packet: 0x0a95
+packetLen(0x0a95, 4)
+
+// Packet: 0x0a96
+packetLen(0x0a96, 61) // ZC_ADD_EXCHANGE_ITEM4
+
+// Packet: 0x0a97
+packetLen(0x0a97, 8) // CZ_ALT_EQUIPMENT_ADD
+
+// Packet: 0x0a98
+packetLen(0x0a98, 10) // ZC_ALT_EQUIPMENT_EQUIP
+
+// Packet: 0x0a99
+packetLen(0x0a99, 4) // CZ_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9a
+packetLen(0x0a9a, 10) // ZC_ALT_EQUIPMENT_REMOVE
+
+// Packet: 0x0a9b
+packetLen(0x0a9b, -1) // ZC_ALT_EQUIPMENT_ITEMS
+
+// Packet: 0x0a9c
+packetLen(0x0a9c, 2) // CZ_ALT_EQUIPMENT_SWITCH
+
+// Packet: 0x0a9d
+packetLen(0x0a9d, 4) // ZC_ALT_EQUIPMENT_SWITCH_ACK
+
+// Packet: 0x0a9e
+packetLen(0x0a9e, 2)
+
+// Packet: 0x0a9f
+packetLen(0x0a9f, 2)
+
+// Packet: 0x0aa0
+packetLen(0x0aa0, 2) // ZC_REFINE_OPEN_WINDOW
+
+// Packet: 0x0aa1
+packetLen(0x0aa1, 4) // CZ_REFINE_ADD_ITEM
+
+// Packet: 0x0aa2
+packetLen(0x0aa2, -1) // ZC_REFINE_ADD_ITEM
+
+// Packet: 0x0aa3
+packetLen(0x0aa3, 9) // CZ_REFINE_ITEM_REQUEST
+
+// Packet: 0x0aa4
+packetLen(0x0aa4, 2) // CZ_REFINE_WINDOW_CLOSE
+
+// Packet: 0x0aa5
+packetLen(0x0aa5, -1) // ZC_MEMBERMGR_INFO
+
+// Packet: 0x0aa6
+packetLen(0x0aa6, 36) // ZC_MEMBER_ADD
+
+// Packet: 0x0aa7
+packetLen(0x0aa7, 6) // ZC_INVENTORY_MOVE_FAILED
+
+// Packet: 0x0aa8
+packetLen(0x0aa8, 5)
+
+// Packet: 0x0aa9
+packetLen(0x0aa9, -1)
+
+// Packet: 0x0aaa
+packetLen(0x0aaa, -1)
+
+// Packet: 0x0aab
+packetLen(0x0aab, -1)
+
+// Packet: 0x0aac
+packetLen(0x0aac, 69)
+
+// Packet: 0x0aad
+packetLen(0x0aad, 51)
+
+// Packet: 0x0aae
+packetLen(0x0aae, 2)
+
+// Packet: 0x0aaf
+packetLen(0x0aaf, 6)
+
+// Packet: 0x0ab0
+packetLen(0x0ab0, 6)
+
+// Packet: 0x0ab1
+packetLen(0x0ab1, 14)
+
+// Packet: 0x0ab2
+packetLen(0x0ab2, 7) // ZC_GROUP_ISALIVE
+
+// Packet: 0x0ab3
+packetLen(0x0ab3, 19)
+
+// Packet: 0x0ab4
+packetLen(0x0ab4, 6)
+
+// Packet: 0x0ab5
+packetLen(0x0ab5, 2)
+
+// Packet: 0x0ab6
+packetLen(0x0ab6, 8)
+
+// Packet: 0x0ab7
+packetLen(0x0ab7, 4)
+
+// Packet: 0x0ab8
+packetLen(0x0ab8, 2)
+
+// Packet: 0x0ab9
+packetLen(0x0ab9, 47) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0aba
+packetLen(0x0aba, 2)
+
+// Packet: 0x0abb
+packetLen(0x0abb, 2)
+
+// Packet: 0x0abc
+packetLen(0x0abc, -1)
+
+// Packet: 0x0abd
+packetLen(0x0abd, 10) // ZC_PARTY_MEMBER_JOB_LEVEL
+
+// Packet: 0x0abe
+packetLen(0x0abe, -1) // ZC_WARPLIST
+
+// Packet: 0x0abf
+packetLen(0x0abf, -1)
+
+// Packet: 0x0ac0
+packetLen(0x0ac0, 26) // CZ_OPEN_RODEXBOX
+
+// Packet: 0x0ac1
+packetLen(0x0ac1, 26) // CZ_REQ_REFRESH_RODEX
+
+// Packet: 0x0ac2
+packetLen(0x0ac2, -1) // ZC_ACK_RODEX_LIST
+
+// Packet: 0x0ac3
+packetLen(0x0ac3, 2)
+
+// Packet: 0x0ac4
+packetLen(0x0ac4, -1) // AC_ACCEPT_LOGIN
+
+// Packet: 0x0ac5
+packetLen(0x0ac5, 156) // HC_NOTIFY_ZONESVR
+
+// Packet: 0x0ac6
+packetLen(0x0ac6, 156)
+
+// Packet: 0x0ac7
+packetLen(0x0ac7, 156) // ZC_NPCACK_SERVERMOVE
+
+// Packet: 0x0ac8
+packetLen(0x0ac8, 2) // ZC_UNKNOWN_CLEAN_ITEMS_LISTS
+
+// Packet: 0x0ac9
+packetLen(0x0ac9, -1)
+
+// Packet: 0x0aca
+packetLen(0x0aca, 3)
+
+// Packet: 0x0acb
+packetLen(0x0acb, 12) // ZC_PAR_CHANGE
+
+// Packet: 0x0acc
+packetLen(0x0acc, 18) // ZC_NOTIFY_EXP
+
+// Packet: 0x0acd
+packetLen(0x0acd, 23)
+
+// Packet: 0x0ace
+packetLen(0x0ace, 4)
+
+// Packet: 0x0acf
+packetLen(0x0acf, 68) // CA_LOGIN_OTP
+
+// Packet: 0x0ad0
+packetLen(0x0ad0, 11) // CA_OTP_CODE
+
+// Packet: 0x0ad1
+packetLen(0x0ad1, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ad2
+packetLen(0x0ad2, 30)
+
+// Packet: 0x0ad3
+packetLen(0x0ad3, -1)
+
+// Packet: 0x0ad4
+packetLen(0x0ad4, -1)
+
+// Packet: 0x0ad5
+packetLen(0x0ad5, 2)
+
+// Packet: 0x0ad6
+packetLen(0x0ad6, 2)
+
+// Packet: 0x0ad7
+packetLen(0x0ad7, 8)
+
+// Packet: 0x0ad8
+packetLen(0x0ad8, 8)
+
+// Packet: 0x0ad9
+packetLen(0x0ad9, -1)
+
+// Packet: 0x0ada
+packetLen(0x0ada, 32) // ZC_REFINE_STATUS
+
+// Packet: 0x0adb
+packetLen(0x0adb, -1)
+
+// Packet: 0x0adc
+packetLen(0x0adc, 6) // ZC_EQUIPWIN_OTHER
+
+// Packet: 0x0add
+packetLen(0x0add, 24) // ZC_ITEM_FALL_ENTRY
+
+// Packet: 0x0ade
+packetLen(0x0ade, 6) // ZC_OVERWEIGHT_PERCENT
+
+// Packet: 0x0adf
+packetLen(0x0adf, 58) // ZC_ACK_REQNAME
+
+// Packet: 0x0ae0
+packetLen(0x0ae0, 30)
+
+// Packet: 0x0ae1
+packetLen(0x0ae1, 28)
+
+// Packet: 0x0ae2
+packetLen(0x0ae2, 7) // ZC_OPEN_UI
+
+// Packet: 0x0ae3
+packetLen(0x0ae3, -1) // AC_LOGIN_OTP
+
+// Packet: 0x0ae4
+packetLen(0x0ae4, 89) // ZC_ADD_MEMBER_TO_GROUP
+
+// Packet: 0x0ae5
+packetLen(0x0ae5, -1) // ZC_GROUP_LIST
+
+// Packet: 0x0ae6
+packetLen(0x0ae6, 10)
+
+// Packet: 0x0ae7
+packetLen(0x0ae7, 38)
+
+// Packet: 0x0ae8
+packetLen(0x0ae8, 2)
+
+// Packet: 0x0ae9
+packetLen(0x0ae9, 13) // HC_SECOND_PASSWD_LOGIN
+
+// Packet: 0x0aec
+packetLen(0x0aec, 2)
+
+// Packet: 0x0aed
+packetLen(0x0aed, 2)
+
+// Packet: 0x0aee
+packetLen(0x0aee, 2)
+
+// Packet: 0x0aef
+packetLen(0x0aef, 2) // CZ_ATTENDANCE_REWARD_REQUEST
+
+// Packet: 0x0af0
+packetLen(0x0af0, 10) // ZC_UI_ACTION
+
+// Packet: 0x0af2
+packetLen(0x0af2, 40)
+
+// Packet: 0x0af3
+packetLen(0x0af3, -1)
+
+// Packet: 0x0af4
+packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
+
+// Packet: 0x0af5
+packetLen(0x0af5, 3)
+
+// Packet: 0x0af6
+packetLen(0x0af6, 88)
+
+// Packet: 0x0af7
+packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
+
+// Packet: 0x0af8
+packetLen(0x0af8, 11)
+
+// Packet: 0x0af9
+packetLen(0x0af9, 6)
+
+// Packet: 0x0afa
+packetLen(0x0afa, 54)
+
+// Packet: 0x0afb
+packetLen(0x0afb, -1) // ZC_AUTOSPELLLIST
+
+// Packet: 0x0afc
+packetLen(0x0afc, 16) // CZ_REQ_STYLE_CHANGE2
+
+// Packet: 0x0afd
+packetLen(0x0afd, -1) // ZC_GUILD_POSITION
+
+// Packet: 0x0afe
+packetLen(0x0afe, -1) // ZC_UPDATE_MISSION_HUNT_EX
+
+// Packet: 0x0aff
+packetLen(0x0aff, -1) // ZC_ALL_QUEST_LIST4
+
+// Packet: 0x0b00
+packetLen(0x0b00, 8)
+
+// Packet: 0x0b01
+packetLen(0x0b01, 56)
+
+// Packet: 0x0b02
+packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
+
+// Packet: 0x0b03
+packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
+
+// Packet: 0x0b04
+packetLen(0x0b04, 80)
+
+// Packet: 0x0b05
+packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
+
+// Packet: 0x0b07
+packetLen(0x0b07, -1)
+
+// Packet: 0x0b08
+packetLen(0x0b08, -1) // ZC_INVENTORY_START
+
+// Packet: 0x0b09
+packetLen(0x0b09, -1) // ZC_STORE_ITEMLIST_NORMAL_V6
+
+// Packet: 0x0b0a
+packetLen(0x0b0a, -1) // ZC_STORE_ITEMLIST_EQUIP_V6
+
+// Packet: 0x0b0b
+packetLen(0x0b0b, 4) // ZC_INVENTORY_END
+
+// Packet: 0x0b0c
+packetLen(0x0b0c, 155) // ZC_ADD_QUEST_EX
+
+// Packet: 0x0b0d
+packetLen(0x0b0d, 10) // ZC_REMOVE_EFFECT
+
+// Packet: 0x0b0e
+packetLen(0x0b0e, -1) // ZC_NPC_BARTER_OPEN
+
+// Packet: 0x0b0f
+packetLen(0x0b0f, -1) // CZ_NPC_BARTER_PURCHASE
+
+// Packet: 0x0b10
+packetLen(0x0b10, 10) // CZ_START_USE_SKILL
+
+// Packet: 0x0b11
+packetLen(0x0b11, 4) // CZ_STOP_USE_SKILL
+
+// Packet: 0x0b12
+packetLen(0x0b12, 2) // CZ_NPC_BARTER_CLOSE
+
+// Packet: 0x0b13
+packetLen(0x0b13, 48) // ZC_ITEM_PREVIEW
+
+// Packet: 0x0b14
+packetLen(0x0b14, 2) // CZ_INVENTORY_EXPAND
+
+// Packet: 0x0b15
+packetLen(0x0b15, 7) // ZC_ACK_INVENTORY_EXPAND
+
+// Packet: 0x0b16
+packetLen(0x0b16, 2) // CZ_INVENTORY_EXPAND_CONFIRMED
+
+// Packet: 0x0b17
+packetLen(0x0b17, 3) // ZC_ACK_INVENTORY_EXPAND_RESULT
+
+// Packet: 0x0b18
+packetLen(0x0b18, 4) // ZC_INVENTORY_EXPANSION_INFO
+
+// Packet: 0x0b19
+packetLen(0x0b19, 2) // CZ_INVENTORY_EXPAND_REJECTED
+
+// Packet: 0x0b1a
+packetLen(0x0b1a, 29) // ZC_USESKILL_ACK3
+
+// Packet: 0x0b1b
+#if PACKETVER >= 20190130
+packetLen(0x0b1b, 2) // ZC_ALT_PING
+#endif
+
+// Packet: 0x0b1c
+#if PACKETVER >= 20190220
+packetLen(0x0b1c, 2) // CZ_PING
+#endif
+
+// Packet: 0x0b1d
+#if PACKETVER >= 20190220
+packetLen(0x0b1d, 2) // ZC_PING
+#endif
+
+// Packet: 0x0b1e
+#if PACKETVER >= 20190313
+packetLen(0x0b1e, 10)
+#endif
+
+// Packet: 0x0b1f
+#if PACKETVER >= 20190313
+packetLen(0x0b1f, 10)
+#endif
+
+// Packet: 0x0b20
+#if PACKETVER >= 20190327
+packetLen(0x0b20, 271)
+#endif
+
+// Packet: 0x0b21
+#if PACKETVER >= 20190327
+packetLen(0x0b21, 13)
+#endif
+
+// Packet: 0x0b22
+#if PACKETVER >= 20190327
+packetLen(0x0b22, 5)
+#endif
+
+
+#endif /* COMMON_PACKETS2019_LEN_ZERO_H */
diff --git a/src/common/packets/packets_len_zero.h b/src/common/packets/packets_len_zero.h
index 9b7278520..10295cac2 100644
--- a/src/common/packets/packets_len_zero.h
+++ b/src/common/packets/packets_len_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2019 Hercules Dev Team
- * Copyright (C) 2019 Andrei Karas (4144)
+ * Copyright (C) 2018-2019 Hercules Dev Team
+ * Copyright (C) 2018-2019 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
/* This file is autogenerated, please do not commit manual changes */
-#if PACKETVER >= 20180000
+#if PACKETVER >= 20190000
+#include "common/packets/packets2019_len_zero.h"
+#elif PACKETVER >= 20180000
#include "common/packets/packets2018_len_zero.h"
#elif PACKETVER >= 20170000
#include "common/packets/packets2017_len_zero.h"
diff --git a/src/common/socket.c b/src/common/socket.c
index 95d8bf578..dc5b06da0 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -79,8 +79,6 @@
static struct socket_interface sockt_s;
struct socket_interface *sockt;
-static const char *SOCKET_CONF_FILENAME = "conf/common/socket.conf";
-
#ifdef SEND_SHORTLIST
// Add a fd to the shortlist so that it'll be recognized as a fd that needs
// sending done on it.
@@ -462,7 +460,7 @@ static int recv_to_fifo(int fd)
socket_data_ci += len;
}
#endif // SHOW_SERVER_STATS
- return 0;
+ return (int)len;
}
static int send_from_fifo(int fd)
@@ -490,11 +488,12 @@ static int send_from_fifo(int fd)
return 0;
}
- if( len > 0 )
+ if (len > 0)
{
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
// some data could not be transferred?
// shift unsent data to the beginning of the queue
- if( (size_t)len < sockt->session[fd]->wdata_size )
+ if ((size_t)len < sockt->session[fd]->wdata_size)
memmove(sockt->session[fd]->wdata, sockt->session[fd]->wdata + len, sockt->session[fd]->wdata_size - len);
sockt->session[fd]->wdata_size -= len;
@@ -648,9 +647,10 @@ static int make_listen_bind(uint32 ip, uint16 port)
if(sockt->fd_max <= fd) sockt->fd_max = fd + 1;
- create_session(fd, connect_client, null_send, null_parse);
+ create_session(fd, sockt->connect_client, null_send, null_parse);
sockt->session[fd]->client_addr = 0; // just listens
sockt->session[fd]->rdata_tick = 0; // disable timeouts on this socket
+ sockt->session[fd]->wdata_tick = 0;
return fd;
}
@@ -733,6 +733,7 @@ static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseF
sockt->session[fd]->func_send = func_send;
sockt->session[fd]->func_parse = func_parse;
sockt->session[fd]->rdata_tick = sockt->last_tick;
+ sockt->session[fd]->wdata_tick = sockt->last_tick;
sockt->session[fd]->session_data = NULL;
sockt->session[fd]->hdata = NULL;
return 0;
@@ -1505,7 +1506,7 @@ static bool socket_config_read(const char *filename, bool imported)
// import should overwrite any previous configuration, so it should be called last
if (libconfig->lookup_string(&config, "import", &import) == CONFIG_TRUE) {
- if (strcmp(import, filename) == 0 || strcmp(import, SOCKET_CONF_FILENAME) == 0) {
+ if (strcmp(import, filename) == 0 || strcmp(import, sockt->SOCKET_CONF_FILENAME) == 0) {
ShowWarning("socket_config_read: Loop detected! Skipping 'import'...\n");
} else {
if (!socket_config_read(import, true))
@@ -1714,7 +1715,7 @@ static void socket_init(void)
// Get initial local ips
sockt->naddr_ = sockt->getips(sockt->addr_,16);
- socket_config_read(SOCKET_CONF_FILENAME, false);
+ socket_config_read(sockt->SOCKET_CONF_FILENAME, false);
#ifndef SOCKET_EPOLL
// Select based Event Dispatcher:
@@ -2143,6 +2144,8 @@ void socket_defaults(void)
{
sockt = &sockt_s;
+ sockt->SOCKET_CONF_FILENAME = "conf/common/socket.conf";
+
sockt->fd_max = 0;
/* */
sockt->stall_time = 60;
@@ -2177,6 +2180,7 @@ void socket_defaults(void)
/* */
sockt->flush = flush_fifo;
sockt->flush_fifos = flush_fifos;
+ sockt->connect_client = connect_client;
sockt->set_nonblocking = set_nonblocking;
sockt->set_defaultparse = set_defaultparse;
sockt->host2ip = host2ip;
diff --git a/src/common/socket.h b/src/common/socket.h
index 5e4251989..b20b0b07e 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -130,6 +130,7 @@ struct socket_data {
size_t rdata_pos;
uint32 last_head_size;
time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled
+ time_t wdata_tick; // time of last send (for detecting timeouts);
RecvFunc func_recv;
SendFunc func_send;
@@ -178,6 +179,7 @@ struct socket_interface {
time_t stall_time;
time_t last_tick;
+ const char *SOCKET_CONF_FILENAME;
/* */
uint32 addr_[16]; // ip addresses of local host (host byte order)
int naddr_; // # of ip addresses
@@ -212,6 +214,7 @@ struct socket_interface {
/* */
void (*flush) (int fd);
void (*flush_fifos) (void);
+ int (*connect_client) (int listen_fd);
void (*set_nonblocking) (int fd, unsigned long yes);
void (*set_defaultparse) (ParseFunc defaultparse);
/* hostname/ip conversion functions */
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index b8cb2a90a..e3977f440 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2015 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -221,8 +221,12 @@ enum windows_ver_suite {
#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#elif _MSC_VER >= 1800 && _MSC_VER < 1900
#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
-#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+#elif _MSC_VER >= 1900 && _MSC_VER < 1910
#define SYSINFO_COMPILER "Microsoft Visual C++ 2015 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1910 && _MSC_VER < 1920
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2017 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1920 && _MSC_VER < 2000
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2019 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#else // < 1300 || >= 2000
#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
#endif
diff --git a/src/login/login.c b/src/login/login.c
index 4c40677fa..580f79ebb 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1441,13 +1441,16 @@ static void login_parse_request_connection(int fd, struct login_session_data* sd
loginlog->log(sockt->session[fd]->client_addr, sd->userid, 100, message);
result = login->mmo_auth(sd, true);
- if (core->runflag == LOGINSERVER_ST_RUNNING &&
+
+ if (!sockt->allowed_ip_check(ipl)) {
+ ShowNotice("Connection of the char-server '%s' REFUSED (IP not allowed).\n", server_name);
+ login->char_server_connection_status(fd, sd, 2);
+ } else if (core->runflag == LOGINSERVER_ST_RUNNING &&
result == -1 &&
sd->sex == 'S' &&
sd->account_id >= 0 &&
sd->account_id < ARRAYLENGTH(login->dbs->server) &&
- !sockt->session_is_valid(login->dbs->server[sd->account_id].fd) &&
- sockt->allowed_ip_check(ipl))
+ !sockt->session_is_valid(login->dbs->server[sd->account_id].fd))
{
ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
safestrncpy(login->dbs->server[sd->account_id].name, server_name, sizeof(login->dbs->server[sd->account_id].name));
@@ -1465,11 +1468,9 @@ static void login_parse_request_connection(int fd, struct login_session_data* sd
// send connection success
login->char_server_connection_status(fd, sd, 0);
- }
- else
- {
+ } else {
ShowNotice("Connection of the char-server '%s' REFUSED.\n", server_name);
- login->char_server_connection_status(fd, sd, 3);
+ login->char_server_connection_status(fd, sd, 1);
}
}
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 6eff37df8..cbfa8e8c4 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -86,6 +86,7 @@
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/trade.h"
#include "map/unit.h"
#include "map/vending.h"
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index 3705fda0e..edb3fdaad 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -45,7 +45,7 @@ MAP_C = achievement.c atcommand.c battle.c battleground.c buyingstore.c channel.
instance.c intif.c irc-bot.c itemdb.c log.c mail.c map.c mapreg_sql.c \
mercenary.c mob.c npc.c npc_chat.c party.c path.c pc.c pc_groups.c \
pet.c quest.c rodex.c script.c searchstore.c skill.c status.c storage.c \
- trade.c unit.c vending.c
+ stylist.c trade.c unit.c vending.c
MAP_OBJ = $(addprefix obj_sql/, $(patsubst %c,%o,$(MAP_C)))
MAP_H = achievement.h atcommand.h battle.h battleground.h buyingstore.h channel.h chat.h \
chrif.h clan.h clif.h date.h duel.h elemental.h guild.h homunculus.h HPMmap.h \
@@ -55,7 +55,7 @@ MAP_H = achievement.h atcommand.h battle.h battleground.h buyingstore.h channel.
packets_keys_zero.h packets_shuffle_main.h packets_shuffle_re.h \
packets_shuffle_zero.h packets_struct.h party.h path.h pc.h pc_groups.h \
pet.h quest.h rodex.h script.h searchstore.h skill.h status.h storage.h \
- trade.h unit.h vending.h
+ stylist.h trade.h unit.h vending.h
MAP_PH =
HAVE_MYSQL=@HAVE_MYSQL@
diff --git a/src/map/achievement.c b/src/map/achievement.c
index 057ea29c3..7ab80e183 100644
--- a/src/map/achievement.c
+++ b/src/map/achievement.c
@@ -301,6 +301,9 @@ static int achievement_validate_type(struct map_session_data *sd, enum achieveme
Assert_ret(criteria->goal != 0);
+ if (battle_config.feature_enable_achievement == 0)
+ return 0;
+
if (type == ACH_QUEST) {
ShowError("achievement_validate_type: ACH_QUEST is not handled by this function. (use achievement_validate())\n");
return 0;
@@ -358,6 +361,9 @@ static bool achievement_validate(struct map_session_data *sd, int aid, unsigned
Assert_retr(false, progress > 0);
Assert_retr(false, obj_idx < MAX_ACHIEVEMENT_OBJECTIVES);
+ if (battle_config.feature_enable_achievement == 0)
+ return false;
+
if ((ad = achievement->get(aid)) == NULL) {
ShowError("achievement_validate: Invalid Achievement %d provided.", aid);
return false;
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0a1fd6da3..9ed56545c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2718,7 +2718,7 @@ ACMD(makeegg)
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(
sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
} else {
@@ -5277,18 +5277,43 @@ ACMD(follow)
}
/*==========================================
- * @dropall by [MouseJstr]
- * Drop all your possession on the ground
+ * @dropall by [MouseJstr] and [Xantara]
+ * Drop all your possession on the ground based on item type
*------------------------------------------*/
ACMD(dropall)
{
+ int type = -1;
+ int count = 0;
+
+ if (message[0] != '\0') {
+ type = atoi(message);
+ if (!((type >= IT_HEALING && type <= IT_DELAYCONSUME) || type == IT_CASH || type == -1)) {
+ clif->message(fd, msg_fd(fd, 1500));
+ clif->message(fd, msg_fd(fd, 1501));
+ return false;
+ }
+ }
+
for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount) {
- if(sd->status.inventory[i].equip != 0)
- pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
- pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ struct item_data *item_data = itemdb->exists(sd->status.inventory[i].nameid);
+ if (item_data == NULL) {
+ ShowWarning("Non-existant item %d on dropall list (account_id: %d, char_id: %d)\n", sd->status.inventory[i].nameid, sd->status.account_id, sd->status.char_id);
+ continue;
+ }
+ if (!pc->candrop(sd, &sd->status.inventory[i]))
+ continue;
+ if (type == -1 || type == item_data->type) {
+ if (sd->status.inventory[i].equip != 0)
+ pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC | PCUNEQUIPITEM_FORCE);
+ count += sd->status.inventory[i].amount;
+ pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ }
}
}
+
+ sprintf(atcmd_output, msg_fd(fd, 1502), count); // %d items are dropped!
+ clif->message(fd, atcmd_output);
return true;
}
@@ -7669,9 +7694,9 @@ ACMD(fakename)
if (sd->fakename[0])
{
sd->fakename[0] = '\0';
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
if( sd->disguise )
- clif->charnameack(sd->fd, &sd->bl);
+ clif->blname_ack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_fd(fd,1307)); // Returned to real name.
return true;
}
@@ -7687,9 +7712,9 @@ ACMD(fakename)
}
safestrncpy(sd->fakename, message, sizeof(sd->fakename));
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
if (sd->disguise) // Another packet should be sent so the client updates the name for sd
- clif->charnameack(sd->fd, &sd->bl);
+ clif->blname_ack(sd->fd, &sd->bl);
clif->message(sd->fd, msg_fd(fd,1310)); // Fake name enabled.
return true;
@@ -10716,6 +10741,9 @@ void atcommand_defaults(void)
{
atcommand = &atcommand_s;
+ atcommand->atcmd_output = &atcmd_output;
+ atcommand->atcmd_player_name = &atcmd_player_name;
+
atcommand->db = NULL;
atcommand->alias_db = NULL;
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 3bbbefa20..4fbf6b93a 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -21,9 +21,11 @@
#ifndef MAP_ATCOMMAND_H
#define MAP_ATCOMMAND_H
+#include "map/mapdefines.h"
#include "map/pc_groups.h"
#include "common/hercules.h"
#include "common/db.h"
+#include "common/mmo.h"
#include <stdarg.h>
@@ -39,7 +41,7 @@ struct config_setting_t;
* Defines
**/
#define ATCOMMAND_LENGTH 50
-#define MAX_MSG 1500
+#define MAX_MSG 1503
#define msg_txt(idx) atcommand->msg(idx)
#define msg_sd(sd,msg_number) atcommand->msgsd((sd),(msg_number))
#define msg_fd(fd,msg_number) atcommand->msgfd((fd),(msg_number))
@@ -90,6 +92,8 @@ struct atcmd_binding_data {
* Interface
**/
struct atcommand_interface {
+ char (*atcmd_output)[CHAT_SIZE_MAX];
+ char (*atcmd_player_name)[NAME_LENGTH];
unsigned char at_symbol;
unsigned char char_symbol;
/* atcommand binding */
diff --git a/src/map/battle.c b/src/map/battle.c
index f51240810..ba7c1130d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1019,7 +1019,7 @@ static int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct
{
struct map_session_data *sd, *tsd;
int cardfix = 1000;
- short t_class, s_class, s_race2, t_race2;
+ int t_class, s_class, s_race2, t_race2;
struct status_data *sstatus, *tstatus;
int i;
@@ -5552,7 +5552,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
#endif
if( flag.infdef ) { //Plants receive 1 damage when hit
- short class_ = status->get_class(target);
+ int class_ = status->get_class(target);
if( flag.hit || wd.damage > 0 )
wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage
if( flag.lh && (flag.hit || wd.damage2 > 0) )
@@ -6361,7 +6361,7 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_
if (d_bl != NULL
&& ((d_bl->type == BL_MER && d_md->master != NULL && d_md->master->bl.id == target->id)
- || (d_bl->type == BL_PC && d_sd->devotion[sce->val2] == target->id)
+ || (d_sd != NULL && d_bl->type == BL_PC && d_sd->devotion[sce->val2] == target->id)
)
&& check_distance_bl(target, d_bl, sce->val3)
) {
@@ -7413,6 +7413,11 @@ static const struct battle_data {
{ "min_item_buy_price", &battle_config.min_item_buy_price, 1, 0, INT_MAX, },
{ "min_item_sell_price", &battle_config.min_item_sell_price, 0, 0, INT_MAX, },
{ "display_fake_hp_when_dead", &battle_config.display_fake_hp_when_dead, 1, 0, 1, },
+ { "magicrod_type", &battle_config.magicrod_type, 0, 0, 1, },
+ { "features/enable_achievement_system", &battle_config.feature_enable_achievement, 1, 0, 1, },
+ { "ping_timer_inverval", &battle_config.ping_timer_interval, 30, 0, 99999999, },
+ { "ping_time", &battle_config.ping_time, 20, 0, 99999999, },
+ { "option_drop_max_loop", &battle_config.option_drop_max_loop, 10, 1, 100000, },
};
static bool battle_set_value_sub(int index, int value)
diff --git a/src/map/battle.h b/src/map/battle.h
index d2fd92450..a99e95c86 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -576,6 +576,15 @@ struct Battle_Config {
int min_item_sell_price;
int display_fake_hp_when_dead;
+
+ int magicrod_type;
+
+ int feature_enable_achievement;
+
+ int ping_timer_interval;
+ int ping_time;
+
+ int option_drop_max_loop;
};
/* criteria for battle_config.idletime_critera */
diff --git a/src/map/chat.c b/src/map/chat.c
index d9b642219..77a12a560 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -255,6 +255,14 @@ static int chat_leavechat(struct map_session_data *sd, bool kicked)
}
if( leavechar == 0 && cd->owner->type == BL_PC ) {
+
+ // check if new location are CELL_CHKNOCHAT
+ if (map->getcell(cd->usersd[0]->bl.m, NULL, cd->usersd[0]->bl.x, cd->usersd[0]->bl.y, CELL_CHKNOCHAT)) {
+ for (i = (cd->users - 1); i >= 0; i--)
+ chat->leave(cd->usersd[i], false);
+ return 2;
+ }
+
// Set and announce new owner
cd->owner = &cd->usersd[0]->bl;
clif->changechatowner(cd, cd->usersd[0]);
diff --git a/src/map/clif.c b/src/map/clif.c
index eba2ddce3..cd3131181 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -52,6 +52,7 @@
#include "map/script.h"
#include "map/skill.h"
#include "map/status.h"
+#include "map/stylist.h"
#include "map/storage.h"
#include "map/trade.h"
#include "map/unit.h"
@@ -5417,32 +5418,31 @@ static void clif_skillinfo(struct map_session_data *sd, int skill_id, int inf)
/// 1 = no text
static void clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime)
{
-#if PACKETVER < 20091124
- const int cmd = 0x13e;
-#else
- const int cmd = 0x7fb;
-#endif
- unsigned char buf[32];
- int property = skill->get_ele(skill_id, skill_lv);
+ nullpo_retv(bl);
- WBUFW(buf,0) = cmd;
- WBUFL(buf,2) = src_id;
- WBUFL(buf,6) = dst_id;
- WBUFW(buf,10) = dst_x;
- WBUFW(buf,12) = dst_y;
- WBUFW(buf,14) = skill_id;
- WBUFL(buf,16) = property<0?0:property; //Avoid sending negatives as element [Skotlex]
- WBUFL(buf,20) = casttime;
-#if PACKETVER >= 20091124
- WBUFB(buf,24) = 0; // isDisposable
+ const int element = skill->get_ele(skill_id, skill_lv);
+ struct PACKET_ZC_USESKILL_ACK p;
+ p.packetType = HEADER_ZC_USESKILL_ACK;
+ p.srcId = src_id;
+ p.dstId = dst_id;
+ p.x = dst_x;
+ p.y = dst_y;
+ p.skillId = skill_id;
+ p.element = element < 0 ? 0 : element; //Avoid sending negatives as element [Skotlex]
+ p.delayTime = casttime;
+#if PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
+ p.disposable = 0;
+#endif
+#if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
+ p.unknown = 0;
#endif
if (clif->isdisguised(bl)) {
- clif->send(buf,packet_len(cmd), bl, AREA_WOS);
- WBUFL(buf,2) = -src_id;
- clif->send(buf,packet_len(cmd), bl, SELF);
+ clif->send(&p, sizeof(p), bl, AREA_WOS);
+ p.srcId = -src_id;
+ clif->send(&p, sizeof(p), bl, SELF);
} else {
- clif->send(buf,packet_len(cmd), bl, AREA);
+ clif->send(&p, sizeof(p), bl, AREA);
}
#if PACKETVER >= 20151223
if ((skill->get_inf2(skill_id) & INF2_SHOW_SKILL_SCALE) != 0)
@@ -5783,7 +5783,7 @@ static void clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, u
nullpo_retv(sd);
fd = sd->fd;
#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
- len = sizeof(struct PACKET_ZC_WARPLIST) + sizeof(struct PACKET_ZC_WARPLIST_sub) * mapsCount;
+ len = sizeof(struct PACKET_ZC_WARPLIST) + sizeof(struct PACKET_ZC_WARPLIST_sub) * 6;
#else
len = sizeof(struct PACKET_ZC_WARPLIST);
#endif
@@ -7739,17 +7739,27 @@ static void clif_devotion(struct block_list *src, struct map_session_data *tsd)
static void clif_spiritball(struct block_list *bl)
{
unsigned char buf[16];
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
- struct homun_data *hd = BL_CAST(BL_HOM,bl);
nullpo_retv(bl);
WBUFW(buf, 0) = 0x1d0;
WBUFL(buf, 2) = bl->id;
WBUFW(buf, 6) = 0; //init to 0
- switch(bl->type){
- case BL_PC: WBUFW(buf, 6) = sd->spiritball; break;
- case BL_HOM: WBUFW(buf, 6) = hd->homunculus.spiritball; break;
+ switch (bl->type) {
+ case BL_PC:
+ {
+ struct map_session_data *sd = BL_CAST(BL_PC, bl);
+ nullpo_retv(sd);
+ WBUFW(buf, 6) = sd->spiritball;
+ break;
+ }
+ case BL_HOM:
+ {
+ struct homun_data *hd = BL_CAST(BL_HOM, bl);
+ nullpo_retv(hd);
+ WBUFW(buf, 6) = hd->homunculus.spiritball;
+ break;
+ }
}
clif->send(buf, packet_len(0x1d0), bl, AREA);
}
@@ -9228,7 +9238,7 @@ static void clif_refresh(struct map_session_data *sd)
/// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
/// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
/// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
-static void clif_charnameack(int fd, struct block_list *bl)
+static void clif_blname_ack(int fd, struct block_list *bl)
{
struct packet_reqnameall_ack packet = { 0 };
int len = sizeof(struct packet_reqnameall_ack);
@@ -9349,7 +9359,7 @@ static void clif_charnameack(int fd, struct block_list *bl)
memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH);
break;
default:
- ShowError("clif_charnameack: bad type %u(%d)\n", bl->type, bl->id);
+ ShowError("clif_blname_ack: bad type %u(%d)\n", bl->type, bl->id);
return;
}
@@ -10784,7 +10794,7 @@ static void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
}
#endif // 0
- clif->charnameack(fd, bl);
+ clif->blname_ack(fd, bl);
}
static int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data)
{
@@ -14517,7 +14527,7 @@ static void clif_parse_pet_evolution(int fd, struct map_session_data *sd)
intif->create_pet(
sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
clif->petEvolutionResult(fd, PET_EVOL_SUCCESS);
@@ -15662,6 +15672,7 @@ static void clif_parse_FeelSaveOk(int fd, struct map_session_data *sd)
/// 0 = sun
/// 1 = moon
/// 2 = star
+/// 10 = Do you agree to cast the magic spell that consumes 1 Black Gemstone and 1,000,000 Zeny?
static void clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv)
{
nullpo_retv(sd);
@@ -17010,6 +17021,9 @@ static void clif_parse_cz_config(int fd, struct map_session_data *sd)
hd->homunculus.autofeed = flag;
break;
}
+ case CZ_CONFIG_CALL:
+ sd->status.allow_call = flag;
+ break;
default:
ShowWarning("clif_parse_cz_config: Unsupported type has been received (%u).\n", type);
return;
@@ -18581,6 +18595,7 @@ static void clif_search_store_info_ack(struct map_session_data *sd)
/// 2 = "You cannot search anymore." (0x706)
/// 3 = "You cannot search yet." (0x708)
/// 4 = "No sale (purchase) information available." (0x705)
+/// 362 = silent error
static void clif_search_store_info_failed(struct map_session_data *sd, unsigned char reason)
{
#if PACKETVER >= 20100601
@@ -19359,7 +19374,7 @@ static void clif_partytickack(struct map_session_data *sd, bool flag)
WFIFOSET(sd->fd, packet_len(0x2c9));
}
-static void clif_ShowScript(struct block_list *bl, const char *message)
+static void clif_ShowScript(struct block_list *bl, const char *message, enum send_target target)
{
#if PACKETVER >= 20110111
char buf[256];
@@ -19380,7 +19395,7 @@ static void clif_ShowScript(struct block_list *bl, const char *message)
WBUFW(buf,2) = len+8;
WBUFL(buf,4) = bl->id;
safestrncpy(WBUFP(buf,8),message,len);
- clif->send(buf,WBUFW(buf,2),bl,AREA);
+ clif->send(buf, WBUFW(buf,2), bl, target);
#endif
}
@@ -20948,8 +20963,8 @@ static void clif_change_title_ack(int fd, struct map_session_data *sd, int title
WFIFOSET(fd, packet_len(0xa2f));
// Update names
- clif->charnameack(fd, &sd->bl);
- clif->charnameack(0, &sd->bl);
+ clif->blname_ack(fd, &sd->bl);
+ clif->blname_ack(0, &sd->bl);
#endif
}
// End of Achievement System
@@ -21072,7 +21087,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_CHECKNAME *rPacket = RFIFOP(fd, 0);
int char_id = 0, base_level = 0;
- short class = 0;
+ int class = 0;
char name[NAME_LENGTH];
safestrncpy(name, rPacket->Name, NAME_LENGTH);
@@ -21080,7 +21095,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
rodex->check_player(sd, name, &base_level, &char_id, &class);
}
-static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name)
+static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name)
{
#if PACKETVER >= 20140521
struct PACKET_ZC_CHECKNAME *sPacket;
@@ -21730,6 +21745,18 @@ static void clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType)
p.data = 0;
#endif
break;
+ case CZ_MACRO_REGISTER_UI:
+ p.UIType = ZC_CAPTCHA_UI;
+#if PACKETVER >= 20171122
+ p.data = 0;
+#endif
+ break;
+ case CZ_MACRO_DETECTOR_UI:
+ p.UIType = ZC_MACRO_UI;
+#if PACKETVER >= 20171122
+ p.data = 0;
+#endif
+ break;
case CZ_ATTENDANCE_UI:
{
if (clif->attendance_getendtime() < time(NULL)) {
@@ -21874,162 +21901,23 @@ static void clif_private_airship_response(struct map_session_data *sd, uint32 fl
#endif
}
-static void clif_stylist_vector_init(void)
-{
- int i;
- for (i = 0; i < MAX_STYLIST_TYPE; i++) {
- VECTOR_INIT(stylist_data[i]);
- }
-}
-
-static void clif_stylist_vector_clear(void)
-{
- int i;
- for (i = 0; i < MAX_STYLIST_TYPE; i++) {
- VECTOR_CLEAR(stylist_data[i]);
- }
-}
-
-static bool clif_stylist_read_db_libconfig(void)
-{
- struct config_t stylist_conf;
- struct config_setting_t *stylist = NULL, *it = NULL;
- const char *config_filename = "db/stylist_db.conf"; // FIXME hardcoded name
- int i = 0;
-
- if (!libconfig->load_file(&stylist_conf, config_filename))
- return false;
-
- if ((stylist = libconfig->setting_get_member(stylist_conf.root, "stylist_db")) == NULL) {
- ShowError("can't read %s\n", config_filename);
- return false;
- }
-
- clif->stylist_vector_clear();
-
- while ((it = libconfig->setting_get_elem(stylist, i++))) {
- clif->stylist_read_db_libconfig_sub(it, i - 1, config_filename);
- }
-
- libconfig->destroy(&stylist_conf);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename);
- return true;
-}
-
-static bool clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
-{
- struct stylist_data_entry entry = { 0 };
- int i32 = 0, type = 0;
- int64 i64 = 0;
-
- nullpo_ret(it);
- nullpo_ret(source);
-
- if (!itemdb->lookup_const(it, "Type", &type) || type >= MAX_STYLIST_TYPE || type < 0) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Type (%d) in \"%s\", entry #%d, skipping.\n", type, source, idx);
- return false;
- }
- if (!itemdb->lookup_const(it, "Id", &i32) || i32 < 0) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: Invalid or missing Id (%d) in \"%s\", entry #%d, skipping.\n", i32, source, idx);
- return false;
- }
- entry.id = i32;
-
- if (libconfig->setting_lookup_int64(it, "Zeny", &i64)) {
- if (i64 > MAX_ZENY) {
- ShowWarning("clif_stylist_read_db_libconfig_sub: zeny is too big in \"%s\", entry #%d, capping to MAX_ZENY.\n", source, idx);
- entry.zeny = MAX_ZENY;
- } else {
- entry.zeny = (int)i64;
- }
- }
-
- if (itemdb->lookup_const(it, "ItemID", &i32))
- entry.itemid = i32;
-
- if (itemdb->lookup_const(it, "BoxItemID", &i32))
- entry.boxid = i32;
-
- if (libconfig->setting_lookup_bool(it, "AllowDoram", &i32))
- entry.allow_doram = (i32 == 0) ? false : true;
-
- VECTOR_ENSURE(stylist_data[type], 1, 1);
- VECTOR_PUSH(stylist_data[type], entry);
- return true;
-}
-
-static bool clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx)
-{
- struct item it;
- struct stylist_data_entry *entry;
-
- nullpo_retr(false, sd);
- Assert_retr(false, type >= 0 && type < MAX_STYLIST_TYPE);
- Assert_retr(false, idx >= 0 && idx < VECTOR_LENGTH(stylist_data[type]));
-
- entry = &VECTOR_INDEX(stylist_data[type], idx);
-
- if (sd->status.class == JOB_SUMMONER && (entry->allow_doram == false))
- return false;
-
- if (entry->id >= 0) {
- if (entry->zeny != 0) {
- if (sd->status.zeny < entry->zeny)
- return false;
-
- sd->status.zeny -= entry->zeny;
- clif->updatestatus(sd, SP_ZENY);
- } else if (entry->itemid != 0) {
- it.nameid = entry->itemid;
- it.amount = 1;
- return script->buildin_delitem_search(sd, &it, false);
- } else if (entry->boxid != 0) {
- it.nameid = entry->boxid;
- it.amount = 1;
- return script->buildin_delitem_search(sd, &it, false);
- }
- return true;
- }
- return false;
-}
-static void clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid)
-{
- struct rodex_message msg = { 0 };
-
- nullpo_retv(sd);
-
- msg.receiver_id = sd->status.char_id;
- msg.items[0].item.nameid = itemid;
- msg.items[0].item.amount = 1;
- msg.items[0].item.identify = 1;
- msg.type = MAIL_TYPE_NPC | MAIL_TYPE_ITEM;
-
- safestrncpy(msg.sender_name, msg_txt(366), NAME_LENGTH);
- safestrncpy(msg.title, msg_txt(367), RODEX_TITLE_LENGTH);
- safestrncpy(msg.body, msg_txt(368), MAIL_BODY_LENGTH);
- msg.send_date = (int)time(NULL);
- msg.expire_date = (int)time(NULL) + RODEX_EXPIRE;
-
- intif->rodex_sendmail(&msg);
-}
-
static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_STYLE_CHANGE *p = RP2PTR(fd);
if (p->HeadStyle > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR, p->HeadStyle, false);
+ stylist->request_style_change(sd, LOOK_HAIR, p->HeadStyle, false);
if (p->HeadPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
+ stylist->request_style_change(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
if (p->BodyPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
+ stylist->request_style_change(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
if (p->TopAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
if (p->MidAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_MID, p->MidAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_MID, p->MidAccessory, true);
if (p->BottomAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
@@ -22040,43 +21928,30 @@ static void clif_parse_cz_req_style_change2(int fd, struct map_session_data *sd)
const struct PACKET_CZ_REQ_STYLE_CHANGE2 *p = RP2PTR(fd);
if (p->HeadStyle > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR, p->HeadStyle, false);
+ stylist->request_style_change(sd, LOOK_HAIR, p->HeadStyle, false);
if (p->HeadPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
+ stylist->request_style_change(sd, LOOK_HAIR_COLOR, p->HeadPalette, false);
if (p->BodyPalette > 0)
- clif->cz_req_style_change_sub(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
+ stylist->request_style_change(sd, LOOK_CLOTHES_COLOR, p->BodyPalette, false);
if (p->TopAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_TOP, p->TopAccessory, true);
if (p->MidAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_MID, p->MidAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_MID, p->MidAccessory, true);
if (p->BottomAccessory > 0)
- clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
+ stylist->request_style_change(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
if (p->BodyStyle > 0) {
if (pc->has_second_costume(sd)) {
- clif->cz_req_style_change_sub(sd, LOOK_BODY2, p->BodyStyle, false);
+ stylist->request_style_change(sd, LOOK_BODY2, p->BodyStyle, false);
}
}
clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
-static void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem)
+static void clif_parse_cz_style_close(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
+static void clif_parse_cz_style_close(int fd, struct map_session_data *sd)
{
- struct stylist_data_entry *entry;
-
- nullpo_retv(sd);
- Assert_retv(idx > 0);
- Assert_retv(type >= 0 && type < MAX_STYLIST_TYPE);
-
- if ((idx - 1) < VECTOR_LENGTH(stylist_data[type])) {
- entry = &VECTOR_INDEX(stylist_data[type], idx - 1);
- if (clif->style_change_validate_requirements(sd, type, idx - 1)) {
- if (isitem == false)
- pc->changelook(sd, type, entry->id);
- else
- clif->stylist_send_rodexitem(sd, entry->id);
- }
- }
+ // do nothing
}
static void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
@@ -22227,7 +22102,7 @@ static bool clif_enchant_equipment(struct map_session_data *sd, enum equip_pos p
static void clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd)
{
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
nullpo_retv(sd);
nullpo_retv(nd);
struct npc_item_list *shop = nd->u.scr.shop->item;
@@ -22263,7 +22138,7 @@ static void clif_npc_barter_open(struct map_session_data *sd, struct npc_data *n
static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd)
{
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
const struct PACKET_CZ_NPC_BARTER_PURCHASE *p = RP2PTR(fd);
int count = (p->packetLength - sizeof(struct PACKET_CZ_NPC_BARTER_PURCHASE)) / sizeof p->list[0];
struct barteritemlist item_list;
@@ -22290,6 +22165,63 @@ static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd)
#endif
}
+static void clif_parse_clientVersion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_clientVersion(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+ // TODO: show or store client version
+#endif
+}
+
+static void clif_parse_ping(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ping(int fd, struct map_session_data *sd)
+{
+ // do nothing, any packet update client tick
+}
+
+static void clif_ping(struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20190213 || PACKETVER_RE_NUM >= 20190213 || PACKETVER_ZERO_NUM >= 20190130
+ nullpo_retv(sd);
+ struct PACKET_ZC_PING p;
+ p.packetType = HEADER_ZC_PING;
+ clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
+}
+
+static int clif_pingTimer(int tid, int64 tick, int id, intptr_t data)
+{
+ map->foreachpc(clif->pingTimerSub, time(NULL));
+ return 0;
+}
+
+static int clif_pingTimerSub(struct map_session_data *sd, va_list ap)
+{
+ nullpo_ret(sd);
+ const int fd = sd->fd;
+
+ if (!sockt->session_is_active(fd))
+ {
+ return 0;
+ }
+
+ time_t tick = va_arg(ap, time_t);
+
+ if (sockt->session[fd]->wdata_tick + battle_config.ping_time < tick)
+ {
+ clif->ping(sd);
+ }
+ return 0;
+}
+
+static void clif_parse_ResetCooldown(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_ResetCooldown(int fd, struct map_session_data *sd)
+{
+ char cmd[15];
+ sprintf(cmd,"%ccddebug reset", atcommand->at_symbol);
+ atcommand->exec(fd, sd, cmd, true);
+}
+
/*==========================================
* Main client packet processing function
*------------------------------------------*/
@@ -22571,6 +22503,12 @@ static int do_init_clif(bool minimal)
clif->delay_clearunit_ers = ers_new(sizeof(struct block_list),"clif.c::delay_clearunit_ers",ERS_OPT_CLEAR);
clif->delayed_damage_ers = ers_new(sizeof(struct cdelayed_damage),"clif.c::delayed_damage_ers",ERS_OPT_CLEAR);
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320
+ timer->add_func_list(clif->pingTimer, "clif_pingTimer");
+ if (battle_config.ping_timer_interval != 0)
+ timer->add_interval(timer->gettick() + battle_config.ping_timer_interval * 1000, clif->pingTimer, 0, 0, battle_config.ping_timer_interval * 1000);
+#endif
+
return 0;
}
@@ -22768,7 +22706,7 @@ void clif_defaults(void)
clif->mvp_exp = clif_mvp_exp;
clif->mvp_noitem = clif_mvp_noitem;
clif->changed_dir = clif_changed_dir;
- clif->charnameack = clif_charnameack;
+ clif->blname_ack = clif_blname_ack;
clif->monster_hp_bar = clif_monster_hp_bar;
clif->hpmeter = clif_hpmeter;
clif->hpmeter_single = clif_hpmeter_single;
@@ -23452,15 +23390,9 @@ void clif_defaults(void)
clif->pPrivateAirshipRequest = clif_parse_private_airship_request;
clif->PrivateAirshipResponse = clif_private_airship_response;
- clif->stylist_vector_init = clif_stylist_vector_init;
- clif->stylist_vector_clear = clif_stylist_vector_clear;
- clif->stylist_read_db_libconfig = clif_stylist_read_db_libconfig;
- clif->stylist_read_db_libconfig_sub = clif_stylist_read_db_libconfig_sub;
- clif->style_change_validate_requirements = clif_style_change_validate_requirements;
- clif->stylist_send_rodexitem = clif_stylist_send_rodexitem;
clif->pReqStyleChange = clif_parse_cz_req_style_change;
clif->pReqStyleChange2 = clif_parse_cz_req_style_change2;
- clif->cz_req_style_change_sub = clif_cz_req_style_change_sub;
+ clif->pStyleClose = clif_parse_cz_style_close;
clif->style_change_response = clif_style_change_response;
clif->camera_showWindow = clif_camera_showWindow;
@@ -23479,4 +23411,10 @@ void clif_defaults(void)
clif->npc_barter_open = clif_npc_barter_open;
clif->pNPCBarterClosed = clif_parse_NPCBarterClosed;
clif->pNPCBarterPurchase = clif_parse_NPCBarterPurchase;
+ clif->pClientVersion = clif_parse_clientVersion;
+ clif->pPing = clif_parse_ping;
+ clif->ping = clif_ping;
+ clif->pingTimer = clif_pingTimer;
+ clif->pingTimerSub = clif_pingTimerSub;
+ clif->pResetCooldown = clif_parse_ResetCooldown;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 1aee11c33..6c9058cba 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -71,10 +71,6 @@ enum rodex_get_items;
#define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/
#define RGB2BGR(c) (((c) & 0x0000FF) << 16 | ((c) & 0x00FF00) | ((c) & 0xFF0000) >> 16)
-#ifndef MAX_STYLIST_TYPE
-#define MAX_STYLIST_TYPE LOOK_MAX
-#endif
-
#define COLOR_CYAN 0x00ffffU
#define COLOR_RED 0xff0000U
#define COLOR_GREEN 0x00ff00U
@@ -412,20 +408,22 @@ enum CASH_SHOP_BUY_RESULT {
};
enum BATTLEGROUNDS_QUEUE_ACK {
- BGQA_SUCCESS = 1,
- BGQA_FAIL_QUEUING_FINISHED,
- BGQA_FAIL_BGNAME_INVALID,
- BGQA_FAIL_TYPE_INVALID,
- BGQA_FAIL_PPL_OVERAMOUNT,
- BGQA_FAIL_LEVEL_INCORRECT,
- BGQA_DUPLICATE_REQUEST,
- BGQA_PLEASE_RELOGIN,
- BGQA_NOT_PARTY_GUILD_LEADER,
- BGQA_FAIL_CLASS_INVALID,
+ BGQA_SUCCESS = 1,
+ BGQA_FAIL_QUEUING_FINISHED = 2,
+ BGQA_FAIL_BGNAME_INVALID = 3,
+ BGQA_FAIL_TYPE_INVALID = 4,
+ BGQA_FAIL_PPL_OVERAMOUNT = 5,
+ BGQA_FAIL_LEVEL_INCORRECT = 6,
+ BGQA_DUPLICATE_REQUEST = 7,
+ BGQA_PLEASE_RELOGIN = 8,
+ BGQA_NOT_PARTY_GUILD_LEADER = 9,
+ BGQA_FAIL_CLASS_INVALID = 10,
/* not official way to respond (gotta find packet?) */
- BGQA_FAIL_DESERTER,
- BGQA_FAIL_COOLDOWN,
- BGQA_FAIL_TEAM_COUNT,
+ BGQA_FAIL_DESERTER = 11,
+ BGQA_FAIL_COOLDOWN = 12,
+ BGQA_FAIL_TEAM_COUNT = 13,
+ // official continue
+ BGQA_FAIL_TEAM_IN_BG_ALREADY = 15
};
enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED {
@@ -558,7 +556,7 @@ enum clif_unittype {
**/
enum CZ_CONFIG {
CZ_CONFIG_OPEN_EQUIPMENT_WINDOW = 0,
- // Unknown = 1,
+ CZ_CONFIG_CALL = 1,
CZ_CONFIG_PET_AUTOFEEDING = 2,
CZ_CONFIG_HOMUNCULUS_AUTOFEEDING = 3,
};
@@ -655,16 +653,6 @@ struct attendance_entry {
int qty;
};
-/* Stylist data [Asheraf/Hercules]*/
-struct stylist_data_entry {
- int16 id;
- int32 zeny;
- int itemid;
- int boxid;
- bool allow_doram;
-};
-VECTOR_DECL(struct stylist_data_entry) stylist_data[MAX_STYLIST_TYPE];
-
struct barter_itemlist_entry {
int addId;
int addAmount;
@@ -895,7 +883,7 @@ struct clif_interface {
void (*mvp_exp) (struct map_session_data *sd, unsigned int exp);
void (*mvp_noitem) (struct map_session_data* sd);
void (*changed_dir) (struct block_list *bl, enum send_target target);
- void (*charnameack) (int fd, struct block_list *bl);
+ void (*blname_ack) (int fd, struct block_list *bl);
void (*monster_hp_bar) ( struct mob_data* md, struct map_session_data *sd );
int (*hpmeter) (struct map_session_data *sd);
void (*hpmeter_single) (int fd, int id, unsigned int hp, unsigned int maxhp);
@@ -1021,7 +1009,7 @@ struct clif_interface {
void (*wisexin) (struct map_session_data *sd,int type,int flag);
void (*wisall) (struct map_session_data *sd,int type,int flag);
void (*PMIgnoreList) (struct map_session_data* sd);
- void (*ShowScript) (struct block_list* bl, const char* message);
+ void (*ShowScript) (struct block_list* bl, const char* message, enum send_target target);
/* trade handling */
void (*traderequest) (struct map_session_data* sd, const char* name);
void (*tradestart) (struct map_session_data* sd, uint8 type);
@@ -1543,7 +1531,7 @@ struct clif_interface {
void (*pRodexCancelWriteMail) (int fd, struct map_session_data *sd);
void (*pRodexOpenMailbox) (int fd, struct map_session_data *sd);
void (*pRodexCheckName) (int fd, struct map_session_data *sd);
- void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+ void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
void (*pRodexDeleteMail) (int fd, struct map_session_data *sd);
void (*rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id);
void (*pRodexRefreshMaillist) (int fd, struct map_session_data *sd);
@@ -1576,15 +1564,9 @@ struct clif_interface {
void (*pPrivateAirshipRequest) (int fd, struct map_session_data *sd);
void (*PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag);
- void (*stylist_vector_init) (void);
- void (*stylist_vector_clear) (void);
- bool (*stylist_read_db_libconfig) (void);
- bool (*stylist_read_db_libconfig_sub) (struct config_setting_t *it, int idx, const char *source);
- bool (*style_change_validate_requirements) (struct map_session_data *sd, int type, int16 idx);
- void (*stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
void (*pReqStyleChange) (int fd, struct map_session_data *sd);
void (*pReqStyleChange2) (int fd, struct map_session_data *sd);
- void (*cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ void (*pStyleClose) (int fd, struct map_session_data *sd);
void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
void (*pPetEvolution) (int fd, struct map_session_data *sd);
void (*petEvolutionResult) (int fd, enum pet_evolution_result result);
@@ -1599,6 +1581,12 @@ struct clif_interface {
void (*npc_barter_open) (struct map_session_data *sd, struct npc_data *nd);
void (*pNPCBarterClosed) (int fd, struct map_session_data *sd);
void (*pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+ void (*pClientVersion) (int fd, struct map_session_data *sd);
+ void (*pPing) (int fd, struct map_session_data *sd);
+ void (*ping) (struct map_session_data *sd);
+ int (*pingTimer) (int tid, int64 tick, int id, intptr_t data);
+ int (*pingTimerSub) (struct map_session_data *sd, va_list ap);
+ void (*pResetCooldown) (int fd, struct map_session_data *sd);
};
#ifdef HERCULES_CORE
diff --git a/src/map/guild.c b/src/map/guild.c
index 17bf7fa6b..ae76b22a3 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1018,7 +1018,7 @@ static int guild_send_memberinfoshort(struct map_session_data *sd, int online)
}
// cleaned up [LuzZza]
-static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login)
+static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login)
{
int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1;
struct guild *g = guild->search(guild_id);
@@ -1899,7 +1899,7 @@ static int guild_gm_changed(int guild_id, int account_id, int char_id)
if (g->member[pos].sd && g->member[pos].sd->fd) {
clif->message(g->member[pos].sd->fd, msg_sd(g->member[pos].sd,878)); //"You no longer are the Guild Master."
g->member[pos].sd->state.gmaster_flag = 0;
- clif->charnameack(0, &g->member[pos].sd->bl);
+ clif->blname_ack(0, &g->member[pos].sd->bl);
}
if (g->member[0].sd && g->member[0].sd->fd) {
@@ -1907,7 +1907,7 @@ static int guild_gm_changed(int guild_id, int account_id, int char_id)
g->member[0].sd->state.gmaster_flag = 1;
//Block his skills for 5 minutes to prevent abuse.
guild->block_skill(g->member[0].sd, 300000);
- clif->charnameack(0, &g->member[pos].sd->bl);
+ clif->blname_ack(0, &g->member[pos].sd->bl);
}
// announce the change to all guild members
diff --git a/src/map/guild.h b/src/map/guild.h
index 3df86a3ca..396cbda86 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -126,7 +126,7 @@ struct guild_interface {
int (*check_alliance) (int guild_id1, int guild_id2, int flag);
/* */
int (*send_memberinfoshort) (struct map_session_data *sd,int online);
- int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+ int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
int (*change_memberposition) (int guild_id,int account_id,int char_id,short idx);
int (*memberposition_changed) (struct guild *g,int idx,int pos);
int (*change_position) (int guild_id,int idx,int mode,int exp_mode,const char *name);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 6df272243..f3a4c559a 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -411,7 +411,7 @@ static bool homunculus_levelup(struct homun_data *hd)
return true;
}
-static int homunculus_change_class(struct homun_data *hd, short class_)
+static int homunculus_change_class(struct homun_data *hd, int class_)
{
int i = homun->db_search(class_,HOMUNCULUS_CLASS);
nullpo_retr(0, hd);
@@ -779,7 +779,7 @@ static bool homunculus_change_name_ack(struct map_session_data *sd, const char *
}
safestrncpy(hd->homunculus.name, newname, NAME_LENGTH);
aFree(newname);
- clif->charnameack (0,&hd->bl);
+ clif->blname_ack(0,&hd->bl);
hd->homunculus.rename_flag = 1;
clif->hominfo(sd,hd,0);
return true;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index f0a156fd7..745c7cd84 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -174,7 +174,7 @@ struct homunculus_interface {
int (*skill_tree_get_max) (int id, int b_class);
void (*skillup) (struct homun_data *hd, uint16 skill_id);
bool (*levelup) (struct homun_data *hd);
- int (*change_class) (struct homun_data *hd, short class_);
+ int (*change_class) (struct homun_data *hd, int class_);
bool (*evolve) (struct homun_data *hd);
bool (*mutate) (struct homun_data *hd, int homun_id);
int (*gainexp) (struct homun_data *hd, unsigned int exp);
diff --git a/src/map/intif.c b/src/map/intif.c
index ed4c0e2d2..e25f56b63 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -71,26 +71,26 @@ static int CheckForCharServer(void)
}
// pet
-static int intif_create_pet(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id,
+static int intif_create_pet(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name)
{
if (intif->CheckForCharServer())
return 0;
nullpo_ret(pet_name);
- WFIFOHEAD(inter_fd, 28 + NAME_LENGTH);
+ WFIFOHEAD(inter_fd, 32 + NAME_LENGTH);
WFIFOW(inter_fd, 0) = 0x3080;
WFIFOL(inter_fd, 2) = account_id;
WFIFOL(inter_fd, 6) = char_id;
- WFIFOW(inter_fd, 10) = pet_class;
- WFIFOW(inter_fd, 12) = pet_lv;
- WFIFOL(inter_fd, 14) = pet_egg_id;
- WFIFOL(inter_fd, 18) = pet_equip;
- WFIFOW(inter_fd, 22) = intimate;
- WFIFOW(inter_fd, 24) = hungry;
- WFIFOB(inter_fd, 26) = rename_flag;
- WFIFOB(inter_fd, 27) = incubate;
- memcpy(WFIFOP(inter_fd, 28), pet_name, NAME_LENGTH);
- WFIFOSET(inter_fd, 28 + NAME_LENGTH);
+ WFIFOL(inter_fd, 10) = pet_class;
+ WFIFOL(inter_fd, 14) = pet_lv;
+ WFIFOL(inter_fd, 18) = pet_egg_id;
+ WFIFOL(inter_fd, 22) = pet_equip;
+ WFIFOW(inter_fd, 26) = intimate;
+ WFIFOW(inter_fd, 28) = hungry;
+ WFIFOB(inter_fd, 30) = rename_flag;
+ WFIFOB(inter_fd, 31) = incubate;
+ memcpy(WFIFOP(inter_fd, 32), pet_name, NAME_LENGTH);
+ WFIFOSET(inter_fd, 32 + NAME_LENGTH);
return 0;
}
@@ -903,19 +903,19 @@ static int intif_guild_leave(int guild_id, int account_id, int char_id, int flag
}
//Update request / Lv online status of the guild members
-static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class)
+static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class)
{
if (intif->CheckForCharServer())
return 0;
- WFIFOHEAD(inter_fd, 19);
+ WFIFOHEAD(inter_fd, 23);
WFIFOW(inter_fd, 0) = 0x3035;
WFIFOL(inter_fd, 2) = guild_id;
WFIFOL(inter_fd, 6) = account_id;
WFIFOL(inter_fd,10) = char_id;
WFIFOB(inter_fd,14) = online;
- WFIFOW(inter_fd,15) = lv;
- WFIFOW(inter_fd,17) = class;
- WFIFOSET(inter_fd,19);
+ WFIFOL(inter_fd,15) = lv;
+ WFIFOL(inter_fd,19) = class;
+ WFIFOSET(inter_fd,23);
return 0;
}
@@ -1507,7 +1507,7 @@ static void intif_parse_GuildMemberWithdraw(int fd)
// ACK guild member basic info
static void intif_parse_GuildMemberInfoShort(int fd)
{
- guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17),RFIFOL(fd,19));
+ guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOL(fd,17),RFIFOL(fd,21));
}
// ACK guild break
@@ -1640,7 +1640,7 @@ static void intif_parse_GuildMasterChanged(int fd)
// Request pet creation
static void intif_parse_CreatePet(int fd)
{
- pet->get_egg(RFIFOL(fd,2), RFIFOW(fd,6), RFIFOL(fd,8));
+ pet->get_egg(RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
}
// ACK pet data
@@ -2754,16 +2754,21 @@ static void intif_parse_RodexNotifications(int fd)
/// 2 - user got Items
/// 3 - delete
/// 4 - sender Read (returned mail)
-static int intif_rodex_updatemail(int64 mail_id, int8 flag)
+static int intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag)
{
+ nullpo_ret(sd);
+
if (intif->CheckForCharServer())
return 0;
- WFIFOHEAD(inter_fd, 11);
+ WFIFOHEAD(inter_fd, 20);
WFIFOW(inter_fd, 0) = 0x3097;
- WFIFOQ(inter_fd, 2) = mail_id;
- WFIFOB(inter_fd, 10) = flag;
- WFIFOSET(inter_fd, 11);
+ WFIFOL(inter_fd, 2) = sd->status.account_id;
+ WFIFOL(inter_fd, 6) = sd->status.char_id;
+ WFIFOQ(inter_fd, 10) = mail_id;
+ WFIFOB(inter_fd, 18) = opentype;
+ WFIFOB(inter_fd, 19) = flag;
+ WFIFOSET(inter_fd, 20);
return 0;
}
@@ -2830,11 +2835,11 @@ static void intif_parse_RodexCheckName(int fd)
struct map_session_data *sd = NULL;
int reqchar_id = RFIFOL(fd, 2);
int target_char_id = RFIFOL(fd, 6);
- short target_class = RFIFOW(fd, 10);
- int target_level = RFIFOL(fd, 12);
+ int target_class = RFIFOL(fd, 10);
+ int target_level = RFIFOL(fd, 14);
char name[NAME_LENGTH];
- safestrncpy(name, RFIFOP(inter_fd, 16), NAME_LENGTH);
+ safestrncpy(name, RFIFOP(inter_fd, 18), NAME_LENGTH);
if (reqchar_id <= 0)
return;
@@ -2855,6 +2860,35 @@ static void intif_parse_RodexCheckName(int fd)
clif->rodex_checkname_result(sd, target_char_id, target_class, target_level, name);
}
+static void intif_parse_GetZenyAck(int fd)
+{
+ int char_id = RFIFOL(fd, 2);
+ int64 zeny = RFIFOL(fd, 6);
+ int64 mail_id = RFIFOQ(fd, 14);
+ uint8 opentype = RFIFOB(fd, 22);
+ struct map_session_data *sd = map->charid2sd(char_id);
+
+ if (sd == NULL) // User is not online anymore
+ return;
+ rodex->getZenyAck(sd, mail_id, opentype, zeny);
+}
+
+static void intif_parse_GetItemsAck(int fd)
+{
+ int char_id = RFIFOL(fd, 2);
+
+ struct map_session_data *sd = map->charid2sd(char_id);
+ if (sd == NULL) // User is not online anymore
+ return;
+
+ int64 mail_id = RFIFOQ(fd, 6);
+ uint8 opentype = RFIFOB(fd, 14);
+ int count = RFIFOB(fd, 15);
+ struct rodex_item items[RODEX_MAX_ITEM];
+ memcpy(&items[0], RFIFOP(fd, 16), sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ rodex->getItemsAck(sd, mail_id, opentype, count, &items[0]);
+}
+
//-----------------------------------------------------------------
// Communication from the inter server
// Return a 0 (false) if there were any errors.
@@ -2972,6 +3006,8 @@ static int intif_parse(int fd)
case 0x3896: intif->pRodexHasNew(fd); break;
case 0x3897: intif->pRodexSendMail(fd); break;
case 0x3898: intif->pRodexCheckName(fd); break;
+ case 0x3899: intif->pGetZenyAck(fd); break;
+ case 0x389a: intif->pGetItemsAck(fd); break;
// Clan System
case 0x3858: intif->pRecvClanMemberAction(fd); break;
@@ -2995,13 +3031,13 @@ void intif_defaults(void)
-1,-1,27,-1, -1,-1,37,-1, 7, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
-1, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810 Achievements [Smokexyz/Hercules]
39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
- 10,-1,15, 0, 79,23, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ 10,-1,15, 0, 79,25, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
-1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
-1,-1, 7, 7, 7,11, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] Clan System[Murilo BiO]
-1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
-1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
- 12,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
- -1,-1, 7, 3, 0,-1, 7, 15,16 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
+ 14,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+ -1,-1, 7, 3, 0,-1, 7, 15,18 + NAME_LENGTH, 23, 16 + sizeof(struct rodex_item) * RODEX_MAX_ITEM, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
};
intif = &intif_s;
@@ -3171,6 +3207,8 @@ void intif_defaults(void)
intif->pRodexHasNew = intif_parse_RodexNotifications;
intif->pRodexSendMail = intif_parse_RodexSendMail;
intif->pRodexCheckName = intif_parse_RodexCheckName;
+ intif->pGetZenyAck = intif_parse_GetZenyAck;
+ intif->pGetItemsAck = intif_parse_GetItemsAck;
/* Clan System */
intif->pRecvClanMemberAction = intif_parse_RecvClanMemberAction;
/* Achievement System */
diff --git a/src/map/intif.h b/src/map/intif.h
index 21f7a494c..8df669217 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -58,7 +58,7 @@ struct intif_interface {
int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE];
/* funcs */
int (*parse) (int fd);
- int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id,
+ int (*create_pet)(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id,
int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
int (*broadcast) (const char *mes, int len, int type);
int (*broadcast2) (const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY);
@@ -84,7 +84,7 @@ struct intif_interface {
int (*guild_request_info) (int guild_id);
int (*guild_addmember) (int guild_id, struct guild_member *m);
int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes);
- int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class);
int (*guild_break) (int guild_id);
int (*guild_message) (int guild_id, int account_id, const char *mes, int len);
int (*guild_change_gm) (int guild_id, const char *name, int len);
@@ -135,9 +135,11 @@ struct intif_interface {
// RoDEX
int(*rodex_requestinbox) (int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id);
int(*rodex_checkhasnew) (struct map_session_data *sd);
- int(*rodex_updatemail) (int64 mail_id, int8 flag);
+ int(*rodex_updatemail) (struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
int(*rodex_sendmail) (struct rodex_message *msg);
int(*rodex_checkname) (struct map_session_data *sd, const char *name);
+ void (*pGetZenyAck) (int fd);
+ void (*pGetItemsAck) (int fd);
/* Clan System */
int (*clan_kickoffline) (int clan_id, int kick_interval);
int (*clan_membercount) (int clan_id, int kick_interval);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 03f0fdc06..a61bbd008 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2458,7 +2458,6 @@ static void itemdb_read(bool minimal)
itemdb->read_chains();
itemdb->read_packages();
itemdb->read_options();
- clif->stylist_read_db_libconfig();
}
/**
@@ -2707,7 +2706,6 @@ static void do_final_itemdb(void)
itemdb->destroy_item_data(&itemdb->dummy, 0);
db_destroy(itemdb->names);
VECTOR_CLEAR(clif->attendance_data);
- clif->stylist_vector_clear();
}
static void do_init_itemdb(bool minimal)
@@ -2717,7 +2715,6 @@ static void do_init_itemdb(bool minimal)
itemdb->options = idb_alloc(DB_OPT_RELEASE_DATA);
itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH);
itemdb->create_dummy_data(); //Dummy data item.
- clif->stylist_vector_init();
itemdb->read(minimal);
if (minimal)
diff --git a/src/map/map.c b/src/map/map.c
index 6212493c8..7d2cc87d4 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -56,6 +56,7 @@
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/rodex.h"
#include "map/trade.h"
#include "map/unit.h"
@@ -6197,6 +6198,7 @@ int do_final(void)
vending->final();
rodex->final();
achievement->final();
+ stylist->final();
HPM_map_do_final();
@@ -6404,6 +6406,7 @@ static void map_load_defaults(void)
achievement_defaults();
npc_chat_defaults();
rodex_defaults();
+ stylist_defaults();
}
/**
* --run-once handler
@@ -6724,6 +6727,7 @@ int do_init(int argc, char *argv[])
duel->init(minimal);
vending->init(minimal);
rodex->init(minimal);
+ stylist->init(minimal);
if (map->scriptcheck) {
bool failed = map->extra_scripts_count > 0 ? false : true;
diff --git a/src/map/map.h b/src/map/map.h
index d31ff4839..1f70680e8 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -45,42 +45,6 @@ enum E_MAPSERVER_ST {
MAPSERVER_ST_LAST
};
-#define MAX_NPC_PER_MAP 512
-#define AREA_SIZE (battle->bc->area_size)
-#define CHAT_AREA_SIZE (battle->bc->chat_area_size)
-#define DEAD_AREA_SIZE (battle->bc->dead_area_size)
-#define DAMAGELOG_SIZE 30
-#define LOOTITEM_SIZE 10
-#define MAX_MOBSKILL 50
-#define MAX_MOB_LIST_PER_MAP 100
-#define MAX_EVENTQUEUE 2
-#define MAX_EVENTTIMER 32
-#define NATURAL_HEAL_INTERVAL 500
-#define MIN_FLOORITEM 2
-#define MAX_FLOORITEM START_ACCOUNT_NUM
-#define MAX_IGNORE_LIST 20 // official is 14
-#define MAX_VENDING 12
-#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
-
-#define BLOCK_SIZE 8
-#define block_free_max 1048576
-#define BL_LIST_MAX 1048576
-
-// The following system marks a different job ID system used by the map server,
-// which makes a lot more sense than the normal one. [Skotlex]
-// These marks the "level" of the job.
-#define JOBL_2_1 0x0100
-#define JOBL_2_2 0x0200
-#define JOBL_2 0x0300 // JOBL_2_1 | JOBL_2_2
-#define JOBL_UPPER 0x1000
-#define JOBL_BABY 0x2000
-#define JOBL_THIRD 0x4000
-
-// For filtering and quick checking.
-#define MAPID_BASEMASK 0x00ff
-#define MAPID_UPPERMASK 0x0fff
-#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
-
//First Jobs
//Note the oddity of the novice:
//Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type.
@@ -344,36 +308,6 @@ enum {
STATIC_ASSERT(((MAPID_1_1_MAX - 1) | MAPID_BASEMASK) == MAPID_BASEMASK, "First class map IDs do not fit into MAPID_BASEMASK");
-// Max size for inputs to Graffiti, Talkie Box and Vending text prompts
-#define MESSAGE_SIZE (79 + 1)
-// String length you can write in the 'talking box'
-#define CHATBOX_SIZE (70 + 1)
-// Chatroom-related string sizes
-#define CHATROOM_TITLE_SIZE (36 + 1)
-#define CHATROOM_PASS_SIZE (8 + 1)
-// Max allowed chat text length
-#define CHAT_SIZE_MAX (255 + 1)
-// 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
-#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
-#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000)
-// Specifies maps where players may hit each other
-#define map_flag_vs(m) ( \
- map->list[m].flag.pvp \
- || map->list[m].flag.gvg_dungeon \
- || map->list[m].flag.gvg \
- || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
- || map->list[m].flag.battleground \
- || map->list[m].flag.cvc \
- )
-// Specifies maps that have special GvG/WoE restrictions
-#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
-// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
-#define map_flag_gvg2(m) (map->list[m].flag.gvg || map->list[m].flag.gvg_castle)
-// No Kill Steal Protection
-#define map_flag_ks(m) (map->list[m].flag.town || map->list[m].flag.pvp || map->list[m].flag.gvg || map->list[m].flag.battleground)
-// No ViewID
-#define map_no_view(m, view) (map->list[m].flag.noviewid & (view))
-
//This stackable implementation does not means a BL can be more than one type at a time, but it's
// meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
enum bl_type {
@@ -392,9 +326,6 @@ enum bl_type {
BL_ALL = 0xFFF,
};
-// For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
-#define BL_CHAR (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
-
enum npc_subtype { WARP, SHOP, SCRIPT, CASHSHOP, TOMB };
/**
@@ -518,7 +449,7 @@ struct block_list {
// Mob List Held in memory for Dynamic Mobs [Wizputer]
// Expanded to specify all mob-related spawn data by [Skotlex]
struct spawn_data {
- short class_; ///< Class, used because a mob can change it's class
+ int class_; ///< Class, used because a mob can change it's class
unsigned short m, x, y; ///< Spawn information (map, point, spawn-area around point)
signed short xs, ys;
unsigned short num; ///< Number of mobs using this structure
@@ -748,16 +679,6 @@ enum map_zone_merge_type {
MZMT_NEVERMERGE, ///< Cannot merge with any zones.
};
-#define MAP_ZONE_NAME_LENGTH 60
-#define MAP_ZONE_ALL_NAME "All"
-#define MAP_ZONE_NORMAL_NAME "Normal"
-#define MAP_ZONE_PVP_NAME "PvP"
-#define MAP_ZONE_GVG_NAME "GvG"
-#define MAP_ZONE_BG_NAME "Battlegrounds"
-#define MAP_ZONE_CVC_NAME "CvC"
-#define MAP_ZONE_PK_NAME "PK Mode"
-#define MAP_ZONE_MAPFLAG_LENGTH 65
-
struct map_zone_data {
char name[MAP_ZONE_NAME_LENGTH];/* 20'd */
enum map_zone_merge_type merge_type;
@@ -800,7 +721,7 @@ struct questinfo {
unsigned short icon;
unsigned char color;
bool hasJob;
- unsigned short job;/* perhaps a mapid mask would be most flexible? */
+ unsigned int job;/* perhaps a mapid mask would be most flexible? */
bool sex_enabled;
int sex;
struct {
diff --git a/src/map/mapdefines.h b/src/map/mapdefines.h
new file mode 100644
index 000000000..df9e9bccb
--- /dev/null
+++ b/src/map/mapdefines.h
@@ -0,0 +1,103 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2018 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef MAP_MAPDEFINES_H
+#define MAP_MAPDEFINES_H
+
+#define MAX_NPC_PER_MAP 512
+#define AREA_SIZE (battle->bc->area_size)
+#define CHAT_AREA_SIZE (battle->bc->chat_area_size)
+#define DEAD_AREA_SIZE (battle->bc->dead_area_size)
+#define DAMAGELOG_SIZE 30
+#define LOOTITEM_SIZE 10
+#define MAX_MOBSKILL 50
+#define MAX_MOB_LIST_PER_MAP 100
+#define MAX_EVENTQUEUE 2
+#define MAX_EVENTTIMER 32
+#define NATURAL_HEAL_INTERVAL 500
+#define MIN_FLOORITEM 2
+#define MAX_FLOORITEM START_ACCOUNT_NUM
+#define MAX_IGNORE_LIST 20 // official is 14
+#define MAX_VENDING 12
+#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
+
+#define BLOCK_SIZE 8
+#define block_free_max 1048576
+#define BL_LIST_MAX 1048576
+
+// The following system marks a different job ID system used by the map server,
+// which makes a lot more sense than the normal one. [Skotlex]
+// These marks the "level" of the job.
+#define JOBL_2_1 0x0100
+#define JOBL_2_2 0x0200
+#define JOBL_2 0x0300 // JOBL_2_1 | JOBL_2_2
+#define JOBL_UPPER 0x1000
+#define JOBL_BABY 0x2000
+#define JOBL_THIRD 0x4000
+
+// For filtering and quick checking.
+#define MAPID_BASEMASK 0x00ff
+#define MAPID_UPPERMASK 0x0fff
+#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
+
+// Max size for inputs to Graffiti, Talkie Box and Vending text prompts
+#define MESSAGE_SIZE (79 + 1)
+// String length you can write in the 'talking box'
+#define CHATBOX_SIZE (70 + 1)
+// Chatroom-related string sizes
+#define CHATROOM_TITLE_SIZE (36 + 1)
+#define CHATROOM_PASS_SIZE (8 + 1)
+// Max allowed chat text length
+#define CHAT_SIZE_MAX (255 + 1)
+// 24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
+#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
+#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000)
+// Specifies maps where players may hit each other
+#define map_flag_vs(m) ( \
+ map->list[m].flag.pvp \
+ || map->list[m].flag.gvg_dungeon \
+ || map->list[m].flag.gvg \
+ || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
+ || map->list[m].flag.battleground \
+ || map->list[m].flag.cvc \
+ )
+// Specifies maps that have special GvG/WoE restrictions
+#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
+// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
+#define map_flag_gvg2(m) (map->list[m].flag.gvg || map->list[m].flag.gvg_castle)
+// No Kill Steal Protection
+#define map_flag_ks(m) (map->list[m].flag.town || map->list[m].flag.pvp || map->list[m].flag.gvg || map->list[m].flag.battleground)
+// No ViewID
+#define map_no_view(m, view) (map->list[m].flag.noviewid & (view))
+
+// For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
+#define BL_CHAR (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
+
+#define MAP_ZONE_NAME_LENGTH 60
+#define MAP_ZONE_ALL_NAME "All"
+#define MAP_ZONE_NORMAL_NAME "Normal"
+#define MAP_ZONE_PVP_NAME "PvP"
+#define MAP_ZONE_GVG_NAME "GvG"
+#define MAP_ZONE_BG_NAME "Battlegrounds"
+#define MAP_ZONE_CVC_NAME "CvC"
+#define MAP_ZONE_PK_NAME "PK Mode"
+#define MAP_ZONE_MAPFLAG_LENGTH 65
+
+#endif /* MAP_MAPDEFINES_H */
diff --git a/src/map/messages_main.h b/src/map/messages_main.h
index 1ce77451e..52c953ac8 100644
--- a/src/map/messages_main.h
+++ b/src/map/messages_main.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20190109
+Latest version: 20190403
*/
enum clif_messages {
@@ -20260,9 +20260,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20170920 to latest
+/*20170920 to 20190228
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190306 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
#endif
@@ -21466,6 +21468,127 @@ TITLE
*/
MSG_ID_DF8 = 0xdf8,
#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190228
+http://rodata.zhaouc.com/renwu.html#container
+20190306 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190227
+/*20190227 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190227 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190306
+/*20190306 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190306 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190320
+/*20190320 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190320 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190320 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190320 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190320 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190320 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190320 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190403 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
};
#endif /* MAP_MESSAGES_MAIN_H */
diff --git a/src/map/messages_re.h b/src/map/messages_re.h
index af66a8464..3823720ad 100644
--- a/src/map/messages_re.h
+++ b/src/map/messages_re.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20190109
+Latest version: 20190403
*/
enum clif_messages {
@@ -19739,9 +19739,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20170920 to latest
+/*20170920 to 20190228
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190306 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
#endif
@@ -20945,6 +20947,127 @@ TITLE
*/
MSG_ID_DF8 = 0xdf8,
#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190228
+http://rodata.zhaouc.com/renwu.html#container
+20190306 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190220
+/*20190220 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190220 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190306
+/*20190306 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190306 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190320
+/*20190320 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190320 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190320 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190320 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190320 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190320 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190320 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190403 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
};
#endif /* MAP_MESSAGES_RE_H */
diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index c86c8c919..90c7e8895 100644
--- a/src/map/messages_zero.h
+++ b/src/map/messages_zero.h
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20181226
+Latest version: 20190403
*/
enum clif_messages {
@@ -16356,9 +16356,11 @@ http://member.gnjoy.com/user/pay/chargelist.asp
한 번에 구입 가능한 아이템의 가짓수는 8개입니다.
*/
MSG_ID_CF0 = 0xcf0,
-/*20171018 to latest
+/*20171018 to 20190227
http://gift.zhaouc.com/#/index
http://gift.zhaouc.com/
+20190313 to latest
+http://gift.zhaouc.com/
*/
MSG_ID_CF1 = 0xcf1,
/*20171018 to latest
@@ -17539,6 +17541,139 @@ message
*/
MSG_ID_DF6 = 0xdf6,
#endif
+#if PACKETVER >= 20190116
+/*20190116 to latest
+TITLE
+*/
+ MSG_ID_DF7 = 0xdf7,
+/*20190116 to latest
+데미지 표기 확장
+*/
+ MSG_ID_DF8 = 0xdf8,
+#endif
+#if PACKETVER >= 20190130
+/*20190130 to latest
+맵 이름 표기
+*/
+ MSG_ID_DF9 = 0xdf9,
+#endif
+#if PACKETVER >= 20190213
+/*20190213 to latest
+시스템 메세지 : 현재 노점보기 기능이 %s 상태입니다. (/노점보기)
+*/
+ MSG_ID_DFA = 0xdfa,
+/*20190213 to latest
+수직 동기
+*/
+ MSG_ID_DFB = 0xdfb,
+/*20190213 to latest
+자료
+*/
+ MSG_ID_DFC = 0xdfc,
+/*20190213 to 20190227
+http://rodata.zhaouc.com/renwu.html#container
+20190313 to latest
+http://rodata.zhaouc.com/renwu.html
+*/
+ MSG_ID_DFD = 0xdfd,
+/*20190213 to latest
+작위
+*/
+ MSG_ID_DFE = 0xdfe,
+/*20190213 to latest
+프레임 제한
+*/
+ MSG_ID_DFF = 0xdff,
+#endif
+#if PACKETVER >= 20190220
+/*20190220 to latest
+%d개를 초과할 경우 더 이상 설치 할 수 없습니다.
+*/
+ MSG_ID_E00 = 0xe00,
+/*20190220 to latest
+목적지
+*/
+ MSG_ID_E01 = 0xe01,
+#endif
+#if PACKETVER >= 20190313
+/*20190313 to latest
+잠시 후 다시 시도해주세요.
+Please try again in a moment.
+*/
+ MSG_ID_E02 = 0xe02,
+/*20190313 to latest
+등록할 수 없는 파일입니다.
+*/
+ MSG_ID_E03 = 0xe03,
+#endif
+#if PACKETVER >= 20190327
+/*20190327 to latest
+선택 삭제
+*/
+ MSG_ID_E04 = 0xe04,
+/*20190327 to latest
+모두 삭제
+*/
+ MSG_ID_E05 = 0xe05,
+/*20190327 to latest
+[%s]편지함의 모든 메일을 삭제하시겠습니까?
+*/
+ MSG_ID_E06 = 0xe06,
+/*20190327 to latest
+선택 받기
+*/
+ MSG_ID_E07 = 0xe07,
+/*20190327 to latest
+모두 받기
+*/
+ MSG_ID_E08 = 0xe08,
+/*20190327 to latest
+선택한 메일의 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E09 = 0xe09,
+/*20190327 to latest
+[%s]편지함의 모든 첨부 물품을 받으시겠습니까?
+*/
+ MSG_ID_E0A = 0xe0a,
+/*20190327 to latest
+스킬바2
+*/
+ MSG_ID_E0B = 0xe0b,
+/*20190327 to latest
+스킬바 교체
+*/
+ MSG_ID_E0C = 0xe0c,
+#endif
+#if PACKETVER >= 20190403
+/*20190403 to latest
+←
+*/
+ MSG_ID_E0D = 0xe0d,
+/*20190403 to latest
+↑
+*/
+ MSG_ID_E0E = 0xe0e,
+/*20190403 to latest
+→
+*/
+ MSG_ID_E0F = 0xe0f,
+/*20190403 to latest
+↓
+*/
+ MSG_ID_E10 = 0xe10,
+/*20190403 to latest
+▤
+*/
+ MSG_ID_E11 = 0xe11,
+/*20190403 to latest
+←
+*/
+ MSG_ID_E12 = 0xe12,
+/*20190403 to latest
+로딩중에는 창을 닫을 수 없습니다.
+*/
+ MSG_ID_E13 = 0xe13,
+#endif
};
#endif /* MAP_MESSAGES_ZERO_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index d82e49bcc..8dac1ea43 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1900,15 +1900,53 @@ static int mob_ai_hard(int tid, int64 tick, int id, intptr_t data)
return 0;
}
+/**
+ * Adds random options of a given options drop group into item.
+ *
+ * @param item : item receiving random options
+ * @param options : Random Option Drop Group to be used
+ */
+static void mob_setdropitem_options(struct item *item, struct optdrop_group *options)
+{
+ nullpo_retv(item);
+ nullpo_retv(options);
+
+ for (int i = 0; i < options->optslot_count; i++) {
+ if (rnd() % 10000 >= options->optslot_rate[i])
+ continue;
+
+ // count avoids a too long loop that would cause lag.
+ // if after option_drop_max_loop full iterations (running through all possibilities)
+ // it still fails to pick one, it'll stop at one random index in the next iteration
+ int count = battle_config.option_drop_max_loop * options->optslot[i].option_count + (rnd() % options->optslot[i].option_count);
+ int idx = 0;
+ while (count > 0 && rnd() % 10000 >= options->optslot[i].options[idx].rate) {
+ idx = (idx + 1) % options->optslot[i].option_count;
+ --count;
+ }
+
+ item->option[i].index = options->optslot[i].options[idx].id;
+
+ int min = options->optslot[i].options[idx].min;
+ int max = options->optslot[i].options[idx].max;
+ item->option[i].value = min + (rnd() % (max - min + 1));
+ }
+}
+
/*==========================================
* Initializes the delay drop structure for mob-dropped items.
*------------------------------------------*/
-static struct item_drop *mob_setdropitem(int nameid, int qty, struct item_data *data)
+static struct item_drop *mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data)
{
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
drop->item_data.nameid = nameid;
drop->item_data.amount = qty;
drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid);
+
+ // Set item options [KirieZ]
+ if (options != NULL)
+ mob->setdropitem_options(&drop->item_data, options);
+
drop->showdropeffect = true;
drop->next = NULL;
return drop;
@@ -2196,7 +2234,7 @@ static void mob_damage(struct mob_data *md, struct block_list *src, int damage)
}
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
#if PACKETVER >= 20131223
// Resend ZC_NOTIFY_MOVEENTRY to Update the HP
@@ -2521,7 +2559,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
continue;
}
- ditem = mob->setdropitem(md->db->dropitem[i].nameid, 1, it);
+ ditem = mob->setdropitem(md->db->dropitem[i].nameid, md->db->dropitem[i].options, 1, it);
// Official Drop Announce [Jedzkie]
if (mvp_sd != NULL) {
@@ -2538,7 +2576,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
// Ore Discovery [Celest]
if (sd == mvp_sd && pc->checkskill(sd,BS_FINDINGORE) > 0) {
if( (temp = itemdb->chain_item(itemdb->chain_cache[ECC_ORE],&i)) ) {
- ditem = mob->setdropitem(temp, 1, NULL);
+ ditem = mob->setdropitem(temp, NULL, 1, NULL);
mob->item_drop(md, dlist, ditem, 0, i, homkillonly);
}
}
@@ -2570,7 +2608,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
continue;
itemid = (!sd->add_drop[i].is_group) ? sd->add_drop[i].id : itemdb->chain_item(sd->add_drop[i].id, &drop_rate);
if( itemid )
- mob->item_drop(md, dlist, mob->setdropitem(itemid,1,NULL), 0, drop_rate, homkillonly);
+ mob->item_drop(md, dlist, mob->setdropitem(itemid, NULL, 1, NULL), 0, drop_rate, homkillonly);
}
}
@@ -2629,10 +2667,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
if (!(map->list[m].flag.nomvploot || type&1)) {
/* pose them randomly in the list -- so on 100% drop servers it wont always drop the same item */
- struct {
- int nameid;
- int p;
- } mdrop[MAX_MVP_DROP] = { { 0 } };
+ struct mob_drop mdrop[MAX_MVP_DROP] = { { 0 } };
for (i = 0; i < MAX_MVP_DROP; i++) {
int rpos;
@@ -2644,6 +2679,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
mdrop[rpos].nameid = md->db->mvpitem[i].nameid;
mdrop[rpos].p = md->db->mvpitem[i].p;
+ mdrop[rpos].options = md->db->mvpitem[i].options;
}
for (i = 0; i < MAX_MVP_DROP; i++) {
@@ -2663,6 +2699,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
item.nameid = mdrop[i].nameid;
item.identify = itemdb->isidentified2(data);
+ mob->setdropitem_options(&item, mdrop[i].options);
clif->mvp_item(mvp_sd, item.nameid);
log_mvp[0] = item.nameid;
@@ -2796,7 +2833,7 @@ static void mob_revive(struct mob_data *md, unsigned int hp)
skill->unit_move(&md->bl,tick,1);
mob->skill_use(md, tick, MSC_SPAWN);
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
}
static int mob_guardian_guildchange(struct mob_data *md)
@@ -2921,7 +2958,7 @@ static int mob_class_change(struct mob_data *md, int class_)
md->target_id = md->attacked_id = 0;
//Need to update name display.
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
status_change_end(&md->bl,SC_KEEPING,INVALID_TIMER);
return 0;
}
@@ -2933,7 +2970,7 @@ static void mob_heal(struct mob_data *md, unsigned int heal)
{
nullpo_retv(md);
if (battle_config.show_mob_info&3)
- clif->charnameack (0, &md->bl);
+ clif->blname_ack(0, &md->bl);
#if PACKETVER >= 20131223
// Resend ZC_NOTIFY_MOVEENTRY to Update the HP
if (battle_config.show_monster_hp_bar)
@@ -3861,6 +3898,212 @@ static inline int mob_parse_dbrow_cap_value(int class_, int min, int max, int va
}
/**
+ * Reads one possible option for a option slot in a option drop group
+ * @param option : Libconfig entry
+ * @param entry : memory db entry for current slot
+ * @param idx : index of entry where this option should be inserted at
+ * @param calc_rate : if rates should be recalculated after reading all entries
+ * @param slot : option group slot being read (for messages)
+ * @param group : option group being read (for messages)
+ * @return true if it successfully read the entry, false otherwise
+ */
+static bool mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group)
+{
+ nullpo_retr(false, option);
+ nullpo_retr(false, entry);
+ nullpo_retr(false, idx);
+ nullpo_retr(false, calc_rate);
+ nullpo_retr(false, group);
+
+ const char *name = config_setting_name(option);
+ int opt_id;
+
+ if (strncmp(name, "Rate", 4) == 0)
+ return true;
+
+ if (script->get_constant(name, &opt_id) == false) {
+ ShowWarning("mob_read_optdrops_option: Invalid option \"%s\" for option slot %d of %s group, skipping.\n", name, slot, group);
+ return false;
+ }
+
+ int min = 0, max = 0, opt_rate = 0;
+ if (config_setting_is_number(option)) {
+ // OptionName: value
+ min = libconfig->setting_get_int(option);
+ } else if (config_setting_is_array(option)) {
+ // OptionName: [min, max]
+ // OptionName: [min, max, rate]
+ int slen = libconfig->setting_length(option);
+
+ if (slen >= 2) {
+ // [min, max,...]
+ min = libconfig->setting_get_int_elem(option, 0);
+ max = libconfig->setting_get_int_elem(option, 1);
+ }
+
+ if (slen == 3) {
+ // [min, max, rate]
+ opt_rate = libconfig->setting_get_int_elem(option, 2);
+ }
+ } else {
+ ShowWarning("mob_read_optdrops_option: Invalid value \"%s\" for option slot %d of %s group, skipping.\n", name, slot, group);
+ return false;
+ }
+
+ if (max < min)
+ max = min;
+
+ entry->options[*idx].id = opt_id;
+ entry->options[*idx].min = min;
+ entry->options[*idx].max = max;
+ entry->options[*idx].rate = opt_rate;
+
+ if (entry->options[*idx].rate == 0)
+ *calc_rate = true;
+
+ (*idx)++;
+
+ return true;
+}
+
+/**
+ * Reads the settings for one random option slot of a random option drop group.
+ * @param optslot : The slot entry from config file
+ * @param n : slot index
+ * @param group_id : Group index
+ * @param group : group name (used in messages)
+ * @return true if it succesfully read, false otherwise
+ */
+static bool mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group)
+{
+ nullpo_retr(false, optslot);
+ nullpo_retr(false, group);
+ Assert_retr(false, group_id >= 0 && group_id < mob->opt_drop_groups_count);
+ Assert_retr(false, n >= 0 && n < MAX_ITEM_OPTIONS);
+
+ // Structure:
+ // {
+ // Rate: chance of option 1 (int)
+ // OptionName1: value
+ // OptionName2: [min, max]
+ // OptionName3: [min, max, rate]
+ // ....
+ // }
+
+ int drop_rate; // The rate for this option to be dropped (Rate field)
+ if (libconfig->setting_lookup_int(optslot, "Rate", &drop_rate) == CONFIG_FALSE) {
+ ShowWarning("mob_read_optdrops_optslot: Missing option %d rate in group %s, skipping.\n", n, group);
+ return false;
+ }
+
+ int count = libconfig->setting_length(optslot);
+ if (count <= 1) { // 1 = Rate
+ ShowWarning("mob_read_optdrops_optslot: Option %d of %s group doesn't contain any possible options, skipping.\n", n, group);
+ return false;
+ }
+
+ struct optdrop_group_optslot *entry = &(mob->opt_drop_groups[group_id].optslot[n]);
+ entry->options = aCalloc(sizeof(struct optdrop_group_option), count);
+
+ int idx = 0;
+ int i = 0;
+ struct config_setting_t *opt = NULL;
+ bool calc_rate = false;
+ while (i < count && (opt = libconfig->setting_get_elem(optslot, i)) != NULL) {
+ ++i;
+ mob->read_optdrops_option(opt, entry, &idx, &calc_rate, n, group);
+ }
+ entry->option_count = idx;
+ mob->opt_drop_groups[group_id].optslot_count++;
+ mob->opt_drop_groups[group_id].optslot_rate[n] = drop_rate;
+
+ // If there're empty rates, calculate them
+ if (calc_rate == true) {
+ for (int j = 0; j < idx; ++j) {
+ if (entry->options[j].rate == 0)
+ entry->options[j].rate = 10000 / idx;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Reads one random option drop group.
+ * @param group : Drop Group entry from config file
+ * @param n : group index
+ * @return true if it successfuly read, false otherwise
+ */
+static bool mob_read_optdrops_group(struct config_setting_t *group, int n)
+{
+ /* Structure:
+ <Group Name>: (
+ { <Option 1 drop data> },
+ { <Option 2 drop data> },
+ ... // Up to MAX_ITEM_OPTIONS
+ )
+ */
+ nullpo_retr(false, group);
+
+ const char *group_name = config_setting_name(group);
+
+ if (group_name == NULL || *group_name == '\0') {
+ ShowWarning("mob_read_optdrops_group: Invalid name for random option drop group, skipping group %d...\n", n);
+ return false;
+ }
+
+ script->set_constant2(group_name, n, false, false);
+
+ int i = 0;
+ struct config_setting_t *drop_data = NULL;
+ while (i < MAX_ITEM_OPTIONS && (drop_data = libconfig->setting_get_elem(group, i)) != NULL) {
+ mob->read_optdrops_optslot(drop_data, i, n, group_name);
+ i++;
+ }
+
+ return true;
+}
+
+/**
+ * Reads random option drop groups database.
+ */
+static bool mob_read_optdrops_db(void)
+{
+ const char *filename = "option_drop_groups.conf"; // FIXME hardcoded name
+
+ char filepath[256];
+ safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename);
+
+ struct config_t option_groups;
+ if (libconfig->load_file(&option_groups, filepath) == CONFIG_FALSE) {
+ ShowError("Failed to load option drop groups\n");
+ return false;
+ }
+
+ struct config_setting_t *its = libconfig->lookup(&option_groups, "option_drop_group_db");
+ struct config_setting_t *groups = NULL;
+
+ int i = 0;
+ if (its != NULL && (groups = libconfig->setting_get_elem(its, 0)) != NULL) {
+ int count = libconfig->setting_length(groups);
+ mob->opt_drop_groups = aCalloc(sizeof(struct optdrop_group), count);
+ mob->opt_drop_groups_count = count; // maximum size (used by assertions)
+
+ struct config_setting_t *group = NULL;
+ while ((group = libconfig->setting_get_elem(groups, i)) != NULL) {
+ mob->read_optdrops_group(group, i);
+ i++;
+ }
+ mob->opt_drop_groups_count = i; // number of entries used (should be the same amount)
+ }
+
+ libconfig->destroy(&option_groups);
+
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, filepath);
+ return true;
+}
+
+/**
* Processes the stats for a mob database entry.
*
* @param[in,out] entry The destination mob_db entry, already initialized
@@ -3941,6 +4184,51 @@ static uint32 mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t
}
/**
+ * Process an entry of mob/mvp drops that contains a random option drop group.
+ *
+ * @param entry : mob db entry being read (used in error messages)
+ * @param item_name : AegisName of the item in this entry (used in error messages)
+ * @param drop : drop data entry
+ * @param drop_rate : used to return the entry drop_rate
+ * @returns a reference to the opt_drop_group to be used when creating this item drop
+ */
+static struct optdrop_group *mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate)
+{
+ nullpo_retr(NULL, entry);
+ nullpo_retr(NULL, item_name);
+ nullpo_retr(NULL, drop);
+ nullpo_retr(NULL, drop_rate);
+
+ // (Drop Rate, "Option Group")
+ if (!config_setting_is_list(drop) || config_setting_length(drop) != 2) {
+ ShowError("mob_read_db_optdrops: Invalid format for option drop group on item \"%s\" in monster %d, skipping.\n", item_name, entry->mob_id);
+ return NULL;
+ }
+
+ int i32;
+ if (mob->get_const(libconfig->setting_get_elem(drop, 0), &i32) && i32 >= 0)
+ *drop_rate = i32;
+
+ const char *group_name = libconfig->setting_get_string_elem(drop, 1);
+ if (group_name == NULL || *group_name == '\0') {
+ ShowError("mob_read_db_optdrops: Missing option drop group name on item \"%s\" in monster %d, skipping.\n", item_name, entry->mob_id);
+ return NULL;
+ }
+
+ int opt_id;
+ if (script->get_constant(group_name, &opt_id) == false) {
+ ShowError("mob_read_db_optdrops: Invalid option drop group \"%s\" on item \"%s\" in monster %d, does this group really exists? Skipping...\n", group_name, item_name, entry->mob_id);
+ return NULL;
+ }
+ if (opt_id < 0 || opt_id >= mob->opt_drop_groups_count) {
+ ShowError("mob_read_db_optdrops: Invalid option drop group \"%s\" index \"%d\" on item \"%s\" in monster %d, does this group really exists? Skipping...\n", group_name, opt_id, item_name, entry->mob_id);
+ return NULL;
+ }
+
+ return &mob->opt_drop_groups[opt_id];
+}
+
+/**
* Processes the MVP drops for a mob_db entry.
*
* @param[in,out] entry The destination mob_db entry, already initialized
@@ -3965,9 +4253,18 @@ static void mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting
i++;
continue;
}
- if (mob->get_const(drop, &i32) && i32 >= 0) {
- value = i32;
+
+ struct optdrop_group *drop_option = NULL;
+ if (config_setting_is_number(drop)) {
+ // Setting is a number, item doesn't contain options
+ if (mob->get_const(drop, &i32) && i32 >= 0) {
+ value = i32;
+ }
+ } else {
+ // (Drop Rate, "Opt Drop Group")
+ drop_option = mob->read_db_drops_option(entry, name, drop, &value);
}
+
if (value <= 0) {
ShowWarning("mob_read_db: wrong drop chance %d for mvp drop item %s in monster %d\n", value, name, entry->mob_id);
i++;
@@ -3981,6 +4278,7 @@ static void mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting
}
mob->item_dropratio_adjust(entry->mvpitem[idx].nameid, entry->mob_id, &rate_adjust);
entry->mvpitem[idx].p = mob->drop_adjust(value, rate_adjust, battle_config.item_drop_mvp_min, battle_config.item_drop_mvp_max);
+ entry->mvpitem[idx].options = drop_option;
//calculate and store Max available drop chance of the MVP item
if (entry->mvpitem[idx].p) {
@@ -4024,9 +4322,18 @@ static void mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t
i++;
continue;
}
- if (mob->get_const(drop, &i32) && i32 >= 0) {
- value = i32;
+
+ struct optdrop_group *drop_option = NULL;
+ if (config_setting_is_number(drop)) {
+ // Setting is a number, item doesn't contain options
+ if (mob->get_const(drop, &i32) && i32 >= 0) {
+ value = i32;
+ }
+ } else {
+ // (Drop Rate, "Opt Drop Group")
+ drop_option = mob->read_db_drops_option(entry, name, drop, &value);
}
+
if (value <= 0) {
ShowWarning("mob_read_db: wrong drop chance %d for drop item %s in monster %d\n", value, name, entry->mob_id);
i++;
@@ -4034,6 +4341,7 @@ static void mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t
}
entry->dropitem[idx].nameid = id->nameid;
+ entry->dropitem[idx].options = drop_option;
if (!entry->dropitem[idx].nameid) {
entry->dropitem[idx].p = 0; //No drop.
i++;
@@ -4301,6 +4609,8 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou
* }
* Drops: {
* AegisName: chance
+ * // or
+ * AegisName: (chance, "Option Drop Group")
* ...
* }
*/
@@ -5213,6 +5523,7 @@ static void mob_load(bool minimal)
return;
}
sv->readdb(map->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb
+ mob->read_optdrops_db();
mob->readchatdb();
mob->readdb();
mob->readskilldb();
@@ -5254,6 +5565,8 @@ static void mob_reload(void)
}
mob->item_drop_ratio_other_db->clear(mob->item_drop_ratio_other_db, mob->final_ratio_sub);
+ mob->destroy_drop_groups();
+
mob->load(false);
}
@@ -5309,6 +5622,22 @@ static void mob_destroy_mob_db(int index)
mob->db_data[index] = NULL;
}
+/**
+ * Unloads option drop group database
+ */
+static void mob_destroy_drop_groups(void)
+{
+ for (int i = 0; i < mob->opt_drop_groups_count; i++) {
+ struct optdrop_group *group = &mob->opt_drop_groups[i];
+
+ for (int j = 0; j < group->optslot_count; j++) {
+ aFree(group->optslot[j].options);
+ }
+ }
+
+ aFree(mob->opt_drop_groups);
+}
+
/*==========================================
* Clean memory usage.
*------------------------------------------*/
@@ -5327,6 +5656,7 @@ static int do_final_mob(void)
mob->destroy_mob_db(i);
}
}
+ mob->destroy_drop_groups();
for (i = 0; i <= MAX_MOB_CHAT; i++)
{
if (mob->chat_db[i] != NULL)
@@ -5443,6 +5773,7 @@ void mob_defaults(void)
mob->ai_sub_lazy = mob_ai_sub_lazy;
mob->ai_lazy = mob_ai_lazy;
mob->ai_hard = mob_ai_hard;
+ mob->setdropitem_options = mob_setdropitem_options;
mob->setdropitem = mob_setdropitem;
mob->setlootitem = mob_setlootitem;
mob->delay_item_drop = mob_delay_item_drop;
@@ -5476,6 +5807,10 @@ void mob_defaults(void)
mob->clone_delete = mob_clone_delete;
mob->drop_adjust = mob_drop_adjust;
mob->item_dropratio_adjust = item_dropratio_adjust;
+ mob->read_optdrops_option = mob_read_optdrops_option;
+ mob->read_optdrops_optslot = mob_read_optdrops_optslot;
+ mob->read_optdrops_group = mob_read_optdrops_group;
+ mob->read_optdrops_db = mob_read_optdrops_db;
mob->lookup_const = mob_lookup_const;
mob->get_const = mob_get_const;
mob->db_validate_entry = mob_db_validate_entry;
@@ -5486,6 +5821,7 @@ void mob_defaults(void)
mob->read_db_drops_sub = mob_read_db_drops_sub;
mob->read_db_mvpdrops_sub = mob_read_db_mvpdrops_sub;
mob->read_db_mode_sub = mob_read_db_mode_sub;
+ mob->read_db_drops_option = mob_read_db_drops_option;
mob->read_db_stats_sub = mob_read_db_stats_sub;
mob->name_constants = mob_name_constants;
mob->readdb_mobavail = mob_readdb_mobavail;
@@ -5501,6 +5837,7 @@ void mob_defaults(void)
mob->final_ratio_sub = mob_final_ratio_sub;
mob->clear_spawninfo = mob_clear_spawninfo;
mob->destroy_mob_db = mob_destroy_mob_db;
+ mob->destroy_drop_groups = mob_destroy_drop_groups;
mob->skill_db_libconfig = mob_skill_db_libconfig;
mob->skill_db_libconfig_sub = mob_skill_db_libconfig_sub;
mob->skill_db_libconfig_sub_skill = mob_skill_db_libconfig_sub_skill;
diff --git a/src/map/mob.h b/src/map/mob.h
index 4cb3877ed..b63efd272 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -152,6 +152,45 @@ struct spawn_info {
unsigned short qty;
};
+/**
+ * Information of one possible option that will fill
+ * an option slot (see optdrop_group_optslot)
+ */
+struct optdrop_group_option {
+ int id; //< Option ID
+ int min; //< Minimun value when this option drops
+ int max; //< Maximun value when this option drops
+ int rate; //< Chance of dropping this option
+};
+
+/**
+ * Information of possible options that will fill
+ * one option slot
+ */
+struct optdrop_group_optslot {
+ int option_count; //< Number of options in *options
+ struct optdrop_group_option *options; //< Array of possible options
+};
+
+/**
+ * A group of options to be random picked when
+ * dropping an item
+ */
+struct optdrop_group {
+ int optslot_count; //< How many option slots are configured by this group
+ int optslot_rate[MAX_ITEM_OPTIONS]; //< The rate to fill each of the configured slots
+ struct optdrop_group_optslot optslot[MAX_ITEM_OPTIONS]; //< Details of the options that will go in each slot
+};
+
+/**
+ * Stores data related to a monster drop (normal or mvp drop)
+ */
+struct mob_drop {
+ int nameid; //< Item ID
+ int p; //< Drop chance
+ struct optdrop_group *options; //< Option Drop Group associated with this drop (NULL if none)
+};
+
struct mob_db {
int mob_id;
char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH];
@@ -160,8 +199,8 @@ struct mob_db {
short range2,range3;
short race2; // celest
unsigned short lv;
- struct { int nameid,p; } dropitem[MAX_MOB_DROP];
- struct { int nameid,p; } mvpitem[MAX_MVP_DROP];
+ struct mob_drop dropitem[MAX_MOB_DROP];
+ struct mob_drop mvpitem[MAX_MVP_DROP];
struct status_data status;
struct view_data vd;
unsigned int option;
@@ -208,7 +247,7 @@ struct mob_data {
struct spawn_data *spawn; //Spawn data.
int spawn_timer; //Required for Convex Mirror
struct item *lootitem;
- short class_;
+ int class_;
unsigned int tdmg; //Stores total damage given to the mob, for exp calculations. [Skotlex]
int level;
int target_id,attacked_id;
@@ -436,6 +475,9 @@ struct mob_interface {
struct mob_db *dummy; //Dummy mob to be returned when a non-existant one is requested.
// Dynamic mob chat database
struct mob_chat *chat_db[MAX_MOB_CHAT + 1];
+ // Random Option Drop groups
+ struct optdrop_group *opt_drop_groups;
+ int opt_drop_groups_count;
// Defines the Manuk/Splendide/Mora mob groups for the status reductions [Epoque & Frost]
int manuk[8];
int splendide[5];
@@ -494,7 +536,8 @@ struct mob_interface {
int (*ai_sub_lazy) (struct mob_data *md, va_list args);
int (*ai_lazy) (int tid, int64 tick, int id, intptr_t data);
int (*ai_hard) (int tid, int64 tick, int id, intptr_t data);
- struct item_drop* (*setdropitem) (int nameid, int qty, struct item_data *data);
+ void (*setdropitem_options) (struct item *item, struct optdrop_group *options);
+ struct item_drop* (*setdropitem) (int nameid, struct optdrop_group *options, int qty, struct item_data *data);
struct item_drop* (*setlootitem) (struct item *item);
int (*delay_item_drop) (int tid, int64 tick, int id, intptr_t data);
void (*item_drop) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag);
@@ -527,6 +570,10 @@ struct mob_interface {
int (*clone_delete) (struct mob_data *md);
unsigned int (*drop_adjust) (int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max);
void (*item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust);
+ bool (*read_optdrops_option) (struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+ bool (*read_optdrops_optslot) (struct config_setting_t *optslot, int n, int group_id, const char *group);
+ bool (*read_optdrops_group) (struct config_setting_t *group, int n);
+ bool (*read_optdrops_db) (void);
void (*readdb) (void);
bool (*lookup_const) (const struct config_setting_t *it, const char *name, int *value);
bool (*get_const) (const struct config_setting_t *it, int *value);
@@ -537,6 +584,7 @@ struct mob_interface {
void (*read_db_drops_sub) (struct mob_db *entry, struct config_setting_t *t);
void (*read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t);
uint32 (*read_db_mode_sub) (struct mob_db *entry, struct config_setting_t *t);
+ struct optdrop_group *(*read_db_drops_option) (struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
void (*read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t);
void (*name_constants) (void);
bool (*readdb_mobavail) (char *str[], int columns, int current);
@@ -552,6 +600,7 @@ struct mob_interface {
void (*set_item_drop_ratio) (int nameid, struct item_drop_ratio *ratio);
int (*final_ratio_sub) (union DBKey key, struct DBData *data, va_list ap);
void (*destroy_mob_db) (int index);
+ void (*destroy_drop_groups) (void);
bool (*skill_db_libconfig) (const char *filename, bool ignore_missing);
bool (*skill_db_libconfig_sub) (struct config_setting_t *it, int n);
bool (*skill_db_libconfig_sub_skill) (struct config_setting_t *it, int n, int mob_id);
diff --git a/src/map/npc.c b/src/map/npc.c
index 7e1dab1b2..4b79a9fed 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2961,7 +2961,7 @@ static bool npc_viewisid(const char *viewid)
* @param class_ The NPC view class.
* @return A pointer to the created NPC data (ownership passed to the caller).
*/
-static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_)
+static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_)
{
struct npc_data *nd;
@@ -3911,14 +3911,14 @@ static void npc_setdisplayname(struct npc_data *nd, const char *newname)
safestrncpy(nd->name, newname, sizeof(nd->name));
if( map->list[nd->bl.m].users )
- clif->charnameack(0, &nd->bl);
+ clif->blname_ack(0, &nd->bl);
}
/// Changes the display class of the npc.
///
/// @param nd Target npc
/// @param class_ New display class
-static void npc_setclass(struct npc_data *nd, short class_)
+static void npc_setclass(struct npc_data *nd, int class_)
{
nullpo_retv(nd);
@@ -4199,7 +4199,7 @@ static const char *npc_parse_mob(const char *w1, const char *w2, const char *w3,
mobspawn.num = (unsigned short)num;
mobspawn.active = 0;
- mobspawn.class_ = (short) class_;
+ mobspawn.class_ = class_;
mobspawn.x = (unsigned short)x;
mobspawn.y = (unsigned short)y;
mobspawn.xs = (signed short)xs;
diff --git a/src/map/npc.h b/src/map/npc.h
index d455a395b..0eb8befd1 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -77,7 +77,7 @@ struct npc_data {
struct view_data vd;
unsigned int option;
struct npc_data *master_nd;
- short class_;
+ int class_;
short speed;
char name[NAME_LENGTH+1];// display name
char exname[NAME_LENGTH+1];// unique npc name
@@ -268,7 +268,7 @@ struct npc_interface {
void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath);
bool (*viewisid) (const char *viewid);
- struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+ struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
const char *(*parse_warp) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
@@ -288,7 +288,7 @@ struct npc_interface {
void (*unsetcells) (struct npc_data *nd);
void (*movenpc) (struct npc_data *nd, int16 x, int16 y);
void (*setdisplayname) (struct npc_data *nd, const char *newname);
- void (*setclass) (struct npc_data *nd, short class_);
+ void (*setclass) (struct npc_data *nd, int class_);
int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
const char *(*parse_function) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*parse_mob2) (struct spawn_data *mobspawn);
diff --git a/src/map/packets.h b/src/map/packets.h
index 44a49b387..a0b6b7f4b 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -649,6 +649,10 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0439,clif->pUseItem,2,4);
#endif
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+ packet(0x044a,clif->pClientVersion);
+#endif
+
// 2009-05-20aRagexe, 2009-05-20aRagexeRE
#if PACKETVER >= 20090520
// new packets
@@ -1773,8 +1777,10 @@ packet(0x96e,clif->ackmergeitems);
#if PACKETVER >= 20151104
// new packets
packet(0x0a46,clif->pReqStyleChange);
+ packet(0x0a48,clif->pStyleClose);
#endif
+
// 2016-03-23aRagexeRE
#if PACKETVER >= 20160323
// new packets
@@ -1794,6 +1800,11 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0a77,clif->pCameraInfo); // CZ_CAMERA_INFO
#endif
+// all 20160622+
+#if PACKETVER >= 20160622
+ packet(0x0a88,clif->pResetCooldown);
+#endif
+
// 2017-02-28aRagexeRE
#if PACKETVER >= 20170228
// new packets
@@ -1922,9 +1933,13 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0b19,clif->pInventoryExpansionRejected);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
packet(0x0b0f,clif->pNPCBarterPurchase);
packet(0x0b12,clif->pNPCBarterClosed);
#endif
+#if PACKETVER_MAIN_NUM >= 20190403 || PACKETVER_RE_NUM >= 20190320
+ packet(0x0b1c,clif->pPing);
+#endif
+
#endif /* MAP_PACKETS_H */
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 1bff5a738..9505fb454 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -37,7 +37,7 @@
packetKeys(0x49357d72,0x22c370a1,0x5f836591);
#endif
-// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE
+// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE
#if PACKETVER == 20101123 || \
PACKETVER == 20101124 || \
PACKETVER == 20101125 || \
@@ -133,7 +133,19 @@
PACKETVER == 20181212 || \
PACKETVER == 20181219 || \
PACKETVER == 20181226 || \
- PACKETVER >= 20190109
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER >= 20190403
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index 574c69fcc..e36091424 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -30,7 +30,7 @@
/* This file is autogenerated, please do not commit manual changes */
-// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero
+// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero
#if PACKETVER == 20171018 || \
PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
@@ -68,7 +68,16 @@
PACKETVER == 20181128 || \
PACKETVER == 20181212 || \
PACKETVER == 20181219 || \
- PACKETVER >= 20181226
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190117 || \
+ PACKETVER == 20190130 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190327 || \
+ PACKETVER >= 20190403
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 5bae987c9..d0c3099b9 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -9727,14 +9727,25 @@
packet(0x0967,clif->pSolveCharName,2); // CZ_REQNAME_BYGID // 6
#endif
-// 2018-11-21bRagexe, 2018-11-28aRagexe, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-12aRagexe, 2018-12-12bRagexe, 2018-12-19bRagexe, 2018-12-26aRagexe, 2019-01-09aRagexe
+// 2018-11-21bRagexe, 2018-11-28aRagexe, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-12aRagexe, 2018-12-12bRagexe, 2018-12-19bRagexe, 2018-12-26aRagexe, 2019-01-09aRagexe, 2019-01-16bRagexe, 2019-01-16cRagexe, 2019-01-23dRagexe, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-27aRagexe, 2019-02-28aRagexe, 2019-03-06bRagexe, 2019-03-06cRagexe, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-22aRagexe, 2019-03-27bRagexe, 2019-04-03aRagexe
#if PACKETVER == 20181121 || \
PACKETVER == 20181128 || \
PACKETVER == 20181205 || \
PACKETVER == 20181212 || \
PACKETVER == 20181219 || \
PACKETVER == 20181226 || \
- PACKETVER >= 20190109
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER >= 20190403
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h
index ec1d3971f..c41095fb4 100644
--- a/src/map/packets_shuffle_re.h
+++ b/src/map/packets_shuffle_re.h
@@ -9663,7 +9663,7 @@
packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 12
#endif
-// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-09-12dRagexeRE, 2018-09-19aRagexeRE, 2018-10-02aRagexeRE, 2018-10-02bRagexeRE, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexeRE, 2018-10-17bRagexeRE, 2018-10-31cRagexeRE, 2018-11-07aRagexeRE, 2018-11-14cRagexeRE, 2018-11-14dRagexeRE, 2018-11-21cRagexeRE, 2018-11-28aRagexeRE, 2018-12-05bRagexeRE, 2018-12-12aRagexeRE, 2018-12-12bRagexeRE, 2018-12-19bRagexeRE, 2018-12-26aRagexeRE, 2019-01-09bRagexeRE
+// 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexeRE, 2018-08-01cRagexeRE, 2018-08-08bRagexeRE, 2018-08-22cRagexeRE, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-09-12dRagexeRE, 2018-09-19aRagexeRE, 2018-10-02aRagexeRE, 2018-10-02bRagexeRE, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexeRE, 2018-10-17bRagexeRE, 2018-10-31cRagexeRE, 2018-11-07aRagexeRE, 2018-11-14cRagexeRE, 2018-11-14dRagexeRE, 2018-11-21cRagexeRE, 2018-11-28aRagexeRE, 2018-12-05bRagexeRE, 2018-12-12aRagexeRE, 2018-12-12bRagexeRE, 2018-12-19bRagexeRE, 2018-12-26aRagexeRE, 2019-01-09bRagexeRE, 2019-01-16bRagexeRE, 2019-01-16cRagexeRE, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-20aRagexeRE, 2019-02-27bRagexeRE, 2019-02-28aRagexeRE, 2019-03-06bRagexeRE, 2019-03-06cRagexeRE, 2019-03-20aRagexeRE, 2019-03-22aRagexeRE, 2019-03-27bRagexeRE, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE
#if PACKETVER == 20180704 || \
PACKETVER == 20180711 || \
PACKETVER == 20180718 || \
@@ -9684,7 +9684,18 @@
PACKETVER == 20181212 || \
PACKETVER == 20181219 || \
PACKETVER == 20181226 || \
- PACKETVER >= 20190109
+ PACKETVER == 20190109 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190123 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190228 || \
+ PACKETVER == 20190306 || \
+ PACKETVER == 20190320 || \
+ PACKETVER == 20190322 || \
+ PACKETVER == 20190327 || \
+ PACKETVER >= 20190403
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h
index 4a85d619b..ccf11a647 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -742,13 +742,22 @@
packet(0x0968,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
#endif
-// 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero
+// 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero
#if PACKETVER == 20181114 || \
PACKETVER == 20181120 || \
PACKETVER == 20181128 || \
PACKETVER == 20181212 || \
PACKETVER == 20181219 || \
- PACKETVER >= 20181226
+ PACKETVER == 20181226 || \
+ PACKETVER == 20190116 || \
+ PACKETVER == 20190117 || \
+ PACKETVER == 20190130 || \
+ PACKETVER == 20190213 || \
+ PACKETVER == 20190220 || \
+ PACKETVER == 20190227 || \
+ PACKETVER == 20190313 || \
+ PACKETVER == 20190327 || \
+ PACKETVER >= 20190403
packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26
packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5
packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index d20b20bee..96337d32b 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3056,7 +3056,7 @@ struct PACKET_CZ_PARTY_CONFIG {
} __attribute__((packed));
DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_ZC_NPC_BARTER_OPEN_sub {
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 nameid;
@@ -3084,14 +3084,14 @@ struct PACKET_ZC_NPC_BARTER_OPEN {
DEFINE_PACKET_HEADER(ZC_NPC_BARTER_OPEN, 0x0b0e);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_CZ_NPC_BARTER_CLOSE {
int16 packetType;
} __attribute__((packed));
DEFINE_PACKET_HEADER(CZ_NPC_BARTER_CLOSE, 0x0b12);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_CZ_NPC_BARTER_PURCHASE_sub {
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
@@ -3111,6 +3111,83 @@ struct PACKET_CZ_NPC_BARTER_PURCHASE {
DEFINE_PACKET_HEADER(CZ_NPC_BARTER_PURCHASE, 0x0b0f);
#endif
+#if PACKETVER_MAIN_NUM >= 20181212 || PACKETVER_RE_NUM >= 20181212 || PACKETVER_ZERO_NUM >= 20190130
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+ uint32 unknown;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x0b1a);
+#elif PACKETVER_MAIN_NUM >= 20091124 || PACKETVER_RE_NUM >= 20091124 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+ uint8 disposable;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x07fb);
+#elif PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_SAK_NUM >= 20080618 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_USESKILL_ACK {
+ int16 packetType;
+ uint32 srcId;
+ uint32 dstId;
+ uint16 x;
+ uint16 y;
+ uint16 skillId;
+ uint32 element;
+ uint32 delayTime;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO)
+struct PACKET_CZ_CLIENT_VERSION {
+ int16 packetType;
+ uint32 clientVersion;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190227 || PACKETVER_RE_NUM >= 20190220 || PACKETVER_ZERO_NUM >= 20190220
+struct PACKET_CZ_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_PING, 0x0b1c);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190213 || PACKETVER_RE_NUM >= 20190213 || PACKETVER_ZERO_NUM >= 20190130
+struct PACKET_ZC_PING {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PING, 0x0b1d);
+#endif
+
+#if PACKETVER >= 20160622
+struct PACKET_CZ_COOLDOWN_RESET {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_COOLDOWN_RESET, 0x0a88);
+#endif
+
+#if PACKETVER >= 20151104
+struct PACKET_CZ_STYLE_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_STYLE_CLOSE, 0x0a48);
+#endif
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
diff --git a/src/map/pc.c b/src/map/pc.c
index 5410ae96a..140cf7ac1 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6147,7 +6147,7 @@ static int pc_checkequip(struct map_session_data *sd, int pos)
* Convert's from the client's lame Job ID system
* to the map server's 'makes sense' system. [Skotlex]
*------------------------------------------*/
-static int pc_jobid2mapid(int16 class)
+static int pc_jobid2mapid(int class)
{
switch (class) {
//Novice And 1-1 Jobs
@@ -6289,9 +6289,9 @@ static int pc_jobid2mapid(int16 class)
}
//Reverts the map-style class id to the client-style one.
-static int pc_mapid2jobid(uint16 job, int sex)
+static int pc_mapid2jobid(unsigned int class, int sex)
{
- switch (job) {
+ switch (class) {
//Novice And 1-1 Jobs
case MAPID_NOVICE: return JOB_NOVICE;
case MAPID_SWORDMAN: return JOB_SWORDMAN;
@@ -8138,7 +8138,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
if( battle_config.show_mob_info&4 )
{// update name with new level
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
}
}
src = battle->get_master(src); // Maybe Player Summon
@@ -9008,6 +9008,13 @@ static int pc_jobchange(struct map_session_data *sd, int class, int upper)
if (sd->disguise != -1)
pc->disguise(sd, -1);
+ // Fix atcommand @jobchange when the player changing from 3rd job having alternate body style into non-3rd job, crashing the client
+ if (pc->has_second_costume(sd) == false) {
+ sd->status.body = 0;
+ sd->vd.body_style = 0;
+ clif->changelook(&sd->bl, LOOK_BODY2, sd->vd.body_style);
+ }
+
status->set_viewdata(&sd->bl, class);
clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris]
if(sd->vd.cloth_color)
@@ -12335,7 +12342,8 @@ static bool pc_has_second_costume(struct map_session_data *sd)
{
nullpo_retr(false, sd);
- if ((sd->job & JOBL_THIRD) != 0)
+// FIXME: JOB_SUPER_NOVICE_E(4190) is not supposed to be 3rd Job. (Issue#2383)
+ if ((sd->job & JOBL_THIRD) != 0 && (sd->job & MAPID_BASEMASK) != MAPID_NOVICE)
return true;
return false;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 90e59edb2..b2069d4df 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -117,22 +117,22 @@ BEGIN_ZEROED_BLOCK; // all the variables within this block get zero'ed in each c
int addrace2[RC2_MAX];
int addsize[3];
struct drain_data {
- short rate;
- short per;
- short value;
+ int rate;
+ int per;
+ int value;
unsigned type:1;
} hp_drain[RC_MAX], sp_drain[RC_MAX];
struct {
- short class_, rate;
+ int class_, rate;
} add_dmg[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} addele2[MAX_PC_BONUS];
END_ZEROED_BLOCK;
};
struct s_autospell {
- short id, lv, rate, flag;
+ int id, lv, rate, flag;
int card_id;
bool lock; // bAutoSpellOnSkill: blocks autospell from triggering again, while being executed
};
@@ -147,7 +147,7 @@ struct s_addeffect {
};
struct s_addeffectonskill {
enum sc_type id;
- short rate, skill;
+ int rate, skill;
unsigned char target;
};
struct s_add_drop {
@@ -156,11 +156,11 @@ struct s_add_drop {
int race, rate;
};
struct s_autobonus {
- short rate,atk_type;
+ int rate,atk_type;
unsigned int duration;
char *bonus_script, *other_script;
int active;
- unsigned short pos;
+ unsigned int pos;
};
enum npc_timeout_type {
NPCT_INPUT = 0,
@@ -219,11 +219,11 @@ struct map_session_data {
unsigned int changemap : 1;
unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
short pmap; // Previous map on Map Change
- unsigned short autoloot;
+ unsigned int autoloot;
int autolootid[AUTOLOOTITEM_SIZE]; // [Zephyrus]
- unsigned short autoloottype;
+ unsigned int autoloottype;
unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid
- unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
+ unsigned int autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
unsigned int gmaster_flag : 1;
unsigned int prevend : 1;//used to flag wheather you've spent 40sp to open the vending or not.
unsigned int warping : 1;//states whether you're in the middle of a warp processing
@@ -288,7 +288,7 @@ struct map_session_data {
int followtimer; // [MouseJstr]
int followtarget;
time_t emotionlasttime; // to limit flood with emotion packets
- short skillitem,skillitemlv;
+ int skillitem,skillitemlv;
uint16 skill_id_old,skill_lv_old;
uint16 skill_id_dance,skill_lv_dance;
short cook_mastery; // range: [0,1999] [Inkfish]
@@ -312,7 +312,7 @@ struct map_session_data {
int16 weapontype; ///< Weapon type considering both hands (@see enum weapon_type).
int16 weapontype1; ///< Weapon type in the right/primary hand (@see enum weapon_type).
int16 weapontype2; ///< Weapon type in the left/secondary hand (@see enum weapon_type).
- short disguise; // [Valaris]
+ int disguise; // [Valaris]
struct weapon_data right_weapon, left_weapon;
BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of status_calc_pc()
@@ -337,9 +337,9 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int expaddrace[RC_MAX];
int ignore_mdef[RC_MAX];
int ignore_def[RC_MAX];
- short sp_gain_race[RC_MAX];
- short sp_gain_race_attack[RC_MAX];
- short hp_gain_race_attack[RC_MAX];
+ int sp_gain_race[RC_MAX];
+ int sp_gain_race_attack[RC_MAX];
+ int hp_gain_race_attack[RC_MAX];
#ifdef RENEWAL
int race_tolerance[RC_MAX];
#endif
@@ -347,16 +347,16 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
struct s_addeffect addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS];
struct s_addeffectonskill addeff3[MAX_PC_BONUS];
struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills.
- unsigned short id;
- short val;
+ unsigned int id;
+ int val;
} skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate;
int tick;
} hp_loss, sp_loss, hp_regen, sp_regen;
struct {
- short class_, rate;
+ int class_, rate;
} add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS], add_mdmg[MAX_PC_BONUS];
struct s_add_drop add_drop[MAX_PC_BONUS];
struct {
@@ -364,11 +364,11 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int rate;
} itemhealrate[MAX_PC_BONUS];
struct {
- short flag, rate;
+ int flag, rate;
unsigned char ele;
} subele2[MAX_PC_BONUS];
struct {
- short value;
+ int value;
int rate, tick;
} def_set_race[RC_MAX], mdef_set_race[RC_MAX];
struct {
@@ -394,17 +394,17 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st
int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
int shieldmdef;//royal guard's
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
- short splash_range, splash_add_range;
- short add_steal_rate;
- short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
- short hp_vanish_rate;
- short hp_vanish_per, hp_vanish_trigger;
- short sp_vanish_rate;
- short sp_vanish_per, sp_vanish_trigger;
- unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
- unsigned short unbreakable_equip; //100% break resistance on certain equipment
- unsigned short unstripable_equip;
+ int splash_range, splash_add_range;
+ int add_steal_rate;
+ int add_heal_rate, add_heal2_rate;
+ int sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
+ int hp_vanish_rate;
+ int hp_vanish_per, hp_vanish_trigger;
+ int sp_vanish_rate;
+ int sp_vanish_per, sp_vanish_trigger;
+ unsigned int unbreakable; // chance to prevent ANY equipment breaking [celest]
+ unsigned int unbreakable_equip; //100% break resistance on certain equipment
+ unsigned int unstripable_equip;
int fixcastrate,varcastrate;
int add_fixcast,add_varcast;
int ematk; // matk bonus from equipment
@@ -419,22 +419,22 @@ END_ZEROED_BLOCK;
int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
int itemid;
- short itemindex; //Used item's index in sd->inventory [Skotlex]
- short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo]
- short spiritball, spiritball_old;
+ int itemindex; //Used item's index in sd->inventory [Skotlex]
+ int catch_target_class;
+ int spiritball, spiritball_old;
int spirit_timer[MAX_SPIRITBALL];
- short charm_count;
+ int charm_count;
int charm_type;
int charm_timer[MAX_SPIRITCHARM];
unsigned char potion_success_counter; //Potion successes in row counter
unsigned char mission_count; //Stores the bounty kill count for TK_MISSION
- short mission_mobid; //Stores the target mob_id for TK_MISSION
+ int mission_mobid; //Stores the target mob_id for TK_MISSION
int die_counter; //Total number of times you've died
int devotion[MAX_PC_DEVOTION]; //Stores the account IDs of chars devoted to.
int trade_partner;
struct {
struct {
- short index, amount;
+ int index, amount;
} item[10];
int zeny, weight;
} deal;
@@ -465,18 +465,18 @@ END_ZEROED_BLOCK;
struct {
int m; //-1 - none, other: map index corresponding to map name.
- unsigned short index; //map index
+ unsigned int index; //map index
} feel_map[MAX_PC_FEELHATE];// 0 - Sun; 1 - Moon; 2 - Stars
- short hate_mob[MAX_PC_FEELHATE];
+ int hate_mob[MAX_PC_FEELHATE];
int pvp_timer;
- short pvp_point;
- unsigned short pvp_rank, pvp_lastusers;
- unsigned short pvp_won, pvp_lost;
+ int pvp_point;
+ unsigned int pvp_rank, pvp_lastusers;
+ unsigned int pvp_won, pvp_lost;
char eventqueue[MAX_EVENTQUEUE][EVENT_NAME_LENGTH];
int eventtimer[MAX_EVENTTIMER];
- unsigned short eventcount; // [celest]
+ unsigned int eventcount; // [celest]
int change_level_2nd; // job level when changing from 1st to 2nd class [jobchange_level in global_reg_value]
int change_level_3rd; // job level when changing from 2nd to 3rd class [jobchange_level_3rd in global_reg_value]
@@ -769,24 +769,24 @@ END_ZEROED_BLOCK;
#define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) )
struct skill_tree_requirement {
- short id;
+ int id;
unsigned short idx;
unsigned char lv;
};
struct skill_tree_entry {
- short id;
+ int id;
unsigned short idx;
unsigned char max;
unsigned char joblv;
- short inherited;
+ int inherited;
VECTOR_DECL(struct skill_tree_requirement) need;
}; // Celest
struct sg_data {
- short anger_id;
- short bless_id;
- short comfort_id;
+ int anger_id;
+ int bless_id;
+ int comfort_id;
char feel_var[NAME_LENGTH];
char hate_var[NAME_LENGTH];
bool (*day_func)(void);
@@ -1068,8 +1068,8 @@ END_ZEROED_BLOCK; /* End */
void (*setstand) (struct map_session_data *sd);
int (*candrop) (struct map_session_data *sd,struct item *item);
- int (*jobid2mapid) (int16 class); // Skotlex
- int (*mapid2jobid) (unsigned short class_, int sex); // Skotlex
+ int (*jobid2mapid) (int class); // Skotlex
+ int (*mapid2jobid) (unsigned int class_, int sex); // Skotlex
const char * (*job_name) (int class);
diff --git a/src/map/pet.c b/src/map/pet.c
index dd9f1ebbf..ce26b6cb1 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -111,8 +111,8 @@ static int pet_create_egg(struct map_session_data *sd, int item_id)
if (!pc->inventoryblank(sd)) return 0; // Inventory full
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_,
- (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_,
+ mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0,
(short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
@@ -251,7 +251,7 @@ static int pet_hungry(int tid, int64 tick, int id, intptr_t data)
pd->pet.hungry--;
/* Pet Autofeed */
- if (battle_config.feature_enable_homun_autofeed != 0) {
+ if (battle_config.feature_enable_pet_autofeed != 0) {
if (pd->petDB->autofeed == 1 && pd->pet.autofeed == 1 && pd->pet.hungry <= 25) {
pet->food(sd, pd);
}
@@ -348,6 +348,21 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
if (i != sd->status.inventorySize) {
sd->status.inventory[i].attribute &= ~ATTR_BROKEN;
sd->status.inventory[i].bound = IBT_NONE;
+ } else {
+ // The pet egg wasn't found: it was probably hatched with the old system that deleted the egg.
+ struct item tmp_item = {0};
+ int flag;
+
+ tmp_item.nameid = pd->petDB->EggID;
+ tmp_item.identify = 1;
+ tmp_item.card[0] = CARD0_PET;
+ tmp_item.card[1] = GetWord(pd->pet.pet_id, 0);
+ tmp_item.card[2] = GetWord(pd->pet.pet_id, 1);
+ tmp_item.card[3] = pd->pet.rename_flag;
+ if ((flag = pc->additem(sd, &tmp_item, 1, LOG_TYPE_EGG)) != 0) {
+ clif->additem(sd, 0, 0, flag);
+ map->addflooritem(&sd->bl, &tmp_item, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0, false);
+ }
}
#if PACKETVER >= 20180704
clif->inventoryList(sd);
@@ -614,7 +629,7 @@ static int pet_catch_process2(struct map_session_data *sd, int target_id)
* pet_id - Should contain pet id otherwise means failure
* returns true on success
**/
-static bool pet_get_egg(int account_id, short pet_class, int pet_id)
+static bool pet_get_egg(int account_id, int pet_class, int pet_id)
{
struct map_session_data *sd;
struct item tmp_item;
@@ -733,7 +748,7 @@ static int pet_change_name_ack(struct map_session_data *sd, const char *name, in
}
safestrncpy(pd->pet.name, newname, NAME_LENGTH);
aFree(newname);
- clif->charnameack (0,&pd->bl);
+ clif->blname_ack(0,&pd->bl);
pd->pet.rename_flag = 1;
clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom);
clif->send_petstatus(sd);
diff --git a/src/map/pet.h b/src/map/pet.h
index 049816804..2508a70a6 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -37,7 +37,7 @@ struct pet_evolve_data {
};
struct s_pet_db {
- short class_;
+ int class_;
char name[NAME_LENGTH],jname[NAME_LENGTH];
int itemID;
int EggID;
@@ -160,7 +160,7 @@ struct pet_interface {
int (*select_egg) (struct map_session_data *sd, int egg_index);
int (*catch_process1) (struct map_session_data *sd, int target_class);
int (*catch_process2) (struct map_session_data *sd, int target_id);
- bool (*get_egg) (int account_id, short pet_class, int pet_id );
+ bool (*get_egg) (int account_id, int pet_class, int pet_id );
int (*unequipitem) (struct map_session_data *sd, struct pet_data *pd);
int (*food) (struct map_session_data *sd, struct pet_data *pd);
int (*ai_sub_hard_lootsearch) (struct block_list *bl, va_list ap);
diff --git a/src/map/rodex.c b/src/map/rodex.c
index eea27b6d0..766fdc5ea 100644
--- a/src/map/rodex.c
+++ b/src/map/rodex.c
@@ -204,7 +204,7 @@ static void rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amou
/// @param base_level : Reference to return the character base level, if he exists
/// @param char_id : Reference to return the character id, if he exists
/// @param class : Reference to return the character class id, if he exists
-static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class)
+static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class)
{
intif->rodex_checkname(sd, name);
}
@@ -404,12 +404,12 @@ static void rodex_read_mail(struct map_session_data *sd, int64 mail_id)
if (msg->opentype == RODEX_OPENTYPE_RETURN) {
if (msg->sender_read == false) {
- intif->rodex_updatemail(msg->id, 4);
+ intif->rodex_updatemail(sd, msg->id, 0, 4);
msg->sender_read = true;
}
} else {
if (msg->is_read == false) {
- intif->rodex_updatemail(msg->id, 0);
+ intif->rodex_updatemail(sd, msg->id, 0, 0);
msg->is_read = true;
}
}
@@ -430,21 +430,36 @@ static void rodex_delete_mail(struct map_session_data *sd, int64 mail_id)
nullpo_retv(msg);
msg->is_deleted = true;
- intif->rodex_updatemail(msg->id, 3);
+ intif->rodex_updatemail(sd, msg->id, 0, 3);
clif->rodex_delete_mail(sd, msg->opentype, msg->id);
}
+/// give requested zeny from message to player
+static void rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny)
+{
+ nullpo_retv(sd);
+ if (zeny <= 0) {
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
+ return;
+ }
+
+ if (pc->getzeny(sd, (int)zeny, LOG_TYPE_MAIL, NULL) != 0) {
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
+ return;
+ }
+
+ clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_SUCCESS);
+}
+
/// Gets attached zeny
/// @param sd : Who's getting
/// @param mail_id : Mail ID that we're getting zeny from
static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id)
{
- struct rodex_message *msg;
-
nullpo_retv(sd);
- msg = rodex->get_mail(sd, mail_id);
+ struct rodex_message *msg = rodex->get_mail(sd, mail_id);
if (msg == NULL) {
clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
@@ -456,16 +471,31 @@ static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mai
return;
}
- if (pc->getzeny(sd, (int)msg->zeny, LOG_TYPE_MAIL, NULL) != 0) {
- clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR);
- return;
- }
-
msg->type &= ~MAIL_TYPE_ZENY;
msg->zeny = 0;
- intif->rodex_updatemail(mail_id, 1);
+ intif->rodex_updatemail(sd, mail_id, opentype, 1);
+}
- clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_SUCCESS);
+// give requested items from message to player
+static void rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items)
+{
+ nullpo_retv(sd);
+ nullpo_retv(items);
+
+ for (int i = 0; i < count; ++i) {
+ const struct item *it = &items[i].item;
+
+ if (it->nameid == 0) {
+ continue;
+ }
+
+ if (pc->additem(sd, it, it->amount, LOG_TYPE_MAIL) != 0) {
+ clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR);
+ return;
+ }
+ }
+
+ clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEMS_SUCCESS);
}
/// Gets attached item
@@ -473,14 +503,12 @@ static void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mai
/// @param mail_id : Mail ID that we're getting items from
static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 mail_id)
{
- struct rodex_message *msg;
- int weight = 0;
- int empty_slots = 0, required_slots;
- int i;
-
nullpo_retv(sd);
- msg = rodex->get_mail(sd, mail_id);
+ int weight = 0;
+ int empty_slots = 0;
+
+ struct rodex_message *msg = rodex->get_mail(sd, mail_id);
if (msg == NULL) {
clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FATAL_ERROR);
@@ -492,7 +520,7 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- for (i = 0; i < RODEX_MAX_ITEM; ++i) {
+ for (int i = 0; i < RODEX_MAX_ITEM; ++i) {
if (msg->items[i].item.nameid != 0) {
weight += itemdb->search(msg->items[i].item.nameid)->weight * msg->items[i].item.amount;
}
@@ -503,8 +531,8 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- required_slots = msg->items_count;
- for (i = 0; i < sd->status.inventorySize; ++i) {
+ int required_slots = msg->items_count;
+ for (int i = 0; i < sd->status.inventorySize; ++i) {
if (sd->status.inventory[i].nameid == 0) {
empty_slots++;
} else if (itemdb->isstackable(sd->status.inventory[i].nameid) == 1) {
@@ -529,27 +557,9 @@ static void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 ma
return;
}
- for (i = 0; i < RODEX_MAX_ITEM; ++i) {
- struct item *it = &msg->items[i].item;
-
- if (it->nameid == 0) {
- continue;
- }
-
- if (pc->additem(sd, it, it->amount, LOG_TYPE_MAIL) != 0) {
- clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR);
- intif->rodex_updatemail(mail_id, 2);
- return;
- } else {
- memset(it, 0x0, sizeof(*it));
- }
- }
-
msg->type &= ~MAIL_TYPE_ITEM;
msg->items_count = 0;
- intif->rodex_updatemail(mail_id, 2);
-
- clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEMS_SUCCESS);
+ intif->rodex_updatemail(sd, mail_id, opentype, 2);
}
/// Cleans user's RoDEX related data
@@ -668,4 +678,6 @@ void rodex_defaults(void)
rodex->get_zeny = rodex_get_zeny;
rodex->get_items = rodex_get_items;
rodex->clean = rodex_clean;
+ rodex->getZenyAck = rodex_getZenyAck;
+ rodex->getItemsAck = rodex_getItemsAck;
}
diff --git a/src/map/rodex.h b/src/map/rodex.h
index ddf7cb32b..b6e7ca5b7 100644
--- a/src/map/rodex.h
+++ b/src/map/rodex.h
@@ -65,7 +65,7 @@ struct rodex_interface {
void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id);
void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount);
void (*remove_item) (struct map_session_data *sd, int16 idx, int16 amount);
- void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+ void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
int (*send_mail) (struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny);
void (*send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result);
struct rodex_message *(*get_mail) (struct map_session_data *sd, int64 mail_id);
@@ -74,6 +74,8 @@ struct rodex_interface {
void (*get_items) (struct map_session_data *sd, int8 opentype, int64 mail_id);
void (*delete_mail) (struct map_session_data *sd, int64 mail_id);
void (*clean) (struct map_session_data *sd, int8 flag);
+ void (*getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+ void (*getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
};
#ifdef HERCULES_CORE
diff --git a/src/map/script.c b/src/map/script.c
index 841e21169..b4a955f09 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4621,6 +4621,9 @@ static void run_script_main(struct script_state *st)
nullpo_retv(st);
script->attach_state(st);
+ if (st->state != END && Assert_chk(st->state == RUN || st->state == STOP || st->state == RERUNLINE)) {
+ st->state = END;
+ }
nd = map->id2nd(st->oid);
if( nd && nd->bl.m >= 0 )
@@ -7637,6 +7640,65 @@ static BUILDIN(countitem2)
}
/*==========================================
+ * countnameditem(item ID, { <Char Name / ID> })
+ * returns number of named items.
+ *------------------------------------------*/
+static BUILDIN(countnameditem)
+{
+ int count = 0;
+ struct item_data* id = NULL;
+ struct map_session_data *sd;
+
+ if (script_hasdata(st, 3)) {
+ if (script_isstringtype(st, 3)) {
+ // Character name was given
+ sd = script->nick2sd(st, script_getstr(st, 3));
+ } else {
+ // Character ID was given
+ sd = script->charid2sd(st, script_getnum(st, 3));
+ }
+ } else {
+ // Use RID by default if no name was provided
+ sd = script->rid2sd(st);
+ }
+
+ // Player not attached
+ if (sd == NULL) {
+ return true;
+ }
+
+ if (script_isstringtype(st, 2)) {
+ // Get item from DB via item name
+ id = itemdb->search_name(script_getstr(st, 2));
+ } else {
+ // Get item from DB via item ID
+ id = itemdb->exists(script_getnum(st, 2));
+ }
+
+ if (id == NULL) {
+ ShowError("buildin_countnameditem: Invalid item '%s'.\n", script_getstr(st, 2)); // returns string, regardless of what it was
+ script_pushint(st, 0);
+ return false;
+ }
+
+ for (int i = 0; i < MAX_INVENTORY; i++) {
+ if (sd->status.inventory[i].nameid > 0 &&
+ sd->inventory_data[i] != NULL &&
+ sd->status.inventory[i].amount > 0 &&
+ sd->status.inventory[i].nameid == id->nameid &&
+ sd->status.inventory[i].card[0] == CARD0_CREATE &&
+ sd->status.inventory[i].card[2] == sd->status.char_id &&
+ sd->status.inventory[i].card[3] == sd->status.char_id >> 16)
+ {
+ count += sd->status.inventory[i].amount;
+ }
+ }
+
+ script_pushint(st, count);
+ return true;
+}
+
+/*==========================================
* Check if item with this amount can fit in inventory
* Checking : weight, stack amount >32k, slots amount >(MAX_INVENTORY)
* Return
@@ -9658,7 +9720,7 @@ static BUILDIN(statusup2)
/*==========================================
* Returns the number of stat points needed to change the specified stat by val.
-* needed_status_point(<type>,<val>{,<char id>}); [secretdataz]
+* needed_status_point(<type>,<val>); [secretdataz]
*------------------------------------------*/
static BUILDIN(needed_status_point)
{
@@ -10542,24 +10604,36 @@ static BUILDIN(gettime)
return true;
}
-/*==========================================
+/*
* GetTimeStr("TimeFMT", Length);
- *------------------------------------------*/
+ */
static BUILDIN(gettimestr)
{
char *tmpstr;
const char *fmtstr;
int maxlen;
- time_t now = time(NULL);
+ time_t now;
- fmtstr=script_getstr(st,2);
- maxlen=script_getnum(st,3);
+ fmtstr = script_getstr(st, 2);
+ maxlen = script_getnum(st, 3);
- tmpstr=(char *)aMalloc((maxlen+1)*sizeof(char));
- strftime(tmpstr,maxlen,fmtstr,localtime(&now));
- tmpstr[maxlen]='\0';
+ if (script_hasdata(st, 4)) {
+ int timestamp = script_getnum(st, 4);
+ if (timestamp < 0) {
+ ShowWarning("buildin_gettimestr: UNIX timestamp must be in positive value.\n");
+ return false;
+ }
+
+ now = (time_t)timestamp;
+ } else {
+ now = time(NULL);
+ }
+
+ tmpstr = (char *)aMalloc((maxlen +1)*sizeof(char));
+ strftime(tmpstr, maxlen, fmtstr, localtime(&now));
+ tmpstr[maxlen] = '\0';
- script_pushstr(st,tmpstr);
+ script_pushstr(st, tmpstr);
return true;
}
@@ -10671,7 +10745,7 @@ static BUILDIN(makepet)
if (pet_id >= 0 && sd) {
sd->catch_target_class = pet->db[pet_id].class_;
intif->create_pet(sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv,
pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
100, 0, 1, pet->db[pet_id].jname);
}
@@ -11033,6 +11107,21 @@ static BUILDIN(killmonsterall)
return true;
}
+static BUILDIN(killmonstergid)
+{
+ int mobgid = script_getnum(st, 2);
+ struct mob_data *md = map->id2md(mobgid);
+
+ if (md == NULL) {
+ ShowWarning("buildin_killmonstergid: Error in finding monster GID '%d' or the target is not a monster.\n", mobgid);
+ return false;
+ }
+
+ md->state.npc_killmonster = 1;
+ status_kill(&md->bl);
+ return true;
+}
+
/*==========================================
* Creates a clone of a player.
* clone map, x, y, event, char_id, master_id, mode, flag, duration
@@ -11668,6 +11757,18 @@ static BUILDIN(playerattached)
}
/*==========================================
+ * Used by OnTouchNPC: label to return monster GID
+ *------------------------------------------*/
+static BUILDIN(mobattached)
+{
+ if (st->rid == 0 || map->id2md(st->rid) == NULL)
+ script_pushint(st, 0);
+ else
+ script_pushint(st, st->rid);
+ return true;
+}
+
+/*==========================================
*------------------------------------------*/
static BUILDIN(announce)
{
@@ -14731,47 +14832,55 @@ static BUILDIN(petloot)
* Set arrays with info of all sd inventory :
* @inventorylist_id, @inventorylist_amount, @inventorylist_equip,
* @inventorylist_refine, @inventorylist_identify, @inventorylist_attribute,
- * @inventorylist_card(0..3), @inventorylist_expire
+ * @inventorylist_card(0..3),
+ * @inventorylist_opt_id(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_opt_val(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_opt_param(0..MAX_ITEM_OPTIONS),
+ * @inventorylist_expire, @inventorylist_bound, @inventorylist_favorite,
+ * @inventorylist_idx
* @inventorylist_count = scalar
*------------------------------------------*/
static BUILDIN(getinventorylist)
{
struct map_session_data *sd = script->rid2sd(st);
- char card_var[SCRIPT_VARNAME_LENGTH];
+ char script_var[SCRIPT_VARNAME_LENGTH];
+ int j = 0, k = 0;
- int j=0,k;
- if(!sd) return true;
+ if (sd == NULL)
+ return true;
- for (int i = 0;i < sd->status.inventorySize; i++) {
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_id"), j),sd->status.inventory[i].nameid);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_amount"), j),sd->status.inventory[i].amount);
- if(sd->status.inventory[i].equip) {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_equip"), j),pc->equippoint(sd,i));
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) {
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_id"), j), sd->status.inventory[i].nameid);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_amount"), j), sd->status.inventory[i].amount);
+ if (sd->status.inventory[i].equip != 0) {
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_equip"), j), pc->equippoint(sd, i));
} else {
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_equip"), j),0);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_equip"), j), 0);
}
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_refine"), j),sd->status.inventory[i].refine);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_identify"), j),sd->status.inventory[i].identify);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_attribute"), j),sd->status.inventory[i].attribute);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_refine"), j), sd->status.inventory[i].refine);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_identify"), j), sd->status.inventory[i].identify);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_attribute"), j), sd->status.inventory[i].attribute);
for (k = 0; k < MAX_SLOTS; k++) {
- sprintf(card_var, "@inventorylist_card%d",k+1);
- pc->setreg(sd,reference_uid(script->add_variable(card_var), j),sd->status.inventory[i].card[k]);
+ sprintf(script_var, "@inventorylist_card%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].card[k]);
}
for (k = 0; k < MAX_ITEM_OPTIONS; k++) {
- sprintf(card_var, "@inventorylist_opt_id%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].index);
- sprintf(card_var, "@inventorylist_opt_val%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].value);
- sprintf(card_var, "@inventorylist_opt_param%d", k + 1);
- pc->setreg(sd, reference_uid(script->add_variable(card_var), j), sd->status.inventory[i].option[k].param);
+ sprintf(script_var, "@inventorylist_opt_id%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].index);
+ sprintf(script_var, "@inventorylist_opt_val%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].value);
+ sprintf(script_var, "@inventorylist_opt_param%d", k + 1);
+ pc->setreg(sd, reference_uid(script->add_variable(script_var), j), sd->status.inventory[i].option[k].param);
}
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_expire"), j),sd->status.inventory[i].expire_time);
- pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_bound"), j),sd->status.inventory[i].bound);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_expire"), j), sd->status.inventory[i].expire_time);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_bound"), j), sd->status.inventory[i].bound);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_favorite"), j), sd->status.inventory[i].favorite);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_idx"), j), i);
j++;
}
}
- pc->setreg(sd,script->add_variable("@inventorylist_count"),j);
+ pc->setreg(sd, script->add_variable("@inventorylist_count"), j);
return true;
}
@@ -15484,36 +15593,74 @@ static BUILDIN(recovery)
return true;
}
-/*==========================================
- * Get your pet info: getpetinfo(n)
- * n -> 0:pet_id 1:pet_class 2:pet_name
- * 3:friendly 4:hungry, 5: rename flag.
- *------------------------------------------*/
+/*
+ * Get your current pet information
+ */
static BUILDIN(getpetinfo)
{
struct map_session_data *sd = script->rid2sd(st);
- struct pet_data *pd;
- int type=script_getnum(st,2);
+ if (sd == NULL)
+ return true;
- if (sd == NULL || sd->pd == NULL) {
- if (type == 2)
- script_pushconststr(st,"null");
+ struct pet_data *pd = sd->pd;
+ int type = script_getnum(st, 2);
+ if (pd == NULL) {
+ if (type == PETINFO_NAME)
+ script_pushconststr(st, "null");
else
- script_pushint(st,0);
+ script_pushint(st, 0);
return true;
}
- pd = sd->pd;
+
switch(type) {
- case 0: script_pushint(st,pd->pet.pet_id); break;
- case 1: script_pushint(st,pd->pet.class_); break;
- case 2: script_pushstrcopy(st,pd->pet.name); break;
- case 3: script_pushint(st,pd->pet.intimate); break;
- case 4: script_pushint(st,pd->pet.hungry); break;
- case 5: script_pushint(st,pd->pet.rename_flag); break;
- default:
- script_pushint(st,0);
- break;
+ case PETINFO_ID:
+ script_pushint(st, pd->pet.pet_id);
+ break;
+ case PETINFO_CLASS:
+ script_pushint(st, pd->pet.class_);
+ break;
+ case PETINFO_NAME:
+ script_pushstrcopy(st, pd->pet.name);
+ break;
+ case PETINFO_INTIMACY:
+ script_pushint(st, pd->pet.intimate);
+ break;
+ case PETINFO_HUNGRY:
+ script_pushint(st, pd->pet.hungry);
+ break;
+ case PETINFO_RENAME:
+ script_pushint(st, pd->pet.rename_flag);
+ break;
+ case PETINFO_GID:
+ script_pushint(st, pd->bl.id);
+ break;
+ case PETINFO_EGGITEM:
+ script_pushint(st, pd->pet.egg_id);
+ break;
+ case PETINFO_FOODITEM:
+ script_pushint(st, pd->petDB->FoodID);
+ break;
+ case PETINFO_ACCESSORYITEM:
+ script_pushint(st, pd->petDB->AcceID);
+ break;
+ case PETINFO_ACCESSORYFLAG:
+ script_pushint(st, (pd->pet.equip != 0)? 1:0);
+ break;
+ case PETINFO_EVO_EGGID:
+ if (VECTOR_DATA(pd->petDB->evolve_data) != NULL)
+ script_pushint(st, VECTOR_DATA(pd->petDB->evolve_data)->petEggId);
+ else
+ script_pushint(st, 0);
+ break;
+ case PETINFO_AUTOFEED:
+ script_pushint(st, pd->pet.autofeed);
+ break;
+ default:
+ ShowWarning("buildin_getpetinfo: Invalid type %d.\n", type);
+ script_pushint(st, 0);
+ return false;
}
+
return true;
}
@@ -15551,20 +15698,15 @@ static BUILDIN(gethominfo)
return true;
}
-/// Retrieves information about character's mercenary
-/// getmercinfo <type>[,<char id>];
+/*
+ * Retrieves information about character's mercenary
+ * getmercinfo <type>{, <char id> };
+ */
static BUILDIN(getmercinfo)
{
- int type;
- struct map_session_data* sd;
- struct mercenary_data* md;
-
- type = script_getnum(st,2);
-
- if (script_hasdata(st,3)) {
- int char_id = script_getnum(st,3);
-
- if ((sd = script->charid2sd(st, char_id)) == NULL) {
+ struct map_session_data *sd;
+ if (script_hasdata(st, 3)) {
+ if ((sd = script->charid2sd(st, script_getnum(st, 3))) == NULL) {
script_pushnil(st);
return true;
}
@@ -15573,27 +15715,48 @@ static BUILDIN(getmercinfo)
return true;
}
- md = ( sd->status.mer_id && sd->md ) ? sd->md : NULL;
+ struct mercenary_data *md = (sd->status.mer_id && sd->md)? sd->md : NULL;
+ int type = script_getnum(st, 2);
+ if (md == NULL) {
+ if (type == MERCINFO_NAME)
+ script_pushconststr(st, "");
+ else
+ script_pushint(st, 0);
+ return true;
+ }
- switch( type )
- {
- case 0: script_pushint(st,md ? md->mercenary.mercenary_id : 0); break;
- case 1: script_pushint(st,md ? md->mercenary.class_ : 0); break;
- case 2:
- if( md )
- script_pushstrcopy(st,md->db->name);
- else
- script_pushconststr(st,"");
- break;
- case 3: script_pushint(st,md ? mercenary->get_faith(md) : 0); break;
- case 4: script_pushint(st,md ? mercenary->get_calls(md) : 0); break;
- case 5: script_pushint(st,md ? md->mercenary.kill_count : 0); break;
- case 6: script_pushint(st,md ? mercenary->get_lifetime(md) : 0); break;
- case 7: script_pushint(st,md ? md->db->lv : 0); break;
- default:
- ShowError("buildin_getmercinfo: Invalid type %d (char_id=%d).\n", type, sd->status.char_id);
- script_pushnil(st);
- return false;
+ switch (type) {
+ case MERCINFO_ID:
+ script_pushint(st, md->mercenary.mercenary_id);
+ break;
+ case MERCINFO_CLASS:
+ script_pushint(st, md->mercenary.class_);
+ break;
+ case MERCINFO_NAME:
+ script_pushstrcopy(st, md->db->name);
+ break;
+ case MERCINFO_FAITH:
+ script_pushint(st, mercenary->get_faith(md));
+ break;
+ case MERCINFO_CALLS:
+ script_pushint(st, mercenary->get_calls(md));
+ break;
+ case MERCINFO_KILLCOUNT:
+ script_pushint(st, md->mercenary.kill_count);
+ break;
+ case MERCINFO_LIFETIME:
+ script_pushint(st, mercenary->get_lifetime(md));
+ break;
+ case MERCINFO_LEVEL:
+ script_pushint(st, md->db->lv);
+ break;
+ case MERCINFO_GID:
+ script_pushint(st, md->bl.id);
+ break;
+ default:
+ ShowError("buildin_getmercinfo: Invalid type %d (char_id=%d).\n", type, sd->status.char_id);
+ script_pushnil(st);
+ return false;
}
return true;
@@ -18574,6 +18737,10 @@ static BUILDIN(getunittype)
* @param4 Value#2 Optional int value to be passed for certain data types.
* @param5 Value#3 Optional int value to be passed for certain data types.
* @return 1 on success, 0 on failure.
+
+ Note: Please make this script command only modify ONE INTEGER value.
+ If need to modify string type data, or having multiple arguments, please
+ introduce a new script command.
*/
static BUILDIN(setunitdata)
{
@@ -18599,7 +18766,7 @@ static BUILDIN(setunitdata)
return false;
}
- /* Mandatory Argument 3 */
+ /* Mandatory Argument 3. Subject to deprecate. */
if (type == UDT_MAPIDXY) {
if (!script_isstringtype(st, 4)) {
ShowError("buildin_setunitdata: Invalid data type for argument #3.\n");
@@ -18817,14 +18984,16 @@ static BUILDIN(setunitdata)
break;
case UDT_LEVEL:
md->level = val;
+ if (battle_config.show_mob_info & 4)
+ clif->blname_ack(0, &md->bl);
break;
case UDT_HP:
status->set_hp(bl, (unsigned int) val, STATUS_HEAL_DEFAULT);
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
break;
case UDT_MAXHP:
md->status.max_hp = (unsigned int) val;
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
break;
case UDT_SP:
status->set_sp(bl, (unsigned int) val, STATUS_HEAL_DEFAULT);
@@ -19691,6 +19860,10 @@ static BUILDIN(setunitdata)
* @param2 DataType Type of Data to be set for the unit.
* @param3 Variable array reference to store data into. (used for UDT_MAPIDXY)
* @return 0 on failure, <value> on success
+
+ Note: Please make this script command only return ONE INTEGER value.
+ If the unit data having multiple arguments, or need to return in array,
+ please introduce a new script command.
*/
static BUILDIN(getunitdata)
{
@@ -19705,7 +19878,7 @@ static BUILDIN(getunitdata)
if (bl == NULL) {
ShowWarning("buildin_getunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2));
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
@@ -19714,15 +19887,15 @@ static BUILDIN(getunitdata)
/* Type check */
if (type < UDT_TYPE || type >= UDT_MAX) {
ShowError("buildin_getunitdata: Invalid unit data type %d provided.\n", type);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
- /* Argument checks */
+ /* Argument checks. Subject to deprecate */
if (type == UDT_MAPIDXY) {
if (data == NULL || !data_isreference(data)) {
ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n");
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
@@ -19732,7 +19905,7 @@ static BUILDIN(getunitdata)
sd = script->rid2sd(st);
if (sd == NULL) {
ShowWarning("buildin_getunitdata: Player not attached! Cannot use player variable %s.\n",name);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return true;// no player attached
}
}
@@ -19802,7 +19975,7 @@ static BUILDIN(getunitdata)
case UDT_DMOTION: script_pushint(st, md->status.dmotion); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19859,7 +20032,7 @@ static BUILDIN(getunitdata)
case UDT_INTIMACY: script_pushint(st, hd->homunculus.intimacy); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Homunculus unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19916,7 +20089,7 @@ static BUILDIN(getunitdata)
case UDT_INTIMACY: script_pushint(st, pd->pet.intimate); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Pet unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -19972,7 +20145,7 @@ static BUILDIN(getunitdata)
case UDT_LIFETIME: script_pushint(st, mc->mercenary.life_time); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mercenary unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -20026,7 +20199,7 @@ static BUILDIN(getunitdata)
case UDT_MASTERCID: script_pushint(st, ed->elemental.char_id); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Elemental unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
@@ -20091,14 +20264,14 @@ static BUILDIN(getunitdata)
case UDT_BODY2: script_pushint(st, nd->vd.body_style); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
}
}
break;
default:
ShowError("buildin_getunitdata: Unknown object!\n");
- script_pushint(st, 0);
+ script_pushint(st, -1);
return false;
} // end of bl->type switch
@@ -20194,7 +20367,7 @@ static BUILDIN(setunitname)
}
script_pushint(st, 1);
- clif->charnameack(0, bl); // Send update to client.
+ clif->blname_ack(0, bl); // Send update to client.
return true;
}
@@ -21573,7 +21746,7 @@ static BUILDIN(bg_monster_set_team)
mob_stop_attack(md);
mob_stop_walking(md, STOPWALKING_FLAG_NONE);
md->target_id = md->attacked_id = 0;
- clif->charnameack(0, &md->bl);
+ clif->blname_ack(0, &md->bl);
return true;
}
@@ -23625,7 +23798,7 @@ static BUILDIN(bg_create_team)
if( strcmp(map_name,"-") != 0 ) {
map_index = script->mapindexname2id(st,map_name);
if( map_index == 0 ) { // Invalid Map
- script_pushint(st,0);
+ script_pushint(st, -1);
return true;
}
}
@@ -24113,9 +24286,9 @@ static BUILDIN(tradertype)
script->reportsrc(st);
}
#endif
-#if PACKETVER_ZERO_NUM < 20181226
+#if PACKETVER_MAIN_NUM < 20190116 && PACKETVER_RE_NUM < 20190116 && PACKETVER_ZERO_NUM < 20181226
if (type == NST_BARTER) {
- ShowWarning("buildin_tradertype: NST_BARTER is only available with PACKETVER_ZERO_NUM 20181226 or newer!\n");
+ ShowWarning("buildin_tradertype: NST_BARTER is only available with PACKETVER_ZERO_NUM 20181226 or PACKETVER_MAIN_NUM 20190116 or PACKETVER_RE_NUM 20190116 or newer!\n");
script->reportsrc(st);
}
#endif
@@ -24264,7 +24437,7 @@ static BUILDIN(showscript)
{
struct block_list *bl = NULL;
const char *msg = script_getstr(st, 2);
- int id = 0;
+ int id = 0, flag = AREA;
if (script_hasdata(st, 3)) {
id = script_getnum(st, 3);
@@ -24276,14 +24449,14 @@ static BUILDIN(showscript)
if (!bl) {
ShowError("buildin_showscript: Script not attached. (id=%d, rid=%d, oid=%d)\n", id, st->rid, st->oid);
- script_pushint(st, 0);
return false;
}
- clif->ShowScript(bl, msg);
-
- script_pushint(st, 1);
-
+ if (script_hasdata(st, 4))
+ if (script_getnum(st, 4) == SELF)
+ flag = SELF;
+
+ clif->ShowScript(bl, msg, flag);
return true;
}
@@ -24393,6 +24566,57 @@ static BUILDIN(getcalendartime)
return true;
}
+enum consolemes_type {
+ CONSOLEMES_DEBUG = 0,
+ CONSOLEMES_ERROR = 1,
+ CONSOLEMES_WARNING = 2,
+ CONSOLEMES_INFO = 3,
+ CONSOLEMES_STATUS = 4,
+ CONSOLEMES_NOTICE = 5,
+};
+
+/*==========================================
+* consolemes(<type>, "text")
+*------------------------------------------*/
+static BUILDIN(consolemes)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+ int type = script_hasdata(st, 2) ? script_getnum(st, 2) : 0;
+
+ if (!script->sprintf_helper(st, 3, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ switch (type) {
+ default:
+ case CONSOLEMES_DEBUG:
+ ShowDebug("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_ERROR:
+ ShowError("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_WARNING:
+ ShowWarning("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_INFO:
+ ShowInfo("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_STATUS:
+ ShowStatus("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_NOTICE:
+ ShowNotice("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ }
+
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
/** place holder for the translation macro **/
static BUILDIN(_)
{
@@ -25200,6 +25424,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(rand,"i?"),
BUILDIN_DEF(countitem,"v"),
BUILDIN_DEF(countitem2,"viiiiiii"),
+ BUILDIN_DEF(countnameditem,"v?"),
BUILDIN_DEF(checkweight,"vi*"),
BUILDIN_DEF(checkweight2,"rr"),
BUILDIN_DEF(readparam,"i?"),
@@ -25233,7 +25458,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(downrefitem,"i?"),
BUILDIN_DEF(statusup,"i"),
BUILDIN_DEF(statusup2,"ii"),
- BUILDIN_DEF(needed_status_point,"ii?"),
+ BUILDIN_DEF(needed_status_point, "ii"),
BUILDIN_DEF(bonus,"iv"),
BUILDIN_DEF2(bonus,"bonus2","ivi"),
BUILDIN_DEF2(bonus,"bonus3","ivii"),
@@ -25264,7 +25489,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(savepoint,"sii"),
BUILDIN_DEF(gettimetick,"i"),
BUILDIN_DEF(gettime,"i"),
- BUILDIN_DEF(gettimestr,"si"),
+ BUILDIN_DEF(gettimestr, "si?"),
BUILDIN_DEF(openstorage,""),
BUILDIN_DEF(guildopenstorage,""),
BUILDIN_DEF(itemskill,"vi?"),
@@ -25275,6 +25500,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(areamonster,"siiiisii???"),
BUILDIN_DEF(killmonster,"ss?"),
BUILDIN_DEF(killmonsterall,"s?"),
+ BUILDIN_DEF(killmonstergid, "i"),
BUILDIN_DEF(clone,"siisi????"),
BUILDIN_DEF(doevent,"s"),
BUILDIN_DEF(donpcevent,"s"),
@@ -25291,6 +25517,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(attachnpctimer,"?"), // attached the player id to the npc timer [Celest]
BUILDIN_DEF(detachnpctimer,"?"), // detached the player id from the npc timer [Celest]
BUILDIN_DEF(playerattached,""), // returns id of the current attached player. [Skotlex]
+ BUILDIN_DEF(mobattached, ""),
BUILDIN_DEF(announce,"si?????"),
BUILDIN_DEF(mapannounce,"ssi?????"),
BUILDIN_DEF(areaannounce,"siiiisi?????"),
@@ -25309,7 +25536,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(sc_end,"i?"),
BUILDIN_DEF(getstatus, "i?"),
BUILDIN_DEF(getscrate,"ii?"),
- BUILDIN_DEF(debugmes,"v*"),
+ BUILDIN_DEF_DEPRECATED(debugmes,"v*"),
+ BUILDIN_DEF(consolemes,"iv*"),
BUILDIN_DEF2(catchpet,"pet","i"),
BUILDIN_DEF2(birthpet,"bpet",""),
BUILDIN_DEF(resetlvl,"i"),
@@ -25482,7 +25710,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(getd,"s"),
BUILDIN_DEF(setd,"sv"),
// <--- [zBuffer] List of dynamic var commands
- BUILDIN_DEF(petstat,"i"),
+ BUILDIN_DEF_DEPRECATED(petstat, "i"), // Deprecated 2019-03-11
BUILDIN_DEF(callshop,"s?"), // [Skotlex]
BUILDIN_DEF(npcshopitem,"sii*"), // [Lance]
BUILDIN_DEF(npcshopadditem,"sii*"),
@@ -25706,7 +25934,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(channelmes, "ss"),
BUILDIN_DEF(addchannelhandler, "ss"),
BUILDIN_DEF(removechannelhandler, "ss"),
- BUILDIN_DEF(showscript, "s?"),
+ BUILDIN_DEF(showscript, "s??"),
BUILDIN_DEF(mergeitem,""),
BUILDIN_DEF(getcalendartime, "ii??"),
@@ -25780,8 +26008,11 @@ static void script_hardcoded_constants(void)
script->set_constant("MAX_BG_MEMBERS",MAX_BG_MEMBERS,false, false);
script->set_constant("MAX_CHAT_USERS",MAX_CHAT_USERS,false, false);
script->set_constant("MAX_REFINE",MAX_REFINE,false, false);
+ script->set_constant("MAX_ITEM_ID",MAX_ITEM_ID,false, false);
script->set_constant("MAX_MENU_OPTIONS", MAX_MENU_OPTIONS, false, false);
script->set_constant("MAX_MENU_LENGTH", MAX_MENU_LENGTH, false, false);
+ script->set_constant("MOB_CLONE_START", MOB_CLONE_START, false, false);
+ script->set_constant("MOB_CLONE_END", MOB_CLONE_END, false, false);
script->constdb_comment("status options");
script->set_constant("Option_Nothing",OPTION_NOTHING,false, false);
@@ -26033,6 +26264,14 @@ static void script_hardcoded_constants(void)
script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false);
script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false);
+ script->constdb_comment("consolemes options");
+ script->set_constant("CONSOLEMES_DEBUG", CONSOLEMES_DEBUG, false, false);
+ script->set_constant("CONSOLEMES_ERROR", CONSOLEMES_ERROR, false, false);
+ script->set_constant("CONSOLEMES_WARNING", CONSOLEMES_WARNING, false, false);
+ script->set_constant("CONSOLEMES_INFO", CONSOLEMES_INFO, false, false);
+ script->set_constant("CONSOLEMES_STATUS", CONSOLEMES_STATUS, false, false);
+ script->set_constant("CONSOLEMES_NOTICE", CONSOLEMES_NOTICE, false, false);
+
script->constdb_comment("set/getiteminfo options");
script->set_constant("ITEMINFO_BUYPRICE", ITEMINFO_BUYPRICE, false, false);
script->set_constant("ITEMINFO_SELLPRICE", ITEMINFO_SELLPRICE, false, false);
@@ -26053,6 +26292,32 @@ static void script_hardcoded_constants(void)
script->set_constant("ITEMINFO_VIEWSPRITE", ITEMINFO_VIEWSPRITE, false, false);
script->set_constant("ITEMINFO_TRADE", ITEMINFO_TRADE, false, false);
+ script->constdb_comment("getmercinfo options");
+ script->set_constant("MERCINFO_ID,", MERCINFO_ID, false, false);
+ script->set_constant("MERCINFO_CLASS", MERCINFO_CLASS, false, false);
+ script->set_constant("MERCINFO_NAME", MERCINFO_NAME, false, false);
+ script->set_constant("MERCINFO_FAITH", MERCINFO_FAITH, false, false);
+ script->set_constant("MERCINFO_CALLS", MERCINFO_CALLS, false, false);
+ script->set_constant("MERCINFO_KILLCOUNT", MERCINFO_KILLCOUNT, false, false);
+ script->set_constant("MERCINFO_LIFETIME", MERCINFO_LIFETIME, false, false);
+ script->set_constant("MERCINFO_LEVEL", MERCINFO_LEVEL, false, false);
+ script->set_constant("MERCINFO_GID", MERCINFO_GID, false, false);
+
+ script->constdb_comment("getpetinfo options");
+ script->set_constant("PETINFO_ID", PETINFO_ID, false, false);
+ script->set_constant("PETINFO_CLASS", PETINFO_CLASS, false, false);
+ script->set_constant("PETINFO_NAME", PETINFO_NAME, false, false);
+ script->set_constant("PETINFO_INTIMACY", PETINFO_INTIMACY, false, false);
+ script->set_constant("PETINFO_HUNGRY", PETINFO_HUNGRY, false, false);
+ script->set_constant("PETINFO_RENAME", PETINFO_RENAME, false, false);
+ script->set_constant("PETINFO_GID", PETINFO_GID, false, false);
+ script->set_constant("PETINFO_EGGITEM", PETINFO_EGGITEM, false, false);
+ script->set_constant("PETINFO_FOODITEM", PETINFO_FOODITEM, false, false);
+ script->set_constant("PETINFO_ACCESSORYITEM", PETINFO_ACCESSORYITEM, false, false);
+ script->set_constant("PETINFO_ACCESSORYFLAG", PETINFO_ACCESSORYFLAG, false, false);
+ script->set_constant("PETINFO_EVO_EGGID", PETINFO_EVO_EGGID, false, false);
+ script->set_constant("PETINFO_AUTOFEED", PETINFO_AUTOFEED, false, false);
+
script->constdb_comment("monster skill states");
script->set_constant("MSS_ANY", MSS_ANY, false, false);
script->set_constant("MSS_IDLE", MSS_IDLE, false, false);
diff --git a/src/map/script.h b/src/map/script.h
index 549ad3284..008da9c3c 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -461,6 +461,44 @@ enum script_iteminfo_types {
};
/**
+ * Mercenary Info types.
+ */
+enum script_mercinfo_types {
+ MERCINFO_ID = 0,
+ MERCINFO_CLASS,
+ MERCINFO_NAME,
+ MERCINFO_FAITH,
+ MERCINFO_CALLS,
+ MERCINFO_KILLCOUNT,
+ MERCINFO_LIFETIME,
+ MERCINFO_LEVEL,
+ MERCINFO_GID,
+
+ MERCINFO_MAX
+};
+
+/**
+ * Pet Info types.
+ */
+enum script_petinfo_types {
+ PETINFO_ID = 0,
+ PETINFO_CLASS,
+ PETINFO_NAME,
+ PETINFO_INTIMACY,
+ PETINFO_HUNGRY,
+ PETINFO_RENAME,
+ PETINFO_GID,
+ PETINFO_EGGITEM,
+ PETINFO_FOODITEM,
+ PETINFO_ACCESSORYITEM,
+ PETINFO_ACCESSORYFLAG,
+ PETINFO_EVO_EGGID,
+ PETINFO_AUTOFEED,
+
+ PETINFO_MAX
+};
+
+/**
* Player blocking actions related flags.
*/
enum pcblock_action_flag {
diff --git a/src/map/skill.c b/src/map/skill.c
index 069db55df..633a73d67 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2892,14 +2892,16 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
}
#endif /* MAGIC_REFLECTION_TYPE */
}
- if(sc && sc->data[SC_MAGICROD] && src == dsrc) {
- int sp = skill->get_sp(skill_id,skill_lv);
+ if (sc && sc->data[SC_MAGICROD] && src == dsrc) {
+ int sp = skill->get_sp(skill_id, skill_lv);
dmg.damage = dmg.damage2 = 0;
dmg.dmg_lv = ATK_MISS; //This will prevent skill additional effect from taking effect. [Skotlex]
sp = sp * sc->data[SC_MAGICROD]->val2 / 100;
- if(skill_id == WZ_WATERBALL && skill_lv > 1)
- sp = sp/((skill_lv|1)*(skill_lv|1)); //Estimate SP cost of a single water-ball
+ if (skill_id == WZ_WATERBALL && skill_lv > 1)
+ sp = sp / ((skill_lv | 1) * (skill_lv | 1)); //Estimate SP cost of a single water-ball
status->heal(bl, 0, sp, STATUS_HEAL_SHOWEFFECT);
+ if (battle->bc->magicrod_type == 1)
+ clif->skill_nodamage(bl, bl, SA_MAGICROD, sc->data[SC_MAGICROD]->val1, 1); // Animation used here in eAthena [Wolfie]
}
}
@@ -7881,8 +7883,9 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
}
break;
case SA_MAGICROD:
- clif->skill_nodamage(src,src,SA_MAGICROD,skill_lv,1);
- sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
+ if (battle->bc->magicrod_type == 0)
+ clif->skill_nodamage(src, src, SA_MAGICROD, skill_lv, 1); // Animation used here in official [Wolfie]
+ sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
break;
case SA_AUTOSPELL:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
diff --git a/src/map/status.c b/src/map/status.c
index 65b52cbcf..f06bb0330 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7426,6 +7426,9 @@ static int status_get_sc_def(struct block_list *src, struct block_list *bl, enum
case SC_NETHERWORLD:
tick = max(tick, 4000);
break;
+ case SC_SIREN:
+ tick = max(tick, 10000); // Minimum duration 10s
+ break;
default:
//Skills need to trigger even if the duration is reduced below 1ms
tick = max(tick, 1);
diff --git a/src/map/stylist.c b/src/map/stylist.c
new file mode 100644
index 000000000..7e7c13bf7
--- /dev/null
+++ b/src/map/stylist.c
@@ -0,0 +1,228 @@
+/**
+* This file is part of Hercules.
+* http://herc.ws - http://github.com/HerculesWS/Hercules
+*
+* Copyright (C) 2018-2019 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
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#define HERCULES_CORE
+
+#include "map/stylist.h"
+
+#include "common/conf.h"
+#include "common/db.h"
+#include "common/memmgr.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+
+#include "map/clif.h"
+#include "map/intif.h"
+#include "map/itemdb.h"
+#include "map/pc.h"
+#include "map/script.h"
+
+static struct stylist_interface stylist_s;
+struct stylist_interface *stylist;
+
+static bool stylist_read_db_libconfig(void)
+{
+ struct config_t stylist_conf;
+ struct config_setting_t *stylist_db = NULL, *it = NULL;
+ const char *config_filename = "db/stylist_db.conf"; // FIXME hardcoded name
+ int i = 0;
+
+ if (!libconfig->load_file(&stylist_conf, config_filename))
+ return false;
+
+ if ((stylist_db = libconfig->setting_get_member(stylist_conf.root, "stylist_db")) == NULL) {
+ ShowError("can't read %s\n", config_filename);
+ return false;
+ }
+
+ stylist->vector_clear();
+
+ while ((it = libconfig->setting_get_elem(stylist_db, i++))) {
+ stylist->read_db_libconfig_sub(it, i - 1, config_filename);
+ }
+
+ libconfig->destroy(&stylist_conf);
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename);
+ return true;
+}
+
+static bool stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source)
+{
+ struct stylist_data_entry entry = { 0 };
+ int i32 = 0, type = 0;
+ int64 i64 = 0;
+
+ nullpo_ret(it);
+ nullpo_ret(source);
+
+ if (!itemdb->lookup_const(it, "Type", &type) || type >= MAX_STYLIST_TYPE || type < 0) {
+ ShowWarning("stylist_read_db_libconfig_sub: Invalid or missing Type (%d) in \"%s\", entry #%d, skipping.\n", type, source, idx);
+ return false;
+ }
+ if (!itemdb->lookup_const(it, "Id", &i32) || i32 < 0) {
+ ShowWarning("stylist_read_db_libconfig_sub: Invalid or missing Id (%d) in \"%s\", entry #%d, skipping.\n", i32, source, idx);
+ return false;
+ }
+ entry.id = i32;
+
+ if (libconfig->setting_lookup_int64(it, "Zeny", &i64)) {
+ if (i64 > MAX_ZENY) {
+ ShowWarning("stylist_read_db_libconfig_sub: zeny is too big in \"%s\", entry #%d, capping to MAX_ZENY.\n", source, idx);
+ entry.zeny = MAX_ZENY;
+ } else {
+ entry.zeny = (int)i64;
+ }
+ }
+
+ if (itemdb->lookup_const(it, "ItemID", &i32))
+ entry.itemid = i32;
+
+ if (itemdb->lookup_const(it, "BoxItemID", &i32))
+ entry.boxid = i32;
+
+ if (libconfig->setting_lookup_bool(it, "AllowDoram", &i32))
+ entry.allow_doram = (i32 == 0) ? false : true;
+
+ VECTOR_ENSURE(stylist->data[type], 1, 1);
+ VECTOR_PUSH(stylist->data[type], entry);
+ return true;
+}
+
+static bool stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx)
+{
+ struct item it;
+ struct stylist_data_entry *entry;
+
+ nullpo_retr(false, sd);
+ Assert_retr(false, type >= 0 && type < MAX_STYLIST_TYPE);
+ Assert_retr(false, idx >= 0 && idx < VECTOR_LENGTH(stylist->data[type]));
+
+ entry = &VECTOR_INDEX(stylist->data[type], idx);
+
+ if (sd->status.class == JOB_SUMMONER && (entry->allow_doram == false))
+ return false;
+
+ if (entry->id >= 0) {
+ if (entry->zeny != 0) {
+ if (sd->status.zeny < entry->zeny)
+ return false;
+
+ sd->status.zeny -= entry->zeny;
+ clif->updatestatus(sd, SP_ZENY);
+ } else if (entry->itemid != 0) {
+ it.nameid = entry->itemid;
+ it.amount = 1;
+ return script->buildin_delitem_search(sd, &it, false);
+ } else if (entry->boxid != 0) {
+ it.nameid = entry->boxid;
+ it.amount = 1;
+ return script->buildin_delitem_search(sd, &it, false);
+ }
+ return true;
+ }
+ return false;
+}
+
+static void stylist_send_rodexitem(struct map_session_data *sd, int itemid)
+{
+ struct rodex_message msg = { 0 };
+
+ nullpo_retv(sd);
+
+ msg.receiver_id = sd->status.char_id;
+ msg.items[0].item.nameid = itemid;
+ msg.items[0].item.amount = 1;
+ msg.items[0].item.identify = 1;
+ msg.type = MAIL_TYPE_NPC | MAIL_TYPE_ITEM;
+
+ safestrncpy(msg.sender_name, msg_txt(366), NAME_LENGTH);
+ safestrncpy(msg.title, msg_txt(367), RODEX_TITLE_LENGTH);
+ safestrncpy(msg.body, msg_txt(368), MAIL_BODY_LENGTH);
+ msg.send_date = (int)time(NULL);
+ msg.expire_date = (int)time(NULL) + RODEX_EXPIRE;
+
+ intif->rodex_sendmail(&msg);
+}
+
+static void stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem)
+{
+ struct stylist_data_entry *entry;
+
+ nullpo_retv(sd);
+ Assert_retv(idx > 0);
+ Assert_retv(type >= 0 && type < MAX_STYLIST_TYPE);
+
+ if ((idx - 1) < VECTOR_LENGTH(stylist->data[type])) {
+ entry = &VECTOR_INDEX(stylist->data[type], idx - 1);
+ if (stylist->validate_requirements(sd, type, idx - 1)) {
+ if (isitem == false)
+ pc->changelook(sd, type, entry->id);
+ else
+ stylist->send_rodexitem(sd, entry->id);
+ }
+ }
+}
+
+static void stylist_vector_init(void)
+{
+ for (int i = 0; i < MAX_STYLIST_TYPE; i++)
+ VECTOR_INIT(stylist->data[i]);
+}
+static void stylist_vector_clear(void)
+{
+ for (int i = 0; i < MAX_STYLIST_TYPE; i++)
+ VECTOR_CLEAR(stylist->data[i]);
+}
+
+static void do_init_stylist(bool minimal)
+{
+ if (minimal)
+ return;
+
+ // Initialize the db
+ stylist->vector_init();
+
+ // Load the db
+ stylist->read_db_libconfig();
+}
+
+static void do_final_stylist(void)
+{
+ // Clear the db
+ stylist->vector_clear();
+}
+
+void stylist_defaults(void)
+{
+ stylist = &stylist_s;
+
+ /* core */
+ stylist->init = do_init_stylist;
+ stylist->final = do_final_stylist;
+ /* */
+ stylist->vector_init = stylist_vector_init;
+ stylist->vector_clear = stylist_vector_clear;
+ /* database */
+ stylist->read_db_libconfig = stylist_read_db_libconfig;
+ stylist->read_db_libconfig_sub = stylist_read_db_libconfig_sub;
+ /* */
+ stylist->request_style_change = stylist_request_style_change;
+ stylist->validate_requirements = stylist_validate_requirements;
+ stylist->send_rodexitem = stylist_send_rodexitem;
+}
diff --git a/src/map/stylist.h b/src/map/stylist.h
new file mode 100644
index 000000000..5bedfefc7
--- /dev/null
+++ b/src/map/stylist.h
@@ -0,0 +1,69 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2019 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef MAP_STYLIST_H
+#define MAP_STYLIST_H
+
+#include "common/hercules.h"
+#include "map/map.h" // LOOK_MAX
+
+struct map_session_data;
+
+/* Maximum available types for stylist */
+#ifndef MAX_STYLIST_TYPE
+#define MAX_STYLIST_TYPE LOOK_MAX
+#endif
+
+/* Stylist data [Asheraf/Hercules]*/
+struct stylist_data_entry {
+ int16 id;
+ int32 zeny;
+ int itemid;
+ int boxid;
+ bool allow_doram;
+};
+
+/**
+ * stylist.c Interface
+ **/
+struct stylist_interface {
+ VECTOR_DECL(struct stylist_data_entry) data[MAX_STYLIST_TYPE];
+
+ void (*init) (bool minimal);
+ void (*final) (void);
+
+ void (*vector_init) (void);
+ void (*vector_clear) (void);
+
+ bool (*read_db_libconfig) (void);
+ bool (*read_db_libconfig_sub) (struct config_setting_t *it, int idx, const char *source);
+
+ void (*request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ bool (*validate_requirements) (struct map_session_data *sd, int type, int16 idx);
+ void (*send_rodexitem) (struct map_session_data *sd, int itemid);
+
+};
+
+#ifdef HERCULES_CORE
+void stylist_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct stylist_interface *stylist; ///< Pointer to the stylist interface.
+
+#endif /* MAP_STYLIST_H */
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index aef09d7a7..f95a3a92d 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -110,6 +110,7 @@ PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers")
#include "map/skill.h"
#include "map/status.h"
#include "map/storage.h"
+#include "map/stylist.h"
#include "map/trade.h"
#include "map/unit.h"
#include "common/grfio.h"
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index cd28f9b0b..374a1bcc4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -552,8 +552,8 @@ typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc
typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name);
typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name);
typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name);
-typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex);
-typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex);
+typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2);
typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2);
typedef int (*HPMHOOK_pre_chr_count_users) (void);
@@ -562,6 +562,8 @@ typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charst
typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p);
typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd);
+typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd);
+typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd);
typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd);
typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd);
@@ -1376,8 +1378,8 @@ typedef void (*HPMHOOK_pre_clif_mvp_noitem) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_mvp_noitem) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_changed_dir) (struct block_list **bl, enum send_target *target);
typedef void (*HPMHOOK_post_clif_changed_dir) (struct block_list *bl, enum send_target target);
-typedef void (*HPMHOOK_pre_clif_charnameack) (int *fd, struct block_list **bl);
-typedef void (*HPMHOOK_post_clif_charnameack) (int fd, struct block_list *bl);
+typedef void (*HPMHOOK_pre_clif_blname_ack) (int *fd, struct block_list **bl);
+typedef void (*HPMHOOK_post_clif_blname_ack) (int fd, struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_monster_hp_bar) (struct mob_data **md, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_monster_hp_bar) (struct mob_data *md, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_clif_hpmeter) (struct map_session_data **sd);
@@ -1616,8 +1618,8 @@ typedef void (*HPMHOOK_pre_clif_wisall) (struct map_session_data **sd, int *type
typedef void (*HPMHOOK_post_clif_wisall) (struct map_session_data *sd, int type, int flag);
typedef void (*HPMHOOK_pre_clif_PMIgnoreList) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_PMIgnoreList) (struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message);
-typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message);
+typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message, enum send_target *target);
+typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message, enum send_target target);
typedef void (*HPMHOOK_pre_clif_traderequest) (struct map_session_data **sd, const char **name);
typedef void (*HPMHOOK_post_clif_traderequest) (struct map_session_data *sd, const char *name);
typedef void (*HPMHOOK_pre_clif_tradestart) (struct map_session_data **sd, uint8 *type);
@@ -2560,8 +2562,8 @@ typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_
typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name);
-typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name);
+typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id);
@@ -2618,24 +2620,12 @@ typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_ses
typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag);
typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag);
-typedef void (*HPMHOOK_pre_clif_stylist_vector_init) (void);
-typedef void (*HPMHOOK_post_clif_stylist_vector_init) (void);
-typedef void (*HPMHOOK_pre_clif_stylist_vector_clear) (void);
-typedef void (*HPMHOOK_post_clif_stylist_vector_clear) (void);
-typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig) (void);
-typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig) (bool retVal___);
-typedef bool (*HPMHOOK_pre_clif_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source);
-typedef bool (*HPMHOOK_post_clif_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
-typedef bool (*HPMHOOK_pre_clif_style_change_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx);
-typedef bool (*HPMHOOK_post_clif_style_change_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
-typedef void (*HPMHOOK_pre_clif_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid);
-typedef void (*HPMHOOK_post_clif_stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
-typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+typedef void (*HPMHOOK_pre_clif_pStyleClose) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pStyleClose) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag);
typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd);
@@ -2664,6 +2654,18 @@ typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_d
typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_pPing) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pPing) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_ping) (struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_ping) (struct map_session_data *sd);
+typedef int (*HPMHOOK_pre_clif_pingTimer) (int *tid, int64 *tick, int *id, intptr_t *data);
+typedef int (*HPMHOOK_post_clif_pingTimer) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+typedef int (*HPMHOOK_pre_clif_pingTimerSub) (struct map_session_data **sd, va_list ap);
+typedef int (*HPMHOOK_post_clif_pingTimerSub) (int retVal___, struct map_session_data *sd, va_list ap);
+typedef void (*HPMHOOK_pre_clif_pResetCooldown) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_pResetCooldown) (int fd, struct map_session_data *sd);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
@@ -2928,8 +2930,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2,
typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag);
typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online);
typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online);
-typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login);
-typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login);
+typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx);
typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx);
typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos);
@@ -3088,8 +3090,8 @@ typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill
typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id);
typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd);
-typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, short *class_);
-typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, short class_);
+typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_);
+typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_);
typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd);
typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd);
typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id);
@@ -3302,8 +3304,8 @@ typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct
typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd);
typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd);
typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd);
-typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len);
typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len);
typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id);
@@ -3496,8 +3498,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id);
typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id);
typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd);
-typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
-typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
+typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
+typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id);
typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id);
#endif // CHAR_INT_PET_H
@@ -3526,12 +3528,16 @@ typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, i
typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails);
typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id);
typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id);
-typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level);
-typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level);
+typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level);
+typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level);
typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg);
typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg);
-typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag);
-typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int64 mail_id, int8 flag);
+typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag);
+typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
+typedef int64 (*HPMHOOK_pre_inter_rodex_getzeny) (int64 *mail_id);
+typedef int64 (*HPMHOOK_post_inter_rodex_getzeny) (int64 retVal___, int64 mail_id);
+typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_item **items);
+typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items);
#endif // CHAR_INT_RODEX_H
#ifdef CHAR_INT_STORAGE_H /* inter_storage */
typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p);
@@ -3558,8 +3564,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___,
#ifdef MAP_INTIF_H /* intif */
typedef int (*HPMHOOK_pre_intif_parse) (int *fd);
typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd);
-typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
-typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
+typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
+typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type);
typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type);
typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY);
@@ -3608,8 +3614,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me
typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m);
typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id);
typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id);
typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len);
@@ -3698,12 +3704,16 @@ typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_
typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id);
typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (int64 *mail_id, int8 *flag);
-typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, int64 mail_id, int8 flag);
+typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag);
+typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg);
typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg);
typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name);
typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name);
+typedef void (*HPMHOOK_pre_intif_pGetZenyAck) (int *fd);
+typedef void (*HPMHOOK_post_intif_pGetZenyAck) (int fd);
+typedef void (*HPMHOOK_pre_intif_pGetItemsAck) (int *fd);
+typedef void (*HPMHOOK_post_intif_pGetItemsAck) (int fd);
typedef int (*HPMHOOK_pre_intif_clan_kickoffline) (int *clan_id, int *kick_interval);
typedef int (*HPMHOOK_post_intif_clan_kickoffline) (int retVal___, int clan_id, int kick_interval);
typedef int (*HPMHOOK_pre_intif_clan_membercount) (int *clan_id, int *kick_interval);
@@ -4878,8 +4888,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c
typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m);
typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes);
typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
-typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
-typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
+typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id);
typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id);
typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len);
@@ -5044,8 +5054,12 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece
typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result);
typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd);
typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd);
-typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name);
-typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name);
+typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
+typedef void (*HPMHOOK_pre_mapif_rodex_getzenyack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny);
+typedef void (*HPMHOOK_post_mapif_rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+typedef void (*HPMHOOK_pre_mapif_rodex_getitemsack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items);
+typedef void (*HPMHOOK_post_mapif_rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag);
typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag);
typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail);
@@ -5322,8 +5336,10 @@ typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t
typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data);
-typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, int *qty, struct item_data **data);
-typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
+typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options);
+typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options);
+typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
+typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item);
typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item);
typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -5388,6 +5404,14 @@ typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_ad
typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max);
typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust);
typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_option) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_option) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n);
+typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void);
+typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___);
typedef void (*HPMHOOK_pre_mob_readdb) (void);
typedef void (*HPMHOOK_post_mob_readdb) (void);
typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value);
@@ -5408,6 +5432,8 @@ typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, str
typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t);
typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t);
typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t);
+typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
+typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t);
typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t);
typedef void (*HPMHOOK_pre_mob_name_constants) (void);
@@ -5438,6 +5464,8 @@ typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData
typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index);
typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index);
+typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void);
+typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void);
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing);
typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing);
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n);
@@ -5612,8 +5640,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c
typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath);
typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid);
typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid);
-typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_);
-typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
+typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -5652,8 +5680,8 @@ typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 *
typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y);
typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname);
typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname);
-typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, short *class_);
-typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, short class_);
+typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_);
+typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_);
typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname);
typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname);
typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval);
@@ -6170,10 +6198,10 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item);
typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item);
-typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class);
-typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class);
-typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex);
-typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex);
+typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class);
+typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class);
+typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex);
+typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex);
typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class);
typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class);
typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val);
@@ -6414,8 +6442,8 @@ typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int
typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class);
typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id);
typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id);
-typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, short *pet_class, int *pet_id);
-typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, short pet_class, int pet_id);
+typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id);
+typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id);
typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd);
typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd);
@@ -6588,8 +6616,8 @@ typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16
typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount);
typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount);
typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount);
-typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class);
-typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class);
+typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny);
typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny);
typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result);
@@ -6606,6 +6634,10 @@ typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int
typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id);
typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag);
typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag);
+typedef void (*HPMHOOK_pre_rodex_getZenyAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny);
+typedef void (*HPMHOOK_post_rodex_getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+typedef void (*HPMHOOK_pre_rodex_getItemsAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items);
+typedef void (*HPMHOOK_post_rodex_getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
#endif // MAP_RODEX_H
#ifdef MAP_SCRIPT_H /* script */
typedef void (*HPMHOOK_pre_script_init) (bool *minimal);
@@ -7534,6 +7566,8 @@ typedef void (*HPMHOOK_pre_sockt_flush) (int *fd);
typedef void (*HPMHOOK_post_sockt_flush) (int fd);
typedef void (*HPMHOOK_pre_sockt_flush_fifos) (void);
typedef void (*HPMHOOK_post_sockt_flush_fifos) (void);
+typedef int (*HPMHOOK_pre_sockt_connect_client) (int *listen_fd);
+typedef int (*HPMHOOK_post_sockt_connect_client) (int retVal___, int listen_fd);
typedef void (*HPMHOOK_pre_sockt_set_nonblocking) (int *fd, unsigned long *yes);
typedef void (*HPMHOOK_post_sockt_set_nonblocking) (int fd, unsigned long yes);
typedef void (*HPMHOOK_pre_sockt_set_defaultparse) (ParseFunc *defaultparse);
@@ -7965,6 +7999,26 @@ typedef int (*HPMHOOK_post_strlib_strline_) (int retVal___, const char *str, siz
typedef bool (*HPMHOOK_pre_strlib_bin2hex_) (char **output, const unsigned char **input, size_t *count);
typedef bool (*HPMHOOK_post_strlib_bin2hex_) (bool retVal___, char *output, const unsigned char *input, size_t count);
#endif // COMMON_STRLIB_H
+#ifdef MAP_STYLIST_H /* stylist */
+typedef void (*HPMHOOK_pre_stylist_init) (bool *minimal);
+typedef void (*HPMHOOK_post_stylist_init) (bool minimal);
+typedef void (*HPMHOOK_pre_stylist_final) (void);
+typedef void (*HPMHOOK_post_stylist_final) (void);
+typedef void (*HPMHOOK_pre_stylist_vector_init) (void);
+typedef void (*HPMHOOK_post_stylist_vector_init) (void);
+typedef void (*HPMHOOK_pre_stylist_vector_clear) (void);
+typedef void (*HPMHOOK_post_stylist_vector_clear) (void);
+typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig) (void);
+typedef bool (*HPMHOOK_post_stylist_read_db_libconfig) (bool retVal___);
+typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source);
+typedef bool (*HPMHOOK_post_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
+typedef void (*HPMHOOK_pre_stylist_request_style_change) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+typedef void (*HPMHOOK_post_stylist_request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+typedef bool (*HPMHOOK_pre_stylist_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx);
+typedef bool (*HPMHOOK_post_stylist_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
+typedef void (*HPMHOOK_pre_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid);
+typedef void (*HPMHOOK_post_stylist_send_rodexitem) (struct map_session_data *sd, int itemid);
+#endif // MAP_STYLIST_H
#ifdef COMMON_STRLIB_H /* sv */
typedef int (*HPMHOOK_pre_sv_parse_next) (struct s_svstate **svstate);
typedef int (*HPMHOOK_post_sv_parse_next) (int retVal___, struct s_svstate *svstate);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 39fb82304..9302a8d19 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -92,6 +92,8 @@ struct {
struct HPMHookPoint *HP_chr_mmo_char_tobuf_post;
struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_pre;
struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_post;
struct HPMHookPoint *HP_chr_mmo_char_send_slots_info_pre;
@@ -762,6 +764,10 @@ struct {
struct HPMHookPoint *HP_inter_rodex_savemessage_post;
struct HPMHookPoint *HP_inter_rodex_updatemail_pre;
struct HPMHookPoint *HP_inter_rodex_updatemail_post;
+ struct HPMHookPoint *HP_inter_rodex_getzeny_pre;
+ struct HPMHookPoint *HP_inter_rodex_getzeny_post;
+ struct HPMHookPoint *HP_inter_rodex_getitems_pre;
+ struct HPMHookPoint *HP_inter_rodex_getitems_post;
struct HPMHookPoint *HP_inter_storage_tosql_pre;
struct HPMHookPoint *HP_inter_storage_tosql_post;
struct HPMHookPoint *HP_inter_storage_fromsql_pre;
@@ -1222,6 +1228,10 @@ struct {
struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post;
struct HPMHookPoint *HP_mapif_rodex_checkname_pre;
struct HPMHookPoint *HP_mapif_rodex_checkname_post;
+ struct HPMHookPoint *HP_mapif_rodex_getzenyack_pre;
+ struct HPMHookPoint *HP_mapif_rodex_getzenyack_post;
+ struct HPMHookPoint *HP_mapif_rodex_getitemsack_pre;
+ struct HPMHookPoint *HP_mapif_rodex_getitemsack_post;
struct HPMHookPoint *HP_mapif_load_guild_storage_pre;
struct HPMHookPoint *HP_mapif_load_guild_storage_post;
struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre;
@@ -1420,6 +1430,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -1727,6 +1739,8 @@ struct {
int HP_chr_mmo_char_tobuf_post;
int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre;
int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre;
+ int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post;
int HP_chr_mmo_char_send_ban_list_pre;
int HP_chr_mmo_char_send_ban_list_post;
int HP_chr_mmo_char_send_slots_info_pre;
@@ -2397,6 +2411,10 @@ struct {
int HP_inter_rodex_savemessage_post;
int HP_inter_rodex_updatemail_pre;
int HP_inter_rodex_updatemail_post;
+ int HP_inter_rodex_getzeny_pre;
+ int HP_inter_rodex_getzeny_post;
+ int HP_inter_rodex_getitems_pre;
+ int HP_inter_rodex_getitems_post;
int HP_inter_storage_tosql_pre;
int HP_inter_storage_tosql_post;
int HP_inter_storage_fromsql_pre;
@@ -2857,6 +2875,10 @@ struct {
int HP_mapif_parse_rodex_checkname_post;
int HP_mapif_rodex_checkname_pre;
int HP_mapif_rodex_checkname_post;
+ int HP_mapif_rodex_getzenyack_pre;
+ int HP_mapif_rodex_getzenyack_post;
+ int HP_mapif_rodex_getitemsack_pre;
+ int HP_mapif_rodex_getitemsack_post;
int HP_mapif_load_guild_storage_pre;
int HP_mapif_load_guild_storage_post;
int HP_mapif_save_guild_storage_ack_pre;
@@ -3055,6 +3077,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 7813f5bac..60162c1a8 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -61,6 +61,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->count_users, HP_chr_count_users) },
{ HP_POP(chr->mmo_char_tobuf, HP_chr_mmo_char_tobuf) },
{ HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE) },
+ { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE_tail, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) },
{ HP_POP(chr->mmo_char_send_ban_list, HP_chr_mmo_char_send_ban_list) },
{ HP_POP(chr->mmo_char_send_slots_info, HP_chr_mmo_char_send_slots_info) },
{ HP_POP(chr->mmo_char_send_characters, HP_chr_mmo_char_send_characters) },
@@ -415,6 +416,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) },
{ HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) },
{ HP_POP(inter_rodex->updatemail, HP_inter_rodex_updatemail) },
+ { HP_POP(inter_rodex->getzeny, HP_inter_rodex_getzeny) },
+ { HP_POP(inter_rodex->getitems, HP_inter_rodex_getitems) },
/* inter_storage_interface */
{ HP_POP(inter_storage->tosql, HP_inter_storage_tosql) },
{ HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) },
@@ -649,6 +652,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->rodex_send, HP_mapif_rodex_send) },
{ HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) },
{ HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) },
+ { HP_POP(mapif->rodex_getzenyack, HP_mapif_rodex_getzenyack) },
+ { HP_POP(mapif->rodex_getitemsack, HP_mapif_rodex_getitemsack) },
{ HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) },
{ HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) },
{ HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) },
@@ -757,6 +762,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index e177462e9..2b7e25e5d 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -798,11 +798,11 @@ int HP_chr_check_char_name(const char *name, const char *esc_name) {
}
return retVal___;
}
-int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex) {
+int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) {
- int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex);
+ int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func;
@@ -817,7 +817,7 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in
retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex);
}
if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) {
- int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex);
+ int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex);
for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex);
@@ -932,6 +932,32 @@ void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd)
}
return;
}
+void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre > 0) {
+ void (*preHookFunc) (int *fd, struct char_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd);
+ }
+ if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post > 0) {
+ void (*postHookFunc) (int fd, struct char_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre > 0) {
@@ -7005,11 +7031,11 @@ bool HP_inter_guild_leave(int guild_id, int account_id, int char_id, int flag, c
}
return retVal___;
}
-bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_guild_update_member_info_short_pre > 0) {
- bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_pre[hIndex].func;
@@ -7024,7 +7050,7 @@ bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int c
retVal___ = HPMHooks.source.inter_guild.update_member_info_short(guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_inter_guild_update_member_info_short_post > 0) {
- bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class);
@@ -9472,11 +9498,11 @@ int HP_inter_pet_parse_frommap(int fd) {
}
return retVal___;
}
-struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) {
+struct s_pet* HP_inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) {
int hIndex = 0;
struct s_pet* retVal___ = NULL;
if (HPMHooks.count.HP_inter_pet_create_pre > 0) {
- struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
+ struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func;
@@ -9491,7 +9517,7 @@ struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class,
retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if (HPMHooks.count.HP_inter_pet_create_post > 0) {
- struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
+ struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
@@ -9824,11 +9850,11 @@ bool HP_inter_rodex_hasnew(int char_id, int account_id) {
}
return retVal___;
}
-bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) {
+bool HP_inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) {
- bool (*preHookFunc) (const char **name, int **target_char_id, short **target_class, int **target_level);
+ bool (*preHookFunc) (const char **name, int **target_char_id, int **target_class, int **target_level);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func;
@@ -9843,7 +9869,7 @@ bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *targ
retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level);
}
if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) {
- bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level);
+ bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func;
retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level);
@@ -9878,15 +9904,15 @@ int64 HP_inter_rodex_savemessage(struct rodex_message *msg) {
}
return retVal___;
}
-bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) {
+bool HP_inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_inter_rodex_updatemail_pre > 0) {
- bool (*preHookFunc) (int64 *mail_id, int8 *flag);
+ bool (*preHookFunc) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_pre[hIndex].func;
- retVal___ = preHookFunc(&mail_id, &flag);
+ retVal___ = preHookFunc(&fd, &account_id, &char_id, &mail_id, &opentype, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -9894,13 +9920,67 @@ bool HP_inter_rodex_updatemail(int64 mail_id, int8 flag) {
}
}
{
- retVal___ = HPMHooks.source.inter_rodex.updatemail(mail_id, flag);
+ retVal___ = HPMHooks.source.inter_rodex.updatemail(fd, account_id, char_id, mail_id, opentype, flag);
}
if (HPMHooks.count.HP_inter_rodex_updatemail_post > 0) {
- bool (*postHookFunc) (bool retVal___, int64 mail_id, int8 flag);
+ bool (*postHookFunc) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mail_id, flag);
+ retVal___ = postHookFunc(retVal___, fd, account_id, char_id, mail_id, opentype, flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_inter_rodex_getzeny(int64 mail_id) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if (HPMHooks.count.HP_inter_rodex_getzeny_pre > 0) {
+ int64 (*preHookFunc) (int64 *mail_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_pre[hIndex].func;
+ retVal___ = preHookFunc(&mail_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_rodex.getzeny(mail_id);
+ }
+ if (HPMHooks.count.HP_inter_rodex_getzeny_post > 0) {
+ int64 (*postHookFunc) (int64 retVal___, int64 mail_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_inter_rodex_getitems_pre > 0) {
+ int (*preHookFunc) (int64 *mail_id, struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_inter_rodex_getitems_pre[hIndex].func;
+ retVal___ = preHookFunc(&mail_id, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter_rodex.getitems(mail_id, items);
+ }
+ if (HPMHooks.count.HP_inter_rodex_getitems_post > 0) {
+ int (*postHookFunc) (int retVal___, int64 mail_id, struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_inter_rodex_getitems_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mail_id, items);
}
}
return retVal___;
@@ -13796,11 +13876,11 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id,
}
return retVal___;
}
-int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre > 0) {
- int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func;
@@ -13815,7 +13895,7 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_
retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) {
- int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class);
@@ -15995,10 +16075,10 @@ void HP_mapif_parse_rodex_checkname(int fd) {
}
return;
}
-void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) {
+void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) {
int hIndex = 0;
if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) {
- void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name);
+ void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func;
@@ -16013,7 +16093,7 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short
HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name);
}
if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) {
- void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name);
+ void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func;
postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name);
@@ -16021,6 +16101,58 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short
}
return;
}
+void HP_mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_rodex_getzenyack_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_pre[hIndex].func;
+ preHookFunc(&fd, &char_id, &mail_id, &opentype, &zeny);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.rodex_getzenyack(fd, char_id, mail_id, opentype, zeny);
+ }
+ if (HPMHooks.count.HP_mapif_rodex_getzenyack_post > 0) {
+ void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_post[hIndex].func;
+ postHookFunc(fd, char_id, mail_id, opentype, zeny);
+ }
+ }
+ return;
+}
+void HP_mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mapif_rodex_getitemsack_pre > 0) {
+ void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_pre[hIndex].func;
+ preHookFunc(&fd, &char_id, &mail_id, &opentype, &count, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapif.rodex_getitemsack(fd, char_id, mail_id, opentype, count, items);
+ }
+ if (HPMHooks.count.HP_mapif_rodex_getitemsack_post > 0) {
+ void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_post[hIndex].func;
+ postHookFunc(fd, char_id, mail_id, opentype, count, items);
+ }
+ }
+ return;
+}
int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) {
int hIndex = 0;
int retVal___ = 0;
@@ -18660,6 +18792,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 7293e8fc4..ba0fe05c2 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -584,6 +584,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -1383,6 +1385,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 825e049b1..1e3548621 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -326,6 +326,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 044ee2df2..080fb75ff 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -7495,6 +7495,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index aa4efd5c3..d3b4ff504 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -968,8 +968,8 @@ struct {
struct HPMHookPoint *HP_clif_mvp_noitem_post;
struct HPMHookPoint *HP_clif_changed_dir_pre;
struct HPMHookPoint *HP_clif_changed_dir_post;
- struct HPMHookPoint *HP_clif_charnameack_pre;
- struct HPMHookPoint *HP_clif_charnameack_post;
+ struct HPMHookPoint *HP_clif_blname_ack_pre;
+ struct HPMHookPoint *HP_clif_blname_ack_post;
struct HPMHookPoint *HP_clif_monster_hp_bar_pre;
struct HPMHookPoint *HP_clif_monster_hp_bar_post;
struct HPMHookPoint *HP_clif_hpmeter_pre;
@@ -2210,24 +2210,12 @@ struct {
struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post;
struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre;
struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post;
- struct HPMHookPoint *HP_clif_stylist_vector_init_pre;
- struct HPMHookPoint *HP_clif_stylist_vector_init_post;
- struct HPMHookPoint *HP_clif_stylist_vector_clear_pre;
- struct HPMHookPoint *HP_clif_stylist_vector_clear_post;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_pre;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_post;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_pre;
- struct HPMHookPoint *HP_clif_stylist_read_db_libconfig_sub_post;
- struct HPMHookPoint *HP_clif_style_change_validate_requirements_pre;
- struct HPMHookPoint *HP_clif_style_change_validate_requirements_post;
- struct HPMHookPoint *HP_clif_stylist_send_rodexitem_pre;
- struct HPMHookPoint *HP_clif_stylist_send_rodexitem_post;
struct HPMHookPoint *HP_clif_pReqStyleChange_pre;
struct HPMHookPoint *HP_clif_pReqStyleChange_post;
struct HPMHookPoint *HP_clif_pReqStyleChange2_pre;
struct HPMHookPoint *HP_clif_pReqStyleChange2_post;
- struct HPMHookPoint *HP_clif_cz_req_style_change_sub_pre;
- struct HPMHookPoint *HP_clif_cz_req_style_change_sub_post;
+ struct HPMHookPoint *HP_clif_pStyleClose_pre;
+ struct HPMHookPoint *HP_clif_pStyleClose_post;
struct HPMHookPoint *HP_clif_style_change_response_pre;
struct HPMHookPoint *HP_clif_style_change_response_post;
struct HPMHookPoint *HP_clif_pPetEvolution_pre;
@@ -2256,6 +2244,18 @@ struct {
struct HPMHookPoint *HP_clif_pNPCBarterClosed_post;
struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre;
struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post;
+ struct HPMHookPoint *HP_clif_pClientVersion_pre;
+ struct HPMHookPoint *HP_clif_pClientVersion_post;
+ struct HPMHookPoint *HP_clif_pPing_pre;
+ struct HPMHookPoint *HP_clif_pPing_post;
+ struct HPMHookPoint *HP_clif_ping_pre;
+ struct HPMHookPoint *HP_clif_ping_post;
+ struct HPMHookPoint *HP_clif_pingTimer_pre;
+ struct HPMHookPoint *HP_clif_pingTimer_post;
+ struct HPMHookPoint *HP_clif_pingTimerSub_pre;
+ struct HPMHookPoint *HP_clif_pingTimerSub_post;
+ struct HPMHookPoint *HP_clif_pResetCooldown_pre;
+ struct HPMHookPoint *HP_clif_pResetCooldown_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -2900,6 +2900,10 @@ struct {
struct HPMHookPoint *HP_intif_rodex_sendmail_post;
struct HPMHookPoint *HP_intif_rodex_checkname_pre;
struct HPMHookPoint *HP_intif_rodex_checkname_post;
+ struct HPMHookPoint *HP_intif_pGetZenyAck_pre;
+ struct HPMHookPoint *HP_intif_pGetZenyAck_post;
+ struct HPMHookPoint *HP_intif_pGetItemsAck_pre;
+ struct HPMHookPoint *HP_intif_pGetItemsAck_post;
struct HPMHookPoint *HP_intif_clan_kickoffline_pre;
struct HPMHookPoint *HP_intif_clan_kickoffline_post;
struct HPMHookPoint *HP_intif_clan_membercount_pre;
@@ -3900,6 +3904,8 @@ struct {
struct HPMHookPoint *HP_mob_ai_lazy_post;
struct HPMHookPoint *HP_mob_ai_hard_pre;
struct HPMHookPoint *HP_mob_ai_hard_post;
+ struct HPMHookPoint *HP_mob_setdropitem_options_pre;
+ struct HPMHookPoint *HP_mob_setdropitem_options_post;
struct HPMHookPoint *HP_mob_setdropitem_pre;
struct HPMHookPoint *HP_mob_setdropitem_post;
struct HPMHookPoint *HP_mob_setlootitem_pre;
@@ -3966,6 +3972,14 @@ struct {
struct HPMHookPoint *HP_mob_drop_adjust_post;
struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre;
struct HPMHookPoint *HP_mob_item_dropratio_adjust_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_option_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_option_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_optslot_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_group_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_group_post;
+ struct HPMHookPoint *HP_mob_read_optdrops_db_pre;
+ struct HPMHookPoint *HP_mob_read_optdrops_db_post;
struct HPMHookPoint *HP_mob_readdb_pre;
struct HPMHookPoint *HP_mob_readdb_post;
struct HPMHookPoint *HP_mob_lookup_const_pre;
@@ -3986,6 +4000,8 @@ struct {
struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post;
struct HPMHookPoint *HP_mob_read_db_mode_sub_pre;
struct HPMHookPoint *HP_mob_read_db_mode_sub_post;
+ struct HPMHookPoint *HP_mob_read_db_drops_option_pre;
+ struct HPMHookPoint *HP_mob_read_db_drops_option_post;
struct HPMHookPoint *HP_mob_read_db_stats_sub_pre;
struct HPMHookPoint *HP_mob_read_db_stats_sub_post;
struct HPMHookPoint *HP_mob_name_constants_pre;
@@ -4016,6 +4032,8 @@ struct {
struct HPMHookPoint *HP_mob_final_ratio_sub_post;
struct HPMHookPoint *HP_mob_destroy_mob_db_pre;
struct HPMHookPoint *HP_mob_destroy_mob_db_post;
+ struct HPMHookPoint *HP_mob_destroy_drop_groups_pre;
+ struct HPMHookPoint *HP_mob_destroy_drop_groups_post;
struct HPMHookPoint *HP_mob_skill_db_libconfig_pre;
struct HPMHookPoint *HP_mob_skill_db_libconfig_post;
struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre;
@@ -5122,6 +5140,10 @@ struct {
struct HPMHookPoint *HP_rodex_delete_mail_post;
struct HPMHookPoint *HP_rodex_clean_pre;
struct HPMHookPoint *HP_rodex_clean_post;
+ struct HPMHookPoint *HP_rodex_getZenyAck_pre;
+ struct HPMHookPoint *HP_rodex_getZenyAck_post;
+ struct HPMHookPoint *HP_rodex_getItemsAck_pre;
+ struct HPMHookPoint *HP_rodex_getItemsAck_post;
struct HPMHookPoint *HP_script_init_pre;
struct HPMHookPoint *HP_script_init_post;
struct HPMHookPoint *HP_script_final_pre;
@@ -6040,6 +6062,8 @@ struct {
struct HPMHookPoint *HP_sockt_flush_post;
struct HPMHookPoint *HP_sockt_flush_fifos_pre;
struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_connect_client_pre;
+ struct HPMHookPoint *HP_sockt_connect_client_post;
struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
struct HPMHookPoint *HP_sockt_set_nonblocking_post;
struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
@@ -6460,6 +6484,24 @@ struct {
struct HPMHookPoint *HP_strlib_strline__post;
struct HPMHookPoint *HP_strlib_bin2hex__pre;
struct HPMHookPoint *HP_strlib_bin2hex__post;
+ struct HPMHookPoint *HP_stylist_init_pre;
+ struct HPMHookPoint *HP_stylist_init_post;
+ struct HPMHookPoint *HP_stylist_final_pre;
+ struct HPMHookPoint *HP_stylist_final_post;
+ struct HPMHookPoint *HP_stylist_vector_init_pre;
+ struct HPMHookPoint *HP_stylist_vector_init_post;
+ struct HPMHookPoint *HP_stylist_vector_clear_pre;
+ struct HPMHookPoint *HP_stylist_vector_clear_post;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_pre;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_post;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_pre;
+ struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_post;
+ struct HPMHookPoint *HP_stylist_request_style_change_pre;
+ struct HPMHookPoint *HP_stylist_request_style_change_post;
+ struct HPMHookPoint *HP_stylist_validate_requirements_pre;
+ struct HPMHookPoint *HP_stylist_validate_requirements_post;
+ struct HPMHookPoint *HP_stylist_send_rodexitem_pre;
+ struct HPMHookPoint *HP_stylist_send_rodexitem_post;
struct HPMHookPoint *HP_sv_parse_next_pre;
struct HPMHookPoint *HP_sv_parse_next_post;
struct HPMHookPoint *HP_sv_parse_pre;
@@ -7635,8 +7677,8 @@ struct {
int HP_clif_mvp_noitem_post;
int HP_clif_changed_dir_pre;
int HP_clif_changed_dir_post;
- int HP_clif_charnameack_pre;
- int HP_clif_charnameack_post;
+ int HP_clif_blname_ack_pre;
+ int HP_clif_blname_ack_post;
int HP_clif_monster_hp_bar_pre;
int HP_clif_monster_hp_bar_post;
int HP_clif_hpmeter_pre;
@@ -8877,24 +8919,12 @@ struct {
int HP_clif_pPrivateAirshipRequest_post;
int HP_clif_PrivateAirshipResponse_pre;
int HP_clif_PrivateAirshipResponse_post;
- int HP_clif_stylist_vector_init_pre;
- int HP_clif_stylist_vector_init_post;
- int HP_clif_stylist_vector_clear_pre;
- int HP_clif_stylist_vector_clear_post;
- int HP_clif_stylist_read_db_libconfig_pre;
- int HP_clif_stylist_read_db_libconfig_post;
- int HP_clif_stylist_read_db_libconfig_sub_pre;
- int HP_clif_stylist_read_db_libconfig_sub_post;
- int HP_clif_style_change_validate_requirements_pre;
- int HP_clif_style_change_validate_requirements_post;
- int HP_clif_stylist_send_rodexitem_pre;
- int HP_clif_stylist_send_rodexitem_post;
int HP_clif_pReqStyleChange_pre;
int HP_clif_pReqStyleChange_post;
int HP_clif_pReqStyleChange2_pre;
int HP_clif_pReqStyleChange2_post;
- int HP_clif_cz_req_style_change_sub_pre;
- int HP_clif_cz_req_style_change_sub_post;
+ int HP_clif_pStyleClose_pre;
+ int HP_clif_pStyleClose_post;
int HP_clif_style_change_response_pre;
int HP_clif_style_change_response_post;
int HP_clif_pPetEvolution_pre;
@@ -8923,6 +8953,18 @@ struct {
int HP_clif_pNPCBarterClosed_post;
int HP_clif_pNPCBarterPurchase_pre;
int HP_clif_pNPCBarterPurchase_post;
+ int HP_clif_pClientVersion_pre;
+ int HP_clif_pClientVersion_post;
+ int HP_clif_pPing_pre;
+ int HP_clif_pPing_post;
+ int HP_clif_ping_pre;
+ int HP_clif_ping_post;
+ int HP_clif_pingTimer_pre;
+ int HP_clif_pingTimer_post;
+ int HP_clif_pingTimerSub_pre;
+ int HP_clif_pingTimerSub_post;
+ int HP_clif_pResetCooldown_pre;
+ int HP_clif_pResetCooldown_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -9567,6 +9609,10 @@ struct {
int HP_intif_rodex_sendmail_post;
int HP_intif_rodex_checkname_pre;
int HP_intif_rodex_checkname_post;
+ int HP_intif_pGetZenyAck_pre;
+ int HP_intif_pGetZenyAck_post;
+ int HP_intif_pGetItemsAck_pre;
+ int HP_intif_pGetItemsAck_post;
int HP_intif_clan_kickoffline_pre;
int HP_intif_clan_kickoffline_post;
int HP_intif_clan_membercount_pre;
@@ -10567,6 +10613,8 @@ struct {
int HP_mob_ai_lazy_post;
int HP_mob_ai_hard_pre;
int HP_mob_ai_hard_post;
+ int HP_mob_setdropitem_options_pre;
+ int HP_mob_setdropitem_options_post;
int HP_mob_setdropitem_pre;
int HP_mob_setdropitem_post;
int HP_mob_setlootitem_pre;
@@ -10633,6 +10681,14 @@ struct {
int HP_mob_drop_adjust_post;
int HP_mob_item_dropratio_adjust_pre;
int HP_mob_item_dropratio_adjust_post;
+ int HP_mob_read_optdrops_option_pre;
+ int HP_mob_read_optdrops_option_post;
+ int HP_mob_read_optdrops_optslot_pre;
+ int HP_mob_read_optdrops_optslot_post;
+ int HP_mob_read_optdrops_group_pre;
+ int HP_mob_read_optdrops_group_post;
+ int HP_mob_read_optdrops_db_pre;
+ int HP_mob_read_optdrops_db_post;
int HP_mob_readdb_pre;
int HP_mob_readdb_post;
int HP_mob_lookup_const_pre;
@@ -10653,6 +10709,8 @@ struct {
int HP_mob_read_db_mvpdrops_sub_post;
int HP_mob_read_db_mode_sub_pre;
int HP_mob_read_db_mode_sub_post;
+ int HP_mob_read_db_drops_option_pre;
+ int HP_mob_read_db_drops_option_post;
int HP_mob_read_db_stats_sub_pre;
int HP_mob_read_db_stats_sub_post;
int HP_mob_name_constants_pre;
@@ -10683,6 +10741,8 @@ struct {
int HP_mob_final_ratio_sub_post;
int HP_mob_destroy_mob_db_pre;
int HP_mob_destroy_mob_db_post;
+ int HP_mob_destroy_drop_groups_pre;
+ int HP_mob_destroy_drop_groups_post;
int HP_mob_skill_db_libconfig_pre;
int HP_mob_skill_db_libconfig_post;
int HP_mob_skill_db_libconfig_sub_pre;
@@ -11789,6 +11849,10 @@ struct {
int HP_rodex_delete_mail_post;
int HP_rodex_clean_pre;
int HP_rodex_clean_post;
+ int HP_rodex_getZenyAck_pre;
+ int HP_rodex_getZenyAck_post;
+ int HP_rodex_getItemsAck_pre;
+ int HP_rodex_getItemsAck_post;
int HP_script_init_pre;
int HP_script_init_post;
int HP_script_final_pre;
@@ -12707,6 +12771,8 @@ struct {
int HP_sockt_flush_post;
int HP_sockt_flush_fifos_pre;
int HP_sockt_flush_fifos_post;
+ int HP_sockt_connect_client_pre;
+ int HP_sockt_connect_client_post;
int HP_sockt_set_nonblocking_pre;
int HP_sockt_set_nonblocking_post;
int HP_sockt_set_defaultparse_pre;
@@ -13127,6 +13193,24 @@ struct {
int HP_strlib_strline__post;
int HP_strlib_bin2hex__pre;
int HP_strlib_bin2hex__post;
+ int HP_stylist_init_pre;
+ int HP_stylist_init_post;
+ int HP_stylist_final_pre;
+ int HP_stylist_final_post;
+ int HP_stylist_vector_init_pre;
+ int HP_stylist_vector_init_post;
+ int HP_stylist_vector_clear_pre;
+ int HP_stylist_vector_clear_post;
+ int HP_stylist_read_db_libconfig_pre;
+ int HP_stylist_read_db_libconfig_post;
+ int HP_stylist_read_db_libconfig_sub_pre;
+ int HP_stylist_read_db_libconfig_sub_post;
+ int HP_stylist_request_style_change_pre;
+ int HP_stylist_request_style_change_post;
+ int HP_stylist_validate_requirements_pre;
+ int HP_stylist_validate_requirements_post;
+ int HP_stylist_send_rodexitem_pre;
+ int HP_stylist_send_rodexitem_post;
int HP_sv_parse_next_pre;
int HP_sv_parse_next_post;
int HP_sv_parse_pre;
@@ -13420,6 +13504,7 @@ struct {
struct storage_interface storage;
struct stringbuf_interface StrBuf;
struct strlib_interface strlib;
+ struct stylist_interface stylist;
struct sv_interface sv;
struct sysinfo_interface sysinfo;
struct thread_interface thread;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 8d031e140..51ea6a44e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -508,7 +508,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->mvp_exp, HP_clif_mvp_exp) },
{ HP_POP(clif->mvp_noitem, HP_clif_mvp_noitem) },
{ HP_POP(clif->changed_dir, HP_clif_changed_dir) },
- { HP_POP(clif->charnameack, HP_clif_charnameack) },
+ { HP_POP(clif->blname_ack, HP_clif_blname_ack) },
{ HP_POP(clif->monster_hp_bar, HP_clif_monster_hp_bar) },
{ HP_POP(clif->hpmeter, HP_clif_hpmeter) },
{ HP_POP(clif->hpmeter_single, HP_clif_hpmeter_single) },
@@ -1129,15 +1129,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->ui_action, HP_clif_ui_action) },
{ HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) },
{ HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) },
- { HP_POP(clif->stylist_vector_init, HP_clif_stylist_vector_init) },
- { HP_POP(clif->stylist_vector_clear, HP_clif_stylist_vector_clear) },
- { HP_POP(clif->stylist_read_db_libconfig, HP_clif_stylist_read_db_libconfig) },
- { HP_POP(clif->stylist_read_db_libconfig_sub, HP_clif_stylist_read_db_libconfig_sub) },
- { HP_POP(clif->style_change_validate_requirements, HP_clif_style_change_validate_requirements) },
- { HP_POP(clif->stylist_send_rodexitem, HP_clif_stylist_send_rodexitem) },
{ HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) },
{ HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) },
- { HP_POP(clif->cz_req_style_change_sub, HP_clif_cz_req_style_change_sub) },
+ { HP_POP(clif->pStyleClose, HP_clif_pStyleClose) },
{ HP_POP(clif->style_change_response, HP_clif_style_change_response) },
{ HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) },
{ HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) },
@@ -1152,6 +1146,12 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) },
{ HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) },
{ HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) },
+ { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) },
+ { HP_POP(clif->pPing, HP_clif_pPing) },
+ { HP_POP(clif->ping, HP_clif_ping) },
+ { HP_POP(clif->pingTimer, HP_clif_pingTimer) },
+ { HP_POP(clif->pingTimerSub, HP_clif_pingTimerSub) },
+ { HP_POP(clif->pResetCooldown, HP_clif_pResetCooldown) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -1487,6 +1487,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) },
{ HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) },
{ HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) },
+ { HP_POP(intif->pGetZenyAck, HP_intif_pGetZenyAck) },
+ { HP_POP(intif->pGetItemsAck, HP_intif_pGetItemsAck) },
{ HP_POP(intif->clan_kickoffline, HP_intif_clan_kickoffline) },
{ HP_POP(intif->clan_membercount, HP_intif_clan_membercount) },
{ HP_POP(intif->request_accinfo, HP_intif_request_accinfo) },
@@ -1999,6 +2001,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) },
{ HP_POP(mob->ai_lazy, HP_mob_ai_lazy) },
{ HP_POP(mob->ai_hard, HP_mob_ai_hard) },
+ { HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) },
{ HP_POP(mob->setdropitem, HP_mob_setdropitem) },
{ HP_POP(mob->setlootitem, HP_mob_setlootitem) },
{ HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) },
@@ -2032,6 +2035,10 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->clone_delete, HP_mob_clone_delete) },
{ HP_POP(mob->drop_adjust, HP_mob_drop_adjust) },
{ HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) },
+ { HP_POP(mob->read_optdrops_option, HP_mob_read_optdrops_option) },
+ { HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) },
+ { HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) },
+ { HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) },
{ HP_POP(mob->readdb, HP_mob_readdb) },
{ HP_POP(mob->lookup_const, HP_mob_lookup_const) },
{ HP_POP(mob->get_const, HP_mob_get_const) },
@@ -2042,6 +2049,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) },
{ HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) },
{ HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) },
+ { HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) },
{ HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) },
{ HP_POP(mob->name_constants, HP_mob_name_constants) },
{ HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) },
@@ -2057,6 +2065,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) },
{ HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) },
{ HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) },
+ { HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) },
{ HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) },
{ HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) },
{ HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) },
@@ -2624,6 +2633,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(rodex->get_items, HP_rodex_get_items) },
{ HP_POP(rodex->delete_mail, HP_rodex_delete_mail) },
{ HP_POP(rodex->clean, HP_rodex_clean) },
+ { HP_POP(rodex->getZenyAck, HP_rodex_getZenyAck) },
+ { HP_POP(rodex->getItemsAck, HP_rodex_getItemsAck) },
/* script_interface */
{ HP_POP(script->init, HP_script_init) },
{ HP_POP(script->final, HP_script_final) },
@@ -3088,6 +3099,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
{ HP_POP(sockt->flush, HP_sockt_flush) },
{ HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->connect_client, HP_sockt_connect_client) },
{ HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
{ HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
{ HP_POP(sockt->host2ip, HP_sockt_host2ip) },
@@ -3303,6 +3315,16 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) },
{ HP_POP(strlib->strline_, HP_strlib_strline_) },
{ HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) },
+/* stylist_interface */
+ { HP_POP(stylist->init, HP_stylist_init) },
+ { HP_POP(stylist->final, HP_stylist_final) },
+ { HP_POP(stylist->vector_init, HP_stylist_vector_init) },
+ { HP_POP(stylist->vector_clear, HP_stylist_vector_clear) },
+ { HP_POP(stylist->read_db_libconfig, HP_stylist_read_db_libconfig) },
+ { HP_POP(stylist->read_db_libconfig_sub, HP_stylist_read_db_libconfig_sub) },
+ { HP_POP(stylist->request_style_change, HP_stylist_request_style_change) },
+ { HP_POP(stylist->validate_requirements, HP_stylist_validate_requirements) },
+ { HP_POP(stylist->send_rodexitem, HP_stylist_send_rodexitem) },
/* sv_interface */
{ HP_POP(sv->parse_next, HP_sv_parse_next) },
{ HP_POP(sv->parse, HP_sv_parse) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index af1fc7bc4..7978909eb 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -12619,13 +12619,13 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) {
}
return;
}
-void HP_clif_charnameack(int fd, struct block_list *bl) {
+void HP_clif_blname_ack(int fd, struct block_list *bl) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_charnameack_pre > 0) {
+ if (HPMHooks.count.HP_clif_blname_ack_pre > 0) {
void (*preHookFunc) (int *fd, struct block_list **bl);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_blname_ack_pre[hIndex].func;
preHookFunc(&fd, &bl);
}
if (*HPMforce_return) {
@@ -12634,12 +12634,12 @@ void HP_clif_charnameack(int fd, struct block_list *bl) {
}
}
{
- HPMHooks.source.clif.charnameack(fd, bl);
+ HPMHooks.source.clif.blname_ack(fd, bl);
}
- if (HPMHooks.count.HP_clif_charnameack_post > 0) {
+ if (HPMHooks.count.HP_clif_blname_ack_post > 0) {
void (*postHookFunc) (int fd, struct block_list *bl);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_blname_ack_post[hIndex].func;
postHookFunc(fd, bl);
}
}
@@ -15758,14 +15758,14 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) {
}
return;
}
-void HP_clif_ShowScript(struct block_list *bl, const char *message) {
+void HP_clif_ShowScript(struct block_list *bl, const char *message, enum send_target target) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_ShowScript_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, const char **message);
+ void (*preHookFunc) (struct block_list **bl, const char **message, enum send_target *target);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func;
- preHookFunc(&bl, &message);
+ preHookFunc(&bl, &message, &target);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -15773,13 +15773,13 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) {
}
}
{
- HPMHooks.source.clif.ShowScript(bl, message);
+ HPMHooks.source.clif.ShowScript(bl, message, target);
}
if (HPMHooks.count.HP_clif_ShowScript_post > 0) {
- void (*postHookFunc) (struct block_list *bl, const char *message);
+ void (*postHookFunc) (struct block_list *bl, const char *message, enum send_target target);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_ShowScript_post[hIndex].func;
- postHookFunc(bl, message);
+ postHookFunc(bl, message, target);
}
}
return;
@@ -28048,10 +28048,10 @@ void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) {
+void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name);
+ void (*preHookFunc) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func;
@@ -28066,7 +28066,7 @@ void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, sh
HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name);
}
if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name);
+ void (*postHookFunc) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func;
postHookFunc(sd, char_id, class_, base_level, name);
@@ -28806,165 +28806,6 @@ void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) {
}
return;
}
-void HP_clif_stylist_vector_init(void) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_vector_init_pre > 0) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_pre[hIndex].func;
- preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_vector_init();
- }
- if (HPMHooks.count.HP_clif_stylist_vector_init_post > 0) {
- void (*postHookFunc) (void);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_init_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_vector_init_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-void HP_clif_stylist_vector_clear(void) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_vector_clear_pre > 0) {
- void (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_pre[hIndex].func;
- preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_vector_clear();
- }
- if (HPMHooks.count.HP_clif_stylist_vector_clear_post > 0) {
- void (*postHookFunc) (void);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_vector_clear_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_vector_clear_post[hIndex].func;
- postHookFunc();
- }
- }
- return;
-}
-bool HP_clif_stylist_read_db_libconfig(void) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre > 0) {
- bool (*preHookFunc) (void);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_pre[hIndex].func;
- retVal___ = preHookFunc();
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig();
- }
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_post > 0) {
- bool (*postHookFunc) (bool retVal___);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
- }
- }
- return retVal___;
-}
-bool HP_clif_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre > 0) {
- bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_pre[hIndex].func;
- retVal___ = preHookFunc(&it, &idx, &source);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.stylist_read_db_libconfig_sub(it, idx, source);
- }
- if (HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_read_db_libconfig_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_read_db_libconfig_sub_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, it, idx, source);
- }
- }
- return retVal___;
-}
-bool HP_clif_style_change_validate_requirements(struct map_session_data *sd, int type, int16 idx) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_clif_style_change_validate_requirements_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &type, &idx);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.clif.style_change_validate_requirements(sd, type, idx);
- }
- if (HPMHooks.count.HP_clif_style_change_validate_requirements_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_validate_requirements_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_style_change_validate_requirements_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, type, idx);
- }
- }
- return retVal___;
-}
-void HP_clif_stylist_send_rodexitem(struct map_session_data *sd, int itemid) {
- int hIndex = 0;
- if (HPMHooks.count.HP_clif_stylist_send_rodexitem_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *itemid);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_pre[hIndex].func;
- preHookFunc(&sd, &itemid);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return;
- }
- }
- {
- HPMHooks.source.clif.stylist_send_rodexitem(sd, itemid);
- }
- if (HPMHooks.count.HP_clif_stylist_send_rodexitem_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int itemid);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_stylist_send_rodexitem_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_stylist_send_rodexitem_post[hIndex].func;
- postHookFunc(sd, itemid);
- }
- }
- return;
-}
void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) {
@@ -29017,14 +28858,14 @@ void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 idx, bool isitem) {
+void HP_clif_pStyleClose(int fd, struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_cz_req_style_change_sub_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+ if (HPMHooks.count.HP_clif_pStyleClose_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_pre[hIndex].func;
- preHookFunc(&sd, &type, &idx, &isitem);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pStyleClose_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -29032,13 +28873,13 @@ void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int1
}
}
{
- HPMHooks.source.clif.cz_req_style_change_sub(sd, type, idx, isitem);
+ HPMHooks.source.clif.pStyleClose(fd, sd);
}
- if (HPMHooks.count.HP_clif_cz_req_style_change_sub_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cz_req_style_change_sub_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_cz_req_style_change_sub_post[hIndex].func;
- postHookFunc(sd, type, idx, isitem);
+ if (HPMHooks.count.HP_clif_pStyleClose_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pStyleClose_post[hIndex].func;
+ postHookFunc(fd, sd);
}
}
return;
@@ -29408,6 +29249,170 @@ void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_pClientVersion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pClientVersion(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pClientVersion_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPing(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pPing_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pPing_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPing(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pPing_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pPing_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_ping(struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_ping_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_ping_pre[hIndex].func;
+ preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ping(sd);
+ }
+ if (HPMHooks.count.HP_clif_ping_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_ping_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_clif_pingTimer(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_clif_pingTimer_pre > 0) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pingTimer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.pingTimer(tid, tick, id, data);
+ }
+ if (HPMHooks.count.HP_clif_pingTimer_post > 0) {
+ int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pingTimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, tid, tick, id, data);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_pingTimerSub(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_clif_pingTimerSub_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd, va_list ap);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_pre; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_pingTimerSub_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.pingTimerSub(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if (HPMHooks.count.HP_clif_pingTimerSub_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_post; hIndex++) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_pingTimerSub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_pResetCooldown(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_pResetCooldown_pre > 0) {
+ void (*preHookFunc) (int *fd, struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_pResetCooldown_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pResetCooldown(fd, sd);
+ }
+ if (HPMHooks.count.HP_clif_pResetCooldown_post > 0) {
+ void (*postHookFunc) (int fd, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_pResetCooldown_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -32612,11 +32617,11 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) {
}
return retVal___;
}
-int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) {
+int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login);
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func;
@@ -32631,7 +32636,7 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int
retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login);
}
if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login);
+ int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login);
for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login);
@@ -34759,11 +34764,11 @@ bool HP_homun_levelup(struct homun_data *hd) {
}
return retVal___;
}
-int HP_homun_change_class(struct homun_data *hd, short class_) {
+int HP_homun_change_class(struct homun_data *hd, int class_) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_homun_change_class_pre > 0) {
- int (*preHookFunc) (struct homun_data **hd, short *class_);
+ int (*preHookFunc) (struct homun_data **hd, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func;
@@ -34778,7 +34783,7 @@ int HP_homun_change_class(struct homun_data *hd, short class_) {
retVal___ = HPMHooks.source.homun.change_class(hd, class_);
}
if (HPMHooks.count.HP_homun_change_class_post > 0) {
- int (*postHookFunc) (int retVal___, struct homun_data *hd, short class_);
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func;
retVal___ = postHookFunc(retVal___, hd, class_);
@@ -36156,11 +36161,11 @@ int HP_intif_parse(int fd) {
}
return retVal___;
}
-int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
+int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_create_pet_pre > 0) {
- int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
+ int (*preHookFunc) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func;
@@ -36175,7 +36180,7 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l
retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
}
if (HPMHooks.count.HP_intif_create_pet_post > 0) {
- int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
+ int (*postHookFunc) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name);
@@ -36829,11 +36834,11 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co
}
return retVal___;
}
-int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) {
+int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) {
- int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class);
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func;
@@ -36848,7 +36853,7 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in
retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class);
}
if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) {
- int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
+ int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func;
retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class);
@@ -38042,15 +38047,15 @@ int HP_intif_rodex_checkhasnew(struct map_session_data *sd) {
}
return retVal___;
}
-int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) {
+int HP_intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) {
- int (*preHookFunc) (int64 *mail_id, int8 *flag);
+ int (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func;
- retVal___ = preHookFunc(&mail_id, &flag);
+ retVal___ = preHookFunc(&sd, &mail_id, &opentype, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -38058,13 +38063,13 @@ int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) {
}
}
{
- retVal___ = HPMHooks.source.intif.rodex_updatemail(mail_id, flag);
+ retVal___ = HPMHooks.source.intif.rodex_updatemail(sd, mail_id, opentype, flag);
}
if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) {
- int (*postHookFunc) (int retVal___, int64 mail_id, int8 flag);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, mail_id, flag);
+ retVal___ = postHookFunc(retVal___, sd, mail_id, opentype, flag);
}
}
return retVal___;
@@ -38123,6 +38128,58 @@ int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) {
}
return retVal___;
}
+void HP_intif_pGetZenyAck(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pGetZenyAck_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGetZenyAck(fd);
+ }
+ if (HPMHooks.count.HP_intif_pGetZenyAck_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGetItemsAck(int fd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_intif_pGetItemsAck_pre > 0) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGetItemsAck(fd);
+ }
+ if (HPMHooks.count.HP_intif_pGetItemsAck_post > 0) {
+ void (*postHookFunc) (int fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_post[hIndex].func;
+ postHookFunc(fd);
+ }
+ }
+ return;
+}
int HP_intif_clan_kickoffline(int clan_id, int kick_interval) {
int hIndex = 0;
int retVal___ = 0;
@@ -51693,15 +51750,41 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) {
+void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) {
+ void (*preHookFunc) (struct item **item, struct optdrop_group **options);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func;
+ preHookFunc(&item, &options);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.setdropitem_options(item, options);
+ }
+ if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) {
+ void (*postHookFunc) (struct item *item, struct optdrop_group *options);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func;
+ postHookFunc(item, options);
+ }
+ }
+ return;
+}
+struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data) {
int hIndex = 0;
struct item_drop* retVal___ = NULL;
if (HPMHooks.count.HP_mob_setdropitem_pre > 0) {
- struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data);
+ struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func;
- retVal___ = preHookFunc(&nameid, &qty, &data);
+ retVal___ = preHookFunc(&nameid, &options, &qty, &data);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -51709,13 +51792,13 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data
}
}
{
- retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data);
+ retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, qty, data);
}
if (HPMHooks.count.HP_mob_setdropitem_post > 0) {
- struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
+ struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, nameid, qty, data);
+ retVal___ = postHookFunc(retVal___, nameid, options, qty, data);
}
}
return retVal___;
@@ -52608,6 +52691,114 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) {
}
return;
}
+bool HP_mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_option_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_pre[hIndex].func;
+ retVal___ = preHookFunc(&option, &entry, &idx, &calc_rate, &slot, &group);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_option(option, entry, idx, calc_rate, slot, group);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_option_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, option, entry, idx, calc_rate, slot, group);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func;
+ retVal___ = preHookFunc(&optslot, &n, &group_id, &group);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, optslot, n, group_id, group);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **group, int *n);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func;
+ retVal___ = preHookFunc(&group, &n);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n);
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, n);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_read_optdrops_db(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_optdrops_db();
+ }
+ if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
void HP_mob_readdb(void) {
int hIndex = 0;
if (HPMHooks.count.HP_mob_readdb_pre > 0) {
@@ -52874,6 +53065,33 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t)
}
return retVal___;
}
+struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) {
+ int hIndex = 0;
+ struct optdrop_group* retVal___ = NULL;
+ if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) {
+ struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func;
+ retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate);
+ }
+ if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) {
+ struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate);
+ }
+ }
+ return retVal___;
+}
void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) {
int hIndex = 0;
if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) {
@@ -53277,6 +53495,32 @@ void HP_mob_destroy_mob_db(int index) {
}
return;
}
+void HP_mob_destroy_drop_groups(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.destroy_drop_groups();
+ }
+ if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) {
int hIndex = 0;
bool retVal___ = false;
@@ -55579,11 +55823,11 @@ bool HP_npc_viewisid(const char *viewid) {
}
return retVal___;
}
-struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) {
+struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) {
int hIndex = 0;
struct npc_data* retVal___ = NULL;
if (HPMHooks.count.HP_npc_create_npc_pre > 0) {
- struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_);
+ struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func;
@@ -55598,7 +55842,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y
retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_);
}
if (HPMHooks.count.HP_npc_create_npc_post > 0) {
- struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func;
retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_);
@@ -56119,10 +56363,10 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) {
}
return;
}
-void HP_npc_setclass(struct npc_data *nd, short class_) {
+void HP_npc_setclass(struct npc_data *nd, int class_) {
int hIndex = 0;
if (HPMHooks.count.HP_npc_setclass_pre > 0) {
- void (*preHookFunc) (struct npc_data **nd, short *class_);
+ void (*preHookFunc) (struct npc_data **nd, int *class_);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func;
@@ -56137,7 +56381,7 @@ void HP_npc_setclass(struct npc_data *nd, short class_) {
HPMHooks.source.npc.setclass(nd, class_);
}
if (HPMHooks.count.HP_npc_setclass_post > 0) {
- void (*postHookFunc) (struct npc_data *nd, short class_);
+ void (*postHookFunc) (struct npc_data *nd, int class_);
for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func;
postHookFunc(nd, class_);
@@ -62929,11 +63173,11 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) {
}
return retVal___;
}
-int HP_pc_jobid2mapid(int16 class) {
+int HP_pc_jobid2mapid(int class) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) {
- int (*preHookFunc) (int16 *class);
+ int (*preHookFunc) (int *class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func;
@@ -62948,7 +63192,7 @@ int HP_pc_jobid2mapid(int16 class) {
retVal___ = HPMHooks.source.pc.jobid2mapid(class);
}
if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) {
- int (*postHookFunc) (int retVal___, int16 class);
+ int (*postHookFunc) (int retVal___, int class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func;
retVal___ = postHookFunc(retVal___, class);
@@ -62956,11 +63200,11 @@ int HP_pc_jobid2mapid(int16 class) {
}
return retVal___;
}
-int HP_pc_mapid2jobid(unsigned short class_, int sex) {
+int HP_pc_mapid2jobid(unsigned int class_, int sex) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) {
- int (*preHookFunc) (unsigned short *class_, int *sex);
+ int (*preHookFunc) (unsigned int *class_, int *sex);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func;
@@ -62975,7 +63219,7 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) {
retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex);
}
if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) {
- int (*postHookFunc) (int retVal___, unsigned short class_, int sex);
+ int (*postHookFunc) (int retVal___, unsigned int class_, int sex);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func;
retVal___ = postHookFunc(retVal___, class_, sex);
@@ -66167,11 +66411,11 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) {
}
return retVal___;
}
-bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) {
+bool HP_pet_get_egg(int account_id, int pet_class, int pet_id) {
int hIndex = 0;
bool retVal___ = false;
if (HPMHooks.count.HP_pet_get_egg_pre > 0) {
- bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id);
+ bool (*preHookFunc) (int *account_id, int *pet_class, int *pet_id);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func;
@@ -66186,7 +66430,7 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) {
retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id);
}
if (HPMHooks.count.HP_pet_get_egg_post > 0) {
- bool (*postHookFunc) (bool retVal___, int account_id, short pet_class, int pet_id);
+ bool (*postHookFunc) (bool retVal___, int account_id, int pet_class, int pet_id);
for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func;
retVal___ = postHookFunc(retVal___, account_id, pet_class, pet_id);
@@ -67977,10 +68221,10 @@ void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount)
}
return;
}
-void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) {
+void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) {
int hIndex = 0;
if (HPMHooks.count.HP_rodex_check_player_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class);
+ void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func;
@@ -67995,7 +68239,7 @@ void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *b
HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class);
}
if (HPMHooks.count.HP_rodex_check_player_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class);
+ void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class);
for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func;
postHookFunc(sd, name, base_level, char_id, class);
@@ -68213,6 +68457,58 @@ void HP_rodex_clean(struct map_session_data *sd, int8 flag) {
}
return;
}
+void HP_rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_rodex_getZenyAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_rodex_getZenyAck_pre[hIndex].func;
+ preHookFunc(&sd, &mail_id, &opentype, &zeny);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.rodex.getZenyAck(sd, mail_id, opentype, zeny);
+ }
+ if (HPMHooks.count.HP_rodex_getZenyAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_rodex_getZenyAck_post[hIndex].func;
+ postHookFunc(sd, mail_id, opentype, zeny);
+ }
+ }
+ return;
+}
+void HP_rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_rodex_getItemsAck_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_rodex_getItemsAck_pre[hIndex].func;
+ preHookFunc(&sd, &mail_id, &opentype, &count, &items);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.rodex.getItemsAck(sd, mail_id, opentype, count, items);
+ }
+ if (HPMHooks.count.HP_rodex_getItemsAck_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_rodex_getItemsAck_post[hIndex].func;
+ postHookFunc(sd, mail_id, opentype, count, items);
+ }
+ }
+ return;
+}
/* script_interface */
void HP_script_init(bool minimal) {
int hIndex = 0;
@@ -80790,6 +81086,33 @@ void HP_sockt_flush_fifos(void) {
}
return;
}
+int HP_sockt_connect_client(int listen_fd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_sockt_connect_client_pre > 0) {
+ int (*preHookFunc) (int *listen_fd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func;
+ retVal___ = preHookFunc(&listen_fd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.connect_client(listen_fd);
+ }
+ if (HPMHooks.count.HP_sockt_connect_client_post > 0) {
+ int (*postHookFunc) (int retVal___, int listen_fd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, listen_fd);
+ }
+ }
+ return retVal___;
+}
void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
int hIndex = 0;
if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) {
@@ -86462,6 +86785,244 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count)
}
return retVal___;
}
+/* stylist_interface */
+void HP_stylist_init(bool minimal) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_init_pre > 0) {
+ void (*preHookFunc) (bool *minimal);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_init_pre[hIndex].func;
+ preHookFunc(&minimal);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.init(minimal);
+ }
+ if (HPMHooks.count.HP_stylist_init_post > 0) {
+ void (*postHookFunc) (bool minimal);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_init_post[hIndex].func;
+ postHookFunc(minimal);
+ }
+ }
+ return;
+}
+void HP_stylist_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.final();
+ }
+ if (HPMHooks.count.HP_stylist_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_stylist_vector_init(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_vector_init_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_vector_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.vector_init();
+ }
+ if (HPMHooks.count.HP_stylist_vector_init_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_vector_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_stylist_vector_clear(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_vector_clear_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_vector_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.vector_clear();
+ }
+ if (HPMHooks.count.HP_stylist_vector_clear_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_vector_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_stylist_read_db_libconfig(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.read_db_libconfig();
+ }
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre > 0) {
+ bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&it, &idx, &source);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.read_db_libconfig_sub(it, idx, source);
+ }
+ if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, it, idx, source);
+ }
+ }
+ return retVal___;
+}
+void HP_stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_request_style_change_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_request_style_change_pre[hIndex].func;
+ preHookFunc(&sd, &type, &idx, &isitem);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.request_style_change(sd, type, idx, isitem);
+ }
+ if (HPMHooks.count.HP_stylist_request_style_change_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_request_style_change_post[hIndex].func;
+ postHookFunc(sd, type, idx, isitem);
+ }
+ }
+ return;
+}
+bool HP_stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_stylist_validate_requirements_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_validate_requirements_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &type, &idx);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.stylist.validate_requirements(sd, type, idx);
+ }
+ if (HPMHooks.count.HP_stylist_validate_requirements_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_validate_requirements_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, type, idx);
+ }
+ }
+ return retVal___;
+}
+void HP_stylist_send_rodexitem(struct map_session_data *sd, int itemid) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_stylist_send_rodexitem_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *itemid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_pre[hIndex].func;
+ preHookFunc(&sd, &itemid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.stylist.send_rodexitem(sd, itemid);
+ }
+ if (HPMHooks.count.HP_stylist_send_rodexitem_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int itemid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_post[hIndex].func;
+ postHookFunc(sd, itemid);
+ }
+ }
+ return;
+}
/* sv_interface */
int HP_sv_parse_next(struct s_svstate *svstate) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 7a3c5b9a7..59ee43ab7 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -85,6 +85,7 @@ HPMHooks.source.status = *status;
HPMHooks.source.storage = *storage;
HPMHooks.source.StrBuf = *StrBuf;
HPMHooks.source.strlib = *strlib;
+HPMHooks.source.stylist = *stylist;
HPMHooks.source.sv = *sv;
HPMHooks.source.sysinfo = *sysinfo;
HPMHooks.source.thread = *thread;
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 2ece501b2..159d4e2a6 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -956,6 +956,7 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id)
struct mob_db *md = mob->db(mob_id);
char valname[15];
const char *name = config_setting_name(it);
+ char e_name[NAME_LENGTH*2+1];
nullpo_retr(false, it);
Assert_retr(false, mob_id <= 0 || md != mob->dummy);
@@ -966,7 +967,8 @@ bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id)
StrBuf->Printf(&buf, "%d,", mob_id);
// Info
- StrBuf->Printf(&buf, "'%s@%s',", md->name, name);
+ SQL->EscapeString(NULL, e_name, md->name);
+ StrBuf->Printf(&buf, "'%s@%s',", e_name, name);
if (mob->lookup_const(it, "SkillState", &i32) && (i32 < MSS_ANY || i32 > MSS_ANYTARGET)) {
ShowWarning("mob_skill_db_libconfig_sub_skill: Invalid skill state %d for skill '%s' in monster %d, defaulting to MSS_ANY.\n", i32, name, mob_id);
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index b37f7c4f7..7ad6794b3 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -23,6 +23,7 @@
#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */
#include "common/memmgr.h"
#include "common/mmo.h"
+#include "common/random.h"
#include "common/socket.h"
#include "common/strlib.h"
#include "map/clif.h"
@@ -79,13 +80,13 @@ void sample_packet0f3(int fd) {
data->lastMSGPosition.map = sd->status.last_point.map;
data->lastMSGPosition.x = sd->status.last_point.x;
data->lastMSGPosition.y = sd->status.last_point.y;
- data->someNumber = rand()%777;
+ data->someNumber = rnd()%777;
ShowInfo("Created Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
addToSession(sockt->session[fd],data,0,true);
} else {
ShowInfo("Existent Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
- if( rand()%4 == 2 ) {
+ if (rnd()%4 == 2) {
ShowInfo("Removing Appended sockt->session[] data\n");
removeFromSession(sockt->session[fd],0);
}
@@ -98,13 +99,13 @@ void sample_packet0f3(int fd) {
data->lastMSGPosition.map = sd->status.last_point.map;
data->lastMSGPosition.x = sd->status.last_point.x;
data->lastMSGPosition.y = sd->status.last_point.y;
- data->someNumber = rand()%777;
+ data->someNumber = rnd()%777;
ShowInfo("Created Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
addToMSD(sd,data,0,true);
} else {
ShowInfo("Existent Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
- if( rand()%4 == 2 ) {
+ if (rnd()%4 == 2) {
ShowInfo("Removing Appended map_session_data data\n");
removeFromMSD(sd,0);
}