summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c4
-rw-r--r--src/common/HPMDataCheck.h2
-rw-r--r--src/common/mmo.h4
-rw-r--r--src/common/packets/packets2019_len_main.h175
-rw-r--r--src/common/packets/packets2019_len_re.h181
-rw-r--r--src/common/packets/packets2019_len_zero.h175
-rw-r--r--src/map/atcommand.c148
-rw-r--r--src/map/atcommand.h2
-rw-r--r--src/map/battle.c14
-rw-r--r--src/map/battle.h3
-rw-r--r--src/map/clif.c300
-rw-r--r--src/map/clif.h3
-rw-r--r--src/map/homunculus.c6
-rw-r--r--src/map/itemdb.h3
-rw-r--r--src/map/messages_main.h62
-rw-r--r--src/map/messages_re.h62
-rw-r--r--src/map/messages_zero.h71
-rw-r--r--src/map/mob.c34
-rw-r--r--src/map/mob.h3
-rw-r--r--src/map/npc.c9
-rw-r--r--src/map/packets.h2
-rw-r--r--src/map/packets_keys_main.h10
-rw-r--r--src/map/packets_keys_zero.h10
-rw-r--r--src/map/packets_shuffle_main.h9
-rw-r--r--src/map/packets_shuffle_re.h10
-rw-r--r--src/map/packets_shuffle_zero.h10
-rw-r--r--src/map/packets_struct.h89
-rw-r--r--src/map/pc.c35
-rw-r--r--src/map/script.c130
-rw-r--r--src/map/script.h1
-rw-r--r--src/map/skill.c12
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc85
35 files changed, 1459 insertions, 226 deletions
diff --git a/src/char/char.c b/src/char/char.c
index cad28b373..c5afc0f63 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2273,6 +2273,8 @@ static int char_char_married(int pl1, int pl2)
static int char_char_child(int parent_id, int child_id)
{
+ if (parent_id == 0 || child_id == 0) // Failsafe, avoild querys and fix EXP bug dividing with lower level chars
+ return 0;
if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `child` FROM `%s` WHERE `char_id` = '%d'", char_db, parent_id) )
Sql_ShowDebug(inter->sql_handle);
else if( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) )
@@ -2292,6 +2294,8 @@ static int char_char_child(int parent_id, int child_id)
static int char_char_family(int cid1, int cid2, int cid3)
{
+ if (cid1 == 0 || cid2 == 0 || cid3 == 0) //Failsafe, and avoid querys where there is no sense to keep executing if any of the inputs are 0
+ return 0;
if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `char_id`,`partner_id`,`child` FROM `%s` WHERE `char_id` IN ('%d','%d','%d')", char_db, cid1, cid2, cid3) )
Sql_ShowDebug(inter->sql_handle);
else while( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) )
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 1e1d8068f..d63ed7b99 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -666,6 +666,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_ACK_LEAVE_GUILD1", sizeof(struct PACKET_ZC_ACK_LEAVE_GUILD1), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_LEAVE_GUILD2", sizeof(struct PACKET_ZC_ACK_LEAVE_GUILD2), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_ACK_RANKING_sub", sizeof(struct PACKET_ZC_ACK_RANKING_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQMAKINGITEM", sizeof(struct PACKET_ZC_ACK_REQMAKINGITEM), SERVER_TYPE_MAP },
{ "PACKET_ZC_ACK_REQNAME_TITLE", sizeof(struct PACKET_ZC_ACK_REQNAME_TITLE), SERVER_TYPE_MAP },
@@ -735,6 +736,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_SEARCH_STORE_INFO_ACK_sub", sizeof(struct PACKET_ZC_SEARCH_STORE_INFO_ACK_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP },
{ "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP },
+ { "PACKET_ZC_STATUS_CHANGE_ACK", sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK), SERVER_TYPE_MAP },
{ "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP },
{ "PACKET_ZC_UI_ACTION", sizeof(struct PACKET_ZC_UI_ACTION), SERVER_TYPE_MAP },
{ "PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE", sizeof(struct PACKET_ZC_UPDATE_ITEM_FROM_BUYING_STORE), SERVER_TYPE_MAP },
diff --git a/src/common/mmo.h b/src/common/mmo.h
index b58a70ae9..1fa6fadc8 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -139,7 +139,7 @@
// Note that newer clients no longer save hotkeys in the registry!
#define HOTKEY_SAVING
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
#define MAX_HOTKEYS 38
#elif PACKETVER_MAIN_NUM >= 20141022 || PACKETVER_RE_NUM >= 20141015 || defined(PACKETVER_ZERO)
// (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
@@ -156,7 +156,7 @@
#endif
#endif // PACKETVER_MAIN_NUM >= 20070711 || PACKETVER_RE_NUM >= 20080827 || PACKETVER_AD_NUM >= 20070711 || PACKETVER_SAK_NUM >= 20070628 || defined(PACKETVER_ZERO)
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
#define MAX_HOTKEYS_DB ((MAX_HOTKEYS) * 2)
#else
#define MAX_HOTKEYS_DB MAX_HOTKEYS
diff --git a/src/common/packets/packets2019_len_main.h b/src/common/packets/packets2019_len_main.h
index 0382a72d3..bfcb7c159 100644
--- a/src/common/packets/packets2019_len_main.h
+++ b/src/common/packets/packets2019_len_main.h
@@ -3757,7 +3757,7 @@ packetLen(0x0a39, 36) // CH_MAKE_CHAR
packetLen(0x0a3a, 12)
// Packet: 0x0a3b
-packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+packetLen(0x0a3b, -1) // ZC_HAT_EFFECT
// Packet: 0x0a3c
packetLen(0x0a3c, -1)
@@ -3901,7 +3901,7 @@ packetLen(0x0a74, 8)
packetLen(0x0a76, 80)
// Packet: 0x0a77
-packetLen(0x0a77, 15)
+packetLen(0x0a77, 15) // CZ_CAMERA_INFO
// Packet: 0x0a78
packetLen(0x0a78, 15)
@@ -4270,7 +4270,7 @@ packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
packetLen(0x0af5, 3)
// Packet: 0x0af6
-packetLen(0x0af6, 88)
+packetLen(0x0af6, 88) // ZC_ACK_RANKING
// Packet: 0x0af7
packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
@@ -4312,7 +4312,11 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
+#if PACKETVER >= 20190605
+packetLen(0x0b04, 72)
+#elif PACKETVER >= 20190109
packetLen(0x0b04, 80)
+#endif
// Packet: 0x0b05
packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
@@ -4393,12 +4397,16 @@ packetLen(0x0b1d, 2) // ZC_PING
#endif
// Packet: 0x0b1e
-#if PACKETVER >= 20190227
+#if PACKETVER >= 20190619
+packetLen(0x0b1e, 14)
+#elif PACKETVER >= 20190227
packetLen(0x0b1e, 10)
#endif
// Packet: 0x0b1f
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190619
+packetLen(0x0b1f, 14)
+#elif PACKETVER >= 20190306
packetLen(0x0b1f, 10)
#endif
@@ -4466,12 +4474,16 @@ packetLen(0x0b28, 22)
#endif
// Packet: 0x0b29
-#if PACKETVER >= 20190508
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190508
packetLen(0x0b29, 6)
#endif
// Packet: 0x0b2a
-#if PACKETVER >= 20190522
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190522
packetLen(0x0b2a, 40)
#elif PACKETVER >= 20190508
packetLen(0x0b2a, 6)
@@ -4499,7 +4511,7 @@ packetLen(0x0b2e, 4)
// Packet: 0x0b2f
#if PACKETVER >= 20190529
-packetLen(0x0b2f, 73)
+packetLen(0x0b2f, 73) // ZC_PROPERTY_HOMUN_3
#endif
// Packet: 0x0b30
@@ -4507,5 +4519,152 @@ packetLen(0x0b2f, 73)
packetLen(0x0b30, -1)
#endif
+// Packet: 0x0b31
+#if PACKETVER >= 20190619
+packetLen(0x0b31, 17)
+#endif
+
+// Packet: 0x0b32
+#if PACKETVER >= 20190619
+packetLen(0x0b32, -1)
+#endif
+
+// Packet: 0x0b33
+#if PACKETVER >= 20190619
+packetLen(0x0b33, 17)
+#endif
+
+// Packet: 0x0b34
+#if PACKETVER >= 20190724
+packetLen(0x0b34, 50)
+#elif PACKETVER >= 20190703
+packetLen(0x0b34, 26)
+#endif
+
+// Packet: 0x0b35
+#if PACKETVER >= 20190703
+packetLen(0x0b35, 3)
+#endif
+
+// Packet: 0x0b36
+#if PACKETVER >= 20190717
+packetLen(0x0b36, -1)
+#endif
+
+// Packet: 0x0b37
+#if PACKETVER >= 20190724
+packetLen(0x0b37, -1)
+#endif
+
+// Packet: 0x0b38
+#if PACKETVER >= 20190724
+packetLen(0x0b38, -1)
+#endif
+
+// Packet: 0x0b39
+#if PACKETVER >= 20190724
+packetLen(0x0b39, -1)
+#endif
+
+// Packet: 0x0b3a
+#if PACKETVER >= 20190724
+packetLen(0x0b3a, 4)
+#endif
+
+// Packet: 0x0b3b
+#if PACKETVER >= 20190724
+packetLen(0x0b3b, 4)
+#endif
+
+// Packet: 0x0b3c
+#if PACKETVER >= 20190724
+packetLen(0x0b3c, 4)
+#endif
+
+// Packet: 0x0b3d
+#if PACKETVER >= 20190724
+packetLen(0x0b3d, -1)
+#endif
+
+// Packet: 0x0b3e
+#if PACKETVER >= 20190724
+packetLen(0x0b3e, -1)
+#endif
+
+// Packet: 0x0b3f
+#if PACKETVER >= 20190724
+packetLen(0x0b3f, 64)
+#endif
+
+// Packet: 0x0b40
+#if PACKETVER >= 20190724
+packetLen(0x0b40, -1)
+#endif
+
+// Packet: 0x0b41
+#if PACKETVER >= 20190724
+packetLen(0x0b41, 41)
+#endif
+
+// Packet: 0x0b42
+#if PACKETVER >= 20190724
+packetLen(0x0b42, 30)
+#endif
+
+// Packet: 0x0b43
+#if PACKETVER >= 20190724
+packetLen(0x0b43, 47)
+#endif
+
+// Packet: 0x0b44
+#if PACKETVER >= 20190724
+packetLen(0x0b44, 32)
+#endif
+
+// Packet: 0x0b45
+#if PACKETVER >= 20190724
+packetLen(0x0b45, 32)
+#endif
+
+// Packet: 0x0b46
+#if PACKETVER >= 20190724
+packetLen(0x0b46, 10)
+#endif
+
+// Packet: 0x0b47
+#if PACKETVER >= 20190724
+packetLen(0x0b47, 14)
+#endif
+
+// Packet: 0x0b48
+#if PACKETVER >= 20190724
+packetLen(0x0b48, 18)
+#endif
+
+// Packet: 0x0b49
+#if PACKETVER >= 20190724
+packetLen(0x0b49, 4)
+#endif
+
+// Packet: 0x0b4a
+#if PACKETVER >= 20190724
+packetLen(0x0b4a, 6)
+#endif
+
+// Packet: 0x0b4b
+#if PACKETVER >= 20190724
+packetLen(0x0b4b, 4)
+#endif
+
+// Packet: 0x0b4c
+#if PACKETVER >= 20190724
+packetLen(0x0b4c, 2)
+#endif
+
+// Packet: 0x0b4d
+#if PACKETVER >= 20190724
+packetLen(0x0b4d, 6)
+#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 c553d9324..33aa7a524 100644
--- a/src/common/packets/packets2019_len_re.h
+++ b/src/common/packets/packets2019_len_re.h
@@ -3763,7 +3763,7 @@ packetLen(0x0a39, 36) // CH_MAKE_CHAR
packetLen(0x0a3a, 12)
// Packet: 0x0a3b
-packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+packetLen(0x0a3b, -1) // ZC_HAT_EFFECT
// Packet: 0x0a3c
packetLen(0x0a3c, -1)
@@ -3907,7 +3907,7 @@ packetLen(0x0a74, 8)
packetLen(0x0a76, 80)
// Packet: 0x0a77
-packetLen(0x0a77, 15)
+packetLen(0x0a77, 15) // CZ_CAMERA_INFO
// Packet: 0x0a78
packetLen(0x0a78, 15)
@@ -4276,7 +4276,7 @@ packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
packetLen(0x0af5, 3)
// Packet: 0x0af6
-packetLen(0x0af6, 88)
+packetLen(0x0af6, 88) // ZC_ACK_RANKING
// Packet: 0x0af7
packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
@@ -4318,7 +4318,11 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
+#if PACKETVER >= 20190605
+packetLen(0x0b04, 72)
+#elif PACKETVER >= 20190109
packetLen(0x0b04, 80)
+#endif
// Packet: 0x0b05
packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
@@ -4399,12 +4403,22 @@ packetLen(0x0b1d, 2) // ZC_PING
#endif
// Packet: 0x0b1e
-#if PACKETVER >= 20190227
+#if PACKETVER >= 20190619
+packetLen(0x0b1e, 14)
+#elif PACKETVER >= 20190605
+packetLen(0x0b1e, 14)
+// ignored packet from 2019-06-05hRagexeRE
+#elif PACKETVER >= 20190227
packetLen(0x0b1e, 10)
#endif
// Packet: 0x0b1f
-#if PACKETVER >= 20190306
+#if PACKETVER >= 20190619
+packetLen(0x0b1f, 14)
+#elif PACKETVER >= 20190605
+packetLen(0x0b1f, 14)
+// ignored packet from 2019-06-05hRagexeRE
+#elif PACKETVER >= 20190306
packetLen(0x0b1f, 10)
#endif
@@ -4472,12 +4486,16 @@ packetLen(0x0b28, 22)
#endif
// Packet: 0x0b29
-#if PACKETVER >= 20190508
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190508
packetLen(0x0b29, 6)
#endif
// Packet: 0x0b2a
-#if PACKETVER >= 20190522
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190522
packetLen(0x0b2a, 40)
#elif PACKETVER >= 20190508
packetLen(0x0b2a, 6)
@@ -4505,7 +4523,7 @@ packetLen(0x0b2e, 4)
// Packet: 0x0b2f
#if PACKETVER >= 20190529
-packetLen(0x0b2f, 73)
+packetLen(0x0b2f, 73) // ZC_PROPERTY_HOMUN_3
#endif
// Packet: 0x0b30
@@ -4513,5 +4531,152 @@ packetLen(0x0b2f, 73)
packetLen(0x0b30, -1)
#endif
+// Packet: 0x0b31
+#if PACKETVER >= 20190619
+packetLen(0x0b31, 17)
+#endif
+
+// Packet: 0x0b32
+#if PACKETVER >= 20190619
+packetLen(0x0b32, -1)
+#endif
+
+// Packet: 0x0b33
+#if PACKETVER >= 20190619
+packetLen(0x0b33, 17)
+#endif
+
+// Packet: 0x0b34
+#if PACKETVER >= 20190724
+packetLen(0x0b34, 50)
+#elif PACKETVER >= 20190703
+packetLen(0x0b34, 26)
+#endif
+
+// Packet: 0x0b35
+#if PACKETVER >= 20190703
+packetLen(0x0b35, 3)
+#endif
+
+// Packet: 0x0b36
+#if PACKETVER >= 20190717
+packetLen(0x0b36, -1)
+#endif
+
+// Packet: 0x0b37
+#if PACKETVER >= 20190724
+packetLen(0x0b37, -1)
+#endif
+
+// Packet: 0x0b38
+#if PACKETVER >= 20190724
+packetLen(0x0b38, -1)
+#endif
+
+// Packet: 0x0b39
+#if PACKETVER >= 20190724
+packetLen(0x0b39, -1)
+#endif
+
+// Packet: 0x0b3a
+#if PACKETVER >= 20190724
+packetLen(0x0b3a, 4)
+#endif
+
+// Packet: 0x0b3b
+#if PACKETVER >= 20190724
+packetLen(0x0b3b, 4)
+#endif
+
+// Packet: 0x0b3c
+#if PACKETVER >= 20190724
+packetLen(0x0b3c, 4)
+#endif
+
+// Packet: 0x0b3d
+#if PACKETVER >= 20190724
+packetLen(0x0b3d, -1)
+#endif
+
+// Packet: 0x0b3e
+#if PACKETVER >= 20190724
+packetLen(0x0b3e, -1)
+#endif
+
+// Packet: 0x0b3f
+#if PACKETVER >= 20190724
+packetLen(0x0b3f, 64)
+#endif
+
+// Packet: 0x0b40
+#if PACKETVER >= 20190724
+packetLen(0x0b40, -1)
+#endif
+
+// Packet: 0x0b41
+#if PACKETVER >= 20190724
+packetLen(0x0b41, 41)
+#endif
+
+// Packet: 0x0b42
+#if PACKETVER >= 20190724
+packetLen(0x0b42, 30)
+#endif
+
+// Packet: 0x0b43
+#if PACKETVER >= 20190724
+packetLen(0x0b43, 47)
+#endif
+
+// Packet: 0x0b44
+#if PACKETVER >= 20190724
+packetLen(0x0b44, 32)
+#endif
+
+// Packet: 0x0b45
+#if PACKETVER >= 20190724
+packetLen(0x0b45, 32)
+#endif
+
+// Packet: 0x0b46
+#if PACKETVER >= 20190724
+packetLen(0x0b46, 10)
+#endif
+
+// Packet: 0x0b47
+#if PACKETVER >= 20190724
+packetLen(0x0b47, 14)
+#endif
+
+// Packet: 0x0b48
+#if PACKETVER >= 20190724
+packetLen(0x0b48, 18)
+#endif
+
+// Packet: 0x0b49
+#if PACKETVER >= 20190724
+packetLen(0x0b49, 4)
+#endif
+
+// Packet: 0x0b4a
+#if PACKETVER >= 20190724
+packetLen(0x0b4a, 6)
+#endif
+
+// Packet: 0x0b4b
+#if PACKETVER >= 20190724
+packetLen(0x0b4b, 4)
+#endif
+
+// Packet: 0x0b4c
+#if PACKETVER >= 20190724
+packetLen(0x0b4c, 2)
+#endif
+
+// Packet: 0x0b4d
+#if PACKETVER >= 20190724
+packetLen(0x0b4d, 6)
+#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
index 3295b26d9..7b9310cf2 100644
--- a/src/common/packets/packets2019_len_zero.h
+++ b/src/common/packets/packets2019_len_zero.h
@@ -3757,7 +3757,7 @@ packetLen(0x0a39, 36) // CH_MAKE_CHAR
packetLen(0x0a3a, 12)
// Packet: 0x0a3b
-packetLen(0x0a3b, -1) // ZC_CUSTOM_HAT_EFFECT
+packetLen(0x0a3b, -1) // ZC_HAT_EFFECT
// Packet: 0x0a3c
packetLen(0x0a3c, -1)
@@ -3901,7 +3901,7 @@ packetLen(0x0a74, 8)
packetLen(0x0a76, 80)
// Packet: 0x0a77
-packetLen(0x0a77, 15)
+packetLen(0x0a77, 15) // CZ_CAMERA_INFO
// Packet: 0x0a78
packetLen(0x0a78, 15)
@@ -4270,7 +4270,7 @@ packetLen(0x0af4, 11) // CZ_USE_SKILL_TOGROUND
packetLen(0x0af5, 3)
// Packet: 0x0af6
-packetLen(0x0af6, 88)
+packetLen(0x0af6, 88) // ZC_ACK_RANKING
// Packet: 0x0af7
packetLen(0x0af7, 32) // ZC_ACK_REQNAME_BYGID
@@ -4312,7 +4312,11 @@ packetLen(0x0b02, 26) // AC_REFUSE_LOGIN4
packetLen(0x0b03, -1) // ZC_EQUIPWIN_MICROSCOPE_V7
// Packet: 0x0b04
+#if PACKETVER >= 20190605
+packetLen(0x0b04, 72)
+#elif PACKETVER >= 20190116
packetLen(0x0b04, 80)
+#endif
// Packet: 0x0b05
packetLen(0x0b05, 63) // ZC_OFFLINE_STORE_VISIBLE
@@ -4393,12 +4397,16 @@ packetLen(0x0b1d, 2) // ZC_PING
#endif
// Packet: 0x0b1e
-#if PACKETVER >= 20190313
+#if PACKETVER >= 20190626
+packetLen(0x0b1e, 14)
+#elif PACKETVER >= 20190313
packetLen(0x0b1e, 10)
#endif
// Packet: 0x0b1f
-#if PACKETVER >= 20190313
+#if PACKETVER >= 20190626
+packetLen(0x0b1f, 14)
+#elif PACKETVER >= 20190313
packetLen(0x0b1f, 10)
#endif
@@ -4456,14 +4464,18 @@ packetLen(0x0b28, -1)
#endif
// Packet: 0x0b29
-#if PACKETVER >= 20190502
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190502
packetLen(0x0b29, 6)
#elif PACKETVER >= 20190424
packetLen(0x0b29, 3)
#endif
// Packet: 0x0b2a
-#if PACKETVER >= 20190529
+#if PACKETVER >= 20190605
+// removed
+#elif PACKETVER >= 20190529
packetLen(0x0b2a, 40)
#elif PACKETVER >= 20190502
packetLen(0x0b2a, 6)
@@ -4491,7 +4503,7 @@ packetLen(0x0b2e, 4)
// Packet: 0x0b2f
#if PACKETVER >= 20190529
-packetLen(0x0b2f, 73)
+packetLen(0x0b2f, 73) // ZC_PROPERTY_HOMUN_3
#endif
// Packet: 0x0b30
@@ -4499,5 +4511,152 @@ packetLen(0x0b2f, 73)
packetLen(0x0b30, -1)
#endif
+// Packet: 0x0b31
+#if PACKETVER >= 20190626
+packetLen(0x0b31, 17)
+#endif
+
+// Packet: 0x0b32
+#if PACKETVER >= 20190626
+packetLen(0x0b32, -1)
+#endif
+
+// Packet: 0x0b33
+#if PACKETVER >= 20190626
+packetLen(0x0b33, 17)
+#endif
+
+// Packet: 0x0b34
+#if PACKETVER >= 20190724
+packetLen(0x0b34, 50)
+#elif PACKETVER >= 20190626
+packetLen(0x0b34, 26)
+#endif
+
+// Packet: 0x0b35
+#if PACKETVER >= 20190709
+packetLen(0x0b35, 3)
+#endif
+
+// Packet: 0x0b36
+#if PACKETVER >= 20190709
+packetLen(0x0b36, -1)
+#endif
+
+// Packet: 0x0b37
+#if PACKETVER >= 20190724
+packetLen(0x0b37, -1)
+#endif
+
+// Packet: 0x0b38
+#if PACKETVER >= 20190724
+packetLen(0x0b38, -1)
+#endif
+
+// Packet: 0x0b39
+#if PACKETVER >= 20190724
+packetLen(0x0b39, -1)
+#endif
+
+// Packet: 0x0b3a
+#if PACKETVER >= 20190724
+packetLen(0x0b3a, 4)
+#endif
+
+// Packet: 0x0b3b
+#if PACKETVER >= 20190724
+packetLen(0x0b3b, 4)
+#endif
+
+// Packet: 0x0b3c
+#if PACKETVER >= 20190724
+packetLen(0x0b3c, 4)
+#endif
+
+// Packet: 0x0b3d
+#if PACKETVER >= 20190724
+packetLen(0x0b3d, -1)
+#endif
+
+// Packet: 0x0b3e
+#if PACKETVER >= 20190724
+packetLen(0x0b3e, -1)
+#endif
+
+// Packet: 0x0b3f
+#if PACKETVER >= 20190724
+packetLen(0x0b3f, 64)
+#endif
+
+// Packet: 0x0b40
+#if PACKETVER >= 20190724
+packetLen(0x0b40, -1)
+#endif
+
+// Packet: 0x0b41
+#if PACKETVER >= 20190724
+packetLen(0x0b41, 41)
+#endif
+
+// Packet: 0x0b42
+#if PACKETVER >= 20190724
+packetLen(0x0b42, 30)
+#endif
+
+// Packet: 0x0b43
+#if PACKETVER >= 20190724
+packetLen(0x0b43, 47)
+#endif
+
+// Packet: 0x0b44
+#if PACKETVER >= 20190724
+packetLen(0x0b44, 32)
+#endif
+
+// Packet: 0x0b45
+#if PACKETVER >= 20190724
+packetLen(0x0b45, 32)
+#endif
+
+// Packet: 0x0b46
+#if PACKETVER >= 20190724
+packetLen(0x0b46, 10)
+#endif
+
+// Packet: 0x0b47
+#if PACKETVER >= 20190724
+packetLen(0x0b47, 14)
+#endif
+
+// Packet: 0x0b48
+#if PACKETVER >= 20190724
+packetLen(0x0b48, 18)
+#endif
+
+// Packet: 0x0b49
+#if PACKETVER >= 20190724
+packetLen(0x0b49, 4)
+#endif
+
+// Packet: 0x0b4a
+#if PACKETVER >= 20190724
+packetLen(0x0b4a, 6)
+#endif
+
+// Packet: 0x0b4b
+#if PACKETVER >= 20190724
+packetLen(0x0b4b, 4)
+#endif
+
+// Packet: 0x0b4c
+#if PACKETVER >= 20190724
+packetLen(0x0b4c, 2)
+#endif
+
+// Packet: 0x0b4d
+#if PACKETVER >= 20190724
+packetLen(0x0b4d, 6)
+#endif
+
#endif /* COMMON_PACKETS2019_LEN_ZERO_H */
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 97af2afff..2fac5b4a4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2232,26 +2232,56 @@ ACMD(refine)
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!*message || sscanf(message, "%12d %12d", &position, &refine_level) < 2) {
- clif->message(fd, msg_fd(fd,996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,997), EQP_HEAD_LOW); // %d: Lower Headgear
+ clif->message(fd, msg_fd(fd, 996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
+#if PACKETVER > 20100707
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1515), -3); // %d: Refine All Equip (Shadow)
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,998), EQP_HAND_R); // %d: Right Hand
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1514), -2); // %d: Refine All Equip (Costume)
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,999), EQP_GARMENT); // %d: Garment
+#endif
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1513), -1); // %d: Refine All Equip (General)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 997), EQP_HEAD_LOW); // %d: Headgear (Low)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 998), EQP_HAND_R); // Hand (Right)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 999), EQP_GARMENT); // %d: Garment
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1000), EQP_ACC_L); // Accessory (Left)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1001), EQP_ARMOR); // %d: Body Armor
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1002), EQP_HAND_L); // Hand (Left)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1003), EQP_SHOES); // %d: Shoes
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1004), EQP_ACC_R); // Accessory (Right)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1005), EQP_HEAD_TOP); // %d: Headgear (Top)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1006), EQP_HEAD_MID); // %d: Headgear (Mid)
+#if PACKETVER > 20100707
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1503), EQP_COSTUME_HEAD_TOP); // %d: Costume Headgear (Top)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1504), EQP_COSTUME_HEAD_MID); // %d: Costume Headgear (Mid)
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1000), EQP_ACC_L); // %d: Left Accessory
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1505), EQP_COSTUME_HEAD_LOW); // %d: Costume Headgear (Low)
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1001), EQP_ARMOR); // %d: Body Armor
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1506), EQP_COSTUME_GARMENT); // %d: Costume Garment
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1002), EQP_HAND_L); // %d: Left Hand
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1507), EQP_SHADOW_ARMOR); // %d: Shadow Armor
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1003), EQP_SHOES); // %d: Shoes
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1508), EQP_SHADOW_WEAPON); // %d: Shadow Weapon
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1004), EQP_ACC_R); // %d: Right Accessory
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1509), EQP_SHADOW_SHIELD); // %d: Shadow Shield
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1005), EQP_HEAD_TOP); // %d: Top Headgear
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1510), EQP_SHADOW_SHOES); // %d: Shadow Shoes
clif->message(fd, atcmd_output);
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1006), EQP_HEAD_MID); // %d: Mid Headgear
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1511), EQP_SHADOW_ACC_R); // %d: Shadow Accessory (Right)
+ clif->message(fd, atcmd_output);
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1512), EQP_SHADOW_ACC_L); // %d: Shadow Accessory (Left)
+ clif->message(fd, atcmd_output);
+#endif
clif->message(fd, atcmd_output);
return false;
}
@@ -2263,22 +2293,33 @@ ACMD(refine)
int idx = sd->equip_index[j];
if (idx < 0)
continue;
- if(j == EQI_AMMO) continue; /* can't equip ammo */
- if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == idx)
+ if (j == EQI_AMMO)
+ continue; /* can't equip ammo */
+ if (j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == idx)
continue;
- if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == idx)
+ if (j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == idx)
continue;
- if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == idx || sd->equip_index[EQI_HEAD_LOW] == idx))
+ if (j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == idx || sd->equip_index[EQI_HEAD_LOW] == idx))
+ continue;
+ if (j == EQI_COSTUME_MID && sd->equip_index[EQI_COSTUME_LOW] == idx)
+ continue;
+ if (j == EQI_COSTUME_TOP && (sd->equip_index[EQI_COSTUME_MID] == idx || sd->equip_index[EQI_COSTUME_LOW] == idx))
continue;
- if(position && !(sd->status.inventory[idx].equip & position))
+ if (position == -3 && !itemdb_is_shadowequip(sd->status.inventory[idx].equip))
+ continue;
+ else if (position == -2 && !itemdb_is_costumeequip(sd->status.inventory[idx].equip))
+ continue;
+ else if (position == -1 && (itemdb_is_costumeequip(sd->status.inventory[idx].equip) || itemdb_is_shadowequip(sd->status.inventory[idx].equip)))
+ continue;
+ else if (position && !(sd->status.inventory[idx].equip & position))
continue;
final_refine = cap_value(sd->status.inventory[idx].refine + refine_level, 0, MAX_REFINE);
if (sd->status.inventory[idx].refine != final_refine) {
sd->status.inventory[idx].refine = final_refine;
current_position = sd->status.inventory[idx].equip;
- pc->unequipitem(sd, idx, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
+ pc->unequipitem(sd, idx, PCUNEQUIPITEM_RECALC | PCUNEQUIPITEM_FORCE);
clif->refine(fd, 0, idx, sd->status.inventory[idx].refine);
clif->delitem(sd, idx, 1, DELITEM_MATERIALCHANGE);
clif->additem(sd, idx, 1, 0);
@@ -2289,11 +2330,11 @@ ACMD(refine)
}
if (count == 0)
- clif->message(fd, msg_fd(fd,166)); // No item has been refined.
+ clif->message(fd, msg_fd(fd, 166)); // No item has been refined.
else if (count == 1)
- clif->message(fd, msg_fd(fd,167)); // 1 item has been refined.
+ clif->message(fd, msg_fd(fd, 167)); // 1 item has been refined.
else {
- safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,168), count); // %d items have been refined.
+ safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 168), count); // %d items have been refined.
clif->message(fd, atcmd_output);
}
@@ -4464,6 +4505,38 @@ ACMD(unloadnpc)
return true;
}
+/// Unload existing NPC within the NPC file and reload it.
+/// Usage: @reloadnpc npc/sample_npc.txt
+ACMD(reloadnpc)
+{
+ if (!*message) {
+ clif->message(fd, msg_fd(fd, 1385)); // Usage: @unloadnpcfile <file name>
+ return false;
+ } else if (npc->unloadfile(message) == true) {
+ clif->message(fd, msg_fd(fd, 1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
+
+ FILE *fp = fopen(message, "r");
+ // check if script file exists
+ if (fp == NULL) {
+ clif->message(fd, msg_fd(fd, 261));
+ return false;
+ }
+ fclose(fp);
+
+ // add to list of script sources and run it
+ npc->addsrcfile(message);
+ npc->parsesrcfile(message, true);
+ npc->read_event_script();
+
+ clif->message(fd, msg_fd(fd, 262));
+ } else {
+ clif->message(fd, msg_fd(fd, 1387)); // File not found.
+ return false;
+ }
+
+ return true;
+}
+
/*==========================================
* time in txt for time command (by [Yor])
*------------------------------------------*/
@@ -6720,6 +6793,9 @@ ACMD(mute)
*------------------------------------------*/
ACMD(refresh)
{
+ if (sd->npc_id > 0)
+ return false;
+
clif->refresh(sd);
return true;
}
@@ -6731,29 +6807,41 @@ ACMD(refreshall)
iter = mapit_getallusers();
for (iter_sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); iter_sd = BL_UCAST(BL_PC, mapit->next(iter)))
- clif->refresh(iter_sd);
+ if (iter_sd->npc_id <= 0)
+ clif->refresh(iter_sd);
mapit->free(iter);
return true;
}
/*==========================================
- * @identify
+ * @identify / @identifyall
* => GM's magnifier.
*------------------------------------------*/
ACMD(identify)
{
int num = 0;
+ bool identifyall = (strcmpi(info->command, "identifyall") == 0);
- for (int i = 0; i < sd->status.inventorySize; i++) {
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
- num++;
+ if (!identifyall) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify != 1) {
+ num++;
+ }
}
- }
- if (num > 0) {
- clif->item_identify_list(sd);
} else {
- clif->message(fd,msg_fd(fd,1238)); // There are no items to appraise.
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify != 1) {
+ skill->identify(sd, i);
+ num++;
+ }
+ }
}
+
+ if (num == 0)
+ clif->message(fd,msg_fd(fd,1238)); // There are no items to appraise.
+ else if (!identifyall)
+ clif->item_identify_list(sd);
+
return true;
}
@@ -10029,6 +10117,7 @@ static void atcommand_basecommands(void)
ACMD_DEF(refresh),
ACMD_DEF(refreshall),
ACMD_DEF(identify),
+ ACMD_DEF2("identifyall", identify),
ACMD_DEF(misceffect),
ACMD_DEF(mobsearch),
ACMD_DEF(cleanmap),
@@ -10118,6 +10207,7 @@ static void atcommand_basecommands(void)
ACMD_DEF(addperm),
ACMD_DEF2("rmvperm", addperm),
ACMD_DEF(unloadnpcfile),
+ ACMD_DEF(reloadnpc),
ACMD_DEF(cart),
ACMD_DEF(cashmount),
ACMD_DEF(join),
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 4fbf6b93a..f1da2760a 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -41,7 +41,7 @@ struct config_setting_t;
* Defines
**/
#define ATCOMMAND_LENGTH 50
-#define MAX_MSG 1503
+#define MAX_MSG 1516
#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))
diff --git a/src/map/battle.c b/src/map/battle.c
index c40c3afac..37fc03bca 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6321,6 +6321,18 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_
if (sd && sd->state.arrow_atk) //Consume arrow.
battle->consume_ammo(sd, 0, 0);
+ if (target->type == BL_MOB) {
+ struct mob_data *md = BL_CAST(BL_MOB, target);
+ if (md != NULL) {
+ if (md->db->dmg_taken_rate != 100) {
+ if (wd.damage > 0)
+ wd.damage = apply_percentrate64(wd.damage, md->db->dmg_taken_rate, 100);
+ if (wd.damage2 > 0)
+ wd.damage2 = apply_percentrate64(wd.damage2, md->db->dmg_taken_rate, 100);
+ }
+ }
+ }
+
damage = wd.damage + wd.damage2;
if( damage > 0 && src != target ) {
if( sc && sc->data[SC_DUPLELIGHT] && (wd.flag&BF_SHORT) && rnd()%100 <= 10+2*sc->data[SC_DUPLELIGHT]->val1 ){
@@ -7436,6 +7448,8 @@ static const struct battle_data {
{ "critical_max_limit", &battle_config.critical_max, SHRT_MAX, 1, INT_MAX, },
{ "hit_min_limit", &battle_config.hit_min, 1, 1, INT_MAX, },
{ "hit_max_limit", &battle_config.hit_max, SHRT_MAX, 1, INT_MAX, },
+ { "autoloot_adjust", &battle_config.autoloot_adjust, 0, 0, 1, },
+ { "hom_bonus_exp_from_master", &battle_config.hom_bonus_exp_from_master, 10, 0, 100, },
};
static bool battle_set_value_sub(int index, int value)
diff --git a/src/map/battle.h b/src/map/battle.h
index 0ff5135d8..779e360bf 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -478,6 +478,7 @@ struct Battle_Config {
int client_emblem_max_blank_percent;
int hom_max_level;
int hom_S_max_level;
+ int hom_bonus_exp_from_master;
// [BattleGround Settings]
int bg_update_interval;
@@ -605,6 +606,8 @@ struct Battle_Config {
int critical_max;
int hit_min;
int hit_max;
+
+ int autoloot_adjust;
};
/* criteria for battle_config.idletime_critera */
diff --git a/src/map/clif.c b/src/map/clif.c
index 4e8653783..3b7691ae4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1649,7 +1649,9 @@ static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int
p.level = hd->homunculus.level;
p.hunger = hd->homunculus.hunger;
p.intimacy = hd->homunculus.intimacy / 100;
+#if !(PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626)
p.itemId = 0; // equip id
+#endif
#ifdef RENEWAL
p.atk2 = cap_value(hstatus->rhw.atk2, 0, INT16_MAX);
#else
@@ -3909,20 +3911,16 @@ static void clif_arrow_fail(struct map_session_data *sd, int type)
/// 01ad <packet len>.W { <name id>.W }*
static void clif_arrow_create_list(struct map_session_data *sd)
{
- int i, c;
- int fd;
- int len;
- struct PACKET_ZC_MAKINGARROW_LIST *p;
-
nullpo_retv(sd);
- fd = sd->fd;
- len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ int fd = sd->fd;
+ int len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
WFIFOHEAD(fd, len);
- p = WFIFOP(fd, 0);
- p->packetType = 0x1ad;
+ struct PACKET_ZC_MAKINGARROW_LIST *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MAKINGARROW_LIST;
- for (i = 0, c = 0; i < MAX_SKILL_ARROW_DB; i++) {
+ int c = 0;
+ for (int i = 0; i < MAX_SKILL_ARROW_DB; i++) {
int j;
if (skill->dbs->arrow_db[i].nameid > 0
&& (j = pc->search_inventory(sd, skill->dbs->arrow_db[i].nameid)) != INDEX_NOT_FOUND
@@ -3953,17 +3951,16 @@ static void clif_arrow_create_list(struct map_session_data *sd)
/// 1 = success
static void clif_statusupack(struct map_session_data *sd, int type, int ok, int val)
{
- int fd;
-
nullpo_retv(sd);
+ int fd = sd->fd;
- fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0xbc));
- WFIFOW(fd,0)=0xbc;
- WFIFOW(fd,2)=type;
- WFIFOB(fd,4)=ok;
- WFIFOB(fd,5)=cap_value(val,0,UINT8_MAX);
- WFIFOSET(fd,packet_len(0xbc));
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK));
+ struct PACKET_ZC_STATUS_CHANGE_ACK *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_STATUS_CHANGE_ACK;
+ p->sp = type;
+ p->ok = ok;
+ p->value = cap_value(val, 0, UINT8_MAX);
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK));
}
/// Notifies the client about the result of a request to equip an item (ZC_REQ_WEAR_EQUIP_ACK).
@@ -9482,7 +9479,8 @@ static void clif_mobname_normal_ack(int fd, struct block_list *bl)
struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
packet.gid = bl->id;
- memcpy(packet.name, BL_UCCAST(BL_MOB, bl)->db->name, NAME_LENGTH);
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ memcpy(packet.name, md->name, NAME_LENGTH);
#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
struct unit_data *ud = unit->bl2ud(bl);
if (ud != NULL) {
@@ -10825,7 +10823,7 @@ static void clif_hotkeysAll_send(struct map_session_data *sd)
{
#ifdef HOTKEY_SAVING
clif->hotkeys(sd, 0);
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
// send second tab only if data exists
for (int i = MAX_HOTKEYS; i < MAX_HOTKEYS * 2; i++) {
if (sd->status.hotkeys[i].type != 0 || sd->status.hotkeys[i].id != 0 || sd->status.hotkeys[i].lv != 0) {
@@ -10854,7 +10852,7 @@ static void clif_hotkeys_send(struct map_session_data *sd, int tab)
else
p.rotate = sd->status.hotkey_rowshift2;
#endif
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
p.tab = tab;
#endif
const int offset = tab * MAX_HOTKEYS;
@@ -10879,7 +10877,7 @@ static void clif_parse_HotkeyRowShift1(int fd, struct map_session_data *sd)
static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_HotkeyRowShift2(int fd, struct map_session_data *sd)
{
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
const struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 *p = RFIFOP(fd, 0);
if (p->tab == 0)
sd->status.hotkey_rowshift = p->rowshift;
@@ -10911,7 +10909,7 @@ static void clif_parse_Hotkey2(int fd, struct map_session_data *sd) __attribute_
static void clif_parse_Hotkey2(int fd, struct map_session_data *sd)
{
#ifdef HOTKEY_SAVING
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
const struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 *p = RFIFOP(fd, 0);
const unsigned short idx = p->index + p->tab * MAX_HOTKEYS;
Assert_retv(idx < MAX_HOTKEYS_DB);
@@ -15724,60 +15722,95 @@ static void clif_parse_PVPInfo(int fd, struct map_session_data *sd)
/// Ranking list
/// ranking pointlist { <name>.24B <point>.L }*10
-static void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type)
+static void clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type)
{
- const char* name;
- struct fame_list* list;
- int i;
+#if !(PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724)
+ nullpo_retv(ranks);
- nullpo_retv(buf);
- switch( type ) {
+ struct fame_list* list;
+ switch (type) {
case RANKTYPE_BLACKSMITH: list = pc->smith_fame_list; break;
case RANKTYPE_ALCHEMIST: list = pc->chemist_fame_list; break;
case RANKTYPE_TAEKWON: list = pc->taekwon_fame_list; break;
default: return; // Unsupported
}
+ int i;
// Packet size limits this list to 10 elements. [Skotlex]
- for( i = 0; i < 10 && i < MAX_FAME_LIST; i++ ) {
- if( list[i].id > 0 ) {
- if( strcmp(list[i].name, "-") == 0 && (name = map->charid2nick(list[i].id)) != NULL ) {
- strncpy(WBUFP(buf, 24 * i), name, NAME_LENGTH);
+ for (i = 0; i < 10 && i < MAX_FAME_LIST; i++) {
+ if (list[i].id > 0) {
+ const char* name;
+ if (strcmp(list[i].name, "-") == 0 && (name = map->charid2nick(list[i].id)) != NULL) {
+ strncpy(ranks[i].name, name, NAME_LENGTH);
} else {
- strncpy(WBUFP(buf, 24 * i), list[i].name, NAME_LENGTH);
+ strncpy(ranks[i].name, list[i].name, NAME_LENGTH);
}
} else {
- strncpy(WBUFP(buf, 24 * i), "None", 5);
+ strncpy(ranks[i].name, "None", 5);
}
- WBUFL(buf, 24 * 10 + i * 4) = list[i].fame; //points
+ ranks[i].points = list[i].fame; //points
}
- for( ;i < 10; i++ ) { // In case the MAX is less than 10.
- strncpy(WBUFP(buf, 24 * i), "Unavailable", 12);
- WBUFL(buf, 24 * 10 + i * 4) = 0;
+ for (;i < 10; i++) { // In case the MAX is less than 10.
+ strncpy(ranks[i].name, "Unavailable", 12);
+ ranks[i].points = 0;
}
+#endif
+}
+
+static void clif_ranklist_sub2(uint32 *chars, uint32 *points, enum fame_list_type type)
+{
+#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+ nullpo_retv(chars);
+ nullpo_retv(points);
+
+ struct fame_list* list;
+ switch (type) {
+ case RANKTYPE_BLACKSMITH: list = pc->smith_fame_list; break;
+ case RANKTYPE_ALCHEMIST: list = pc->chemist_fame_list; break;
+ case RANKTYPE_TAEKWON: list = pc->taekwon_fame_list; break;
+ default: return; // Unsupported
+ }
+
+ int i;
+ // Packet size limits this list to 10 elements. [Skotlex]
+ for (i = 0; i < 10 && i < MAX_FAME_LIST; i++) {
+ if (list[i].id > 0) {
+ chars[i] = list[i].id;
+ } else {
+ chars[i] = 0;
+ }
+ points[i] = list[i].fame; //points
+ }
+ for (;i < 10; i++) { // In case the MAX is less than 10.
+ chars[i] = 0;
+ points[i] = 0;
+ }
+#endif
}
/// 097d <RankingType>.W {<CharName>.24B <point>L}*10 <mypoint>L (ZC_ACK_RANKING)
static void clif_ranklist(struct map_session_data *sd, enum fame_list_type type)
{
-#if PACKETVER >= 20120502
- int fd;
- int len = packet_len(0x97d);
-
+#if PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO)
nullpo_retv(sd);
- fd = sd->fd;
- WFIFOHEAD(fd, len);
- WFIFOW(fd, 0) = 0x97d;
- WFIFOW(fd, 2) = type;
- clif_ranklist_sub(WFIFOP(fd,4), type);
+ int fd = sd->fd;
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_ACK_RANKING));
+ struct PACKET_ZC_ACK_RANKING *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_ACK_RANKING;
+ p->rankType = type;
+#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+ clif->ranklist_sub2(p->chars, p->points, type);
+#else
+ clif->ranklist_sub(p->ranks, type);
+#endif
if (pc->famelist_type(sd->job) == type) {
- WFIFOL(fd, 284) = sd->status.fame; //mypoint
+ p->myPoints = sd->status.fame; //mypoint
} else {
- WFIFOL(fd, 284) = 0; //mypoint
+ p->myPoints = 0; //mypoint
}
- WFIFOSET(fd, len);
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_ACK_RANKING));
#endif
}
@@ -15827,14 +15860,16 @@ static void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list
/// 0219 { <name>.24B }*10 { <point>.L }*10
static void clif_blacksmith(struct map_session_data *sd)
{
+#if !(PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO))
int fd;
nullpo_retv(sd);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x219));
WFIFOW(fd,0) = 0x219;
- clif_ranklist_sub(WFIFOP(fd, 2), RANKTYPE_BLACKSMITH);
+ clif->ranklist_sub(WFIFOP(fd, 2), RANKTYPE_BLACKSMITH);
WFIFOSET(fd, packet_len(0x219));
+#endif
}
static void clif_parse_Blacksmith(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -15864,14 +15899,16 @@ static void clif_fame_blacksmith(struct map_session_data *sd, int points)
/// 021a { <name>.24B }*10 { <point>.L }*10
static void clif_alchemist(struct map_session_data *sd)
{
+#if !(PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO))
int fd;
nullpo_retv(sd);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x21a));
WFIFOW(fd,0) = 0x21a;
- clif_ranklist_sub(WFIFOP(fd,2), RANKTYPE_ALCHEMIST);
+ clif->ranklist_sub(WFIFOP(fd,2), RANKTYPE_ALCHEMIST);
WFIFOSET(fd, packet_len(0x21a));
+#endif
}
static void clif_parse_Alchemist(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -15901,14 +15938,16 @@ static void clif_fame_alchemist(struct map_session_data *sd, int points)
/// 0226 { <name>.24B }*10 { <point>.L }*10
static void clif_taekwon(struct map_session_data *sd)
{
+#if !(PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO))
int fd;
nullpo_retv(sd);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x226));
WFIFOW(fd,0) = 0x226;
- clif_ranklist_sub(WFIFOP(fd,2), RANKTYPE_TAEKWON);
+ clif->ranklist_sub(WFIFOP(fd,2), RANKTYPE_TAEKWON);
WFIFOSET(fd, packet_len(0x226));
+#endif
}
static void clif_parse_Taekwon(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
@@ -19029,27 +19068,30 @@ static void clif_parse_debug(int fd, struct map_session_data *sd)
*------------------------------------------*/
static int clif_elementalconverter_list(struct map_session_data *sd)
{
- int i,c,view,fd;
-
nullpo_ret(sd);
/// Main client packet processing function
- fd=sd->fd;
- WFIFOHEAD(fd, MAX_SKILL_PRODUCE_DB *2+4);
- WFIFOW(fd, 0)=0x1ad;
+ int fd = sd->fd;
+ int len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_MAKINGARROW_LIST *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MAKINGARROW_LIST;
- for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
- if( skill->can_produce_mix(sd,skill->dbs->produce_db[i].nameid,23, 1) ){
- if((view = itemdb_viewid(skill->dbs->produce_db[i].nameid)) > 0)
- WFIFOW(fd,c*2+ 4)= view;
+ int c = 0;
+ for (int i = 0; i < MAX_SKILL_PRODUCE_DB; i++) {
+ if (skill->can_produce_mix(sd,skill->dbs->produce_db[i].nameid,23, 1) ) {
+ int view = itemdb_viewid(skill->dbs->produce_db[i].nameid);
+ if (view > 0)
+ p->items[c].itemId = view;
else
- WFIFOW(fd,c*2+ 4)= skill->dbs->produce_db[i].nameid;
+ p->items[c].itemId = skill->dbs->produce_db[i].nameid;
c++;
}
}
- WFIFOW(fd,2) = c*2+4;
- WFIFOSET(fd, WFIFOW(fd,2));
if (c > 0) {
+ len = c * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ p->packetLength = len;
+ WFIFOSET(fd, len);
sd->menuskill_id = SA_CREATECON;
sd->menuskill_val = c;
}
@@ -19080,33 +19122,33 @@ static void clif_millenniumshield(struct block_list *bl, short shields)
*------------------------------------------*/
static int clif_spellbook_list(struct map_session_data *sd)
{
- int i, c;
- int fd;
-
nullpo_ret(sd);
- fd = sd->fd;
- WFIFOHEAD(fd, 8 * 8 + 8);
- WFIFOW(fd,0) = 0x1ad;
+ int fd = sd->fd;
+ int len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_MAKINGARROW_LIST *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MAKINGARROW_LIST;
- for (i = 0, c = 0; i < sd->status.inventorySize; i ++ )
+ int c = 0;
+ for (int i = 0; i < sd->status.inventorySize; i ++ )
{
- if( itemdb_is_spellbook(sd->status.inventory[i].nameid) )
+ if (itemdb_is_spellbook(sd->status.inventory[i].nameid))
{
- WFIFOW(fd, c * 2 + 4) = sd->status.inventory[i].nameid;
+ p->items[c].itemId = sd->status.inventory[i].nameid;
c++;
}
}
- if( c > 0 )
+ if (c > 0)
{
- WFIFOW(fd,2) = c * 2 + 4;
- WFIFOSET(fd, WFIFOW(fd, 2));
+ len = c * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ p->packetLength = len;
+ WFIFOSET(fd, len);
sd->menuskill_id = WL_READING_SB;
sd->menuskill_val = c;
- }
- else{
- status_change_end(&sd->bl,SC_STOP,INVALID_TIMER);
+ } else {
+ status_change_end(&sd->bl, SC_STOP, INVALID_TIMER);
clif->skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK, 0, 0);
}
@@ -19121,17 +19163,18 @@ static int clif_spellbook_list(struct map_session_data *sd)
static int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y)
{
int i, c;
- int fd;
nullpo_ret(sd);
- fd = sd->fd;
- WFIFOHEAD(fd, 8 * 8 + 8);
- WFIFOW(fd,0) = 0x1ad; // This is the official packet. [pakpil]
+ int fd = sd->fd;
+ int len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_MAKINGARROW_LIST *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MAKINGARROW_LIST;
for (i = 0, c = 0; i < sd->status.inventorySize; i ++) {
- if( itemdb_is_element(sd->status.inventory[i].nameid) ) {
- WFIFOW(fd, c * 2 + 4) = sd->status.inventory[i].nameid;
+ if (itemdb_is_element(sd->status.inventory[i].nameid)) {
+ p->items[c].itemId = sd->status.inventory[i].nameid;
c ++;
}
}
@@ -19140,8 +19183,10 @@ static int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, sh
sd->menuskill_val = skill_lv;
sd->sc.comet_x = x;
sd->sc.comet_y = y;
- WFIFOW(fd,2) = c * 2 + 4;
- WFIFOSET(fd, WFIFOW(fd, 2));
+
+ len = c * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ p->packetLength = len;
+ WFIFOSET(fd, len);
} else {
clif->skill_fail(sd, NC_MAGICDECOY, USESKILL_FAIL_LEVEL, 0, 0);
return 0;
@@ -19158,25 +19203,28 @@ static int clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, sh
static int clif_poison_list(struct map_session_data *sd, uint16 skill_lv)
{
int i, c;
- int fd;
nullpo_ret(sd);
- fd = sd->fd;
- WFIFOHEAD(fd, 8 * 8 + 8);
- WFIFOW(fd,0) = 0x1ad; // This is the official packet. [pakpil]
+ int fd = sd->fd;
+ int len = MAX_SKILL_ARROW_DB * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ WFIFOHEAD(fd, len);
+ struct PACKET_ZC_MAKINGARROW_LIST *p = WFIFOP(fd, 0);
+ p->packetType = HEADER_ZC_MAKINGARROW_LIST;
for (i = 0, c = 0; i < sd->status.inventorySize; i ++) {
if( itemdb_is_poison(sd->status.inventory[i].nameid) ) {
- WFIFOW(fd, c * 2 + 4) = sd->status.inventory[i].nameid;
+ p->items[c].itemId = sd->status.inventory[i].nameid;
c ++;
}
}
- if( c > 0 ) {
+ if (c > 0) {
sd->menuskill_id = GC_POISONINGWEAPON;
sd->menuskill_val = skill_lv;
- WFIFOW(fd,2) = c * 2 + 4;
- WFIFOSET(fd, WFIFOW(fd, 2));
+
+ len = c * sizeof(struct PACKET_ZC_MAKINGARROW_LIST_sub) + sizeof(struct PACKET_ZC_MAKINGARROW_LIST);
+ p->packetLength = len;
+ WFIFOSET(fd, len);
} else {
clif->skill_fail(sd, GC_POISONINGWEAPON, USESKILL_FAIL_GUILLONTINE_POISON, 0, 0);
return 0;
@@ -21935,53 +21983,47 @@ static void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, ui
/// 0A3B <Length>.W <AID>.L <Status>.B { <HatEffectId>.W }
static void clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_target target)
{
-#if PACKETVER >= 20150422
- unsigned char *buf;
- int len, i;
- struct map_session_data *sd;
-
+#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
nullpo_retv(bl);
-
- sd = BL_CAST(BL_PC, bl);
-
+ struct map_session_data *sd = BL_CAST(BL_PC, bl);
nullpo_retv(sd);
- len = 9 + VECTOR_LENGTH(sd->hatEffectId) * 2;
+ const int len = sizeof(struct PACKET_ZC_HAT_EFFECT) + VECTOR_LENGTH(sd->hatEffectId) * 2;
+ struct PACKET_ZC_HAT_EFFECT *p = aMalloc(len);
- buf = (unsigned char*)aMalloc(len);
-
- WBUFW(buf, 0) = 0xa3b;
- WBUFW(buf, 2) = len;
- WBUFL(buf, 4) = bl->id;
- WBUFB(buf, 8) = 1;
+ p->packetType = HEADER_ZC_HAT_EFFECT;
+ p->packetLength = len;
+ p->aid = bl->id;
+ p->status = 1;
- for( i = 0; i < VECTOR_LENGTH(sd->hatEffectId); i++ ){
- WBUFW(buf, 9 + i * 2) = VECTOR_INDEX(sd->hatEffectId, i);
+ for (int i = 0; i < VECTOR_LENGTH(sd->hatEffectId); i++) {
+ p->effects[i] = VECTOR_INDEX(sd->hatEffectId, i);
}
if (tbl != NULL) {
- clif->send(buf, len, tbl, target);
+ clif->send(p, len, tbl, target);
} else {
- clif->send(buf, len, bl, target);
+ clif->send(p, len, bl, target);
}
-
- aFree(buf);
+ aFree(p);
#endif
}
static void clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable){
-#if PACKETVER >= 20150422
- unsigned char buf[13];
-
+#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
nullpo_retv(bl);
- WBUFW(buf,0) = 0xa3b;
- WBUFW(buf,2) = 13;
- WBUFL(buf,4) = bl->id;
- WBUFB(buf,8) = enable;
- WBUFL(buf,9) = effectId;
+ const int len = sizeof(struct PACKET_ZC_HAT_EFFECT) + 2;
+ struct PACKET_ZC_HAT_EFFECT *p = aMalloc(len);
- clif->send(buf, 13, bl, AREA);
+ p->packetType = HEADER_ZC_HAT_EFFECT;
+ p->packetLength = len;
+ p->aid = bl->id;
+ p->status = enable;
+ p->effects[0] = effectId;
+
+ clif->send(p, len, bl, AREA);
+ aFree(p);
#endif
}
@@ -23119,6 +23161,8 @@ void clif_defaults(void)
clif->fame_alchemist = clif_fame_alchemist;
clif->fame_taekwon = clif_fame_taekwon;
clif->ranklist = clif_ranklist;
+ clif->ranklist_sub = clif_ranklist_sub;
+ clif->ranklist_sub2 = clif_ranklist_sub2;
clif->pRanklist = clif_parse_ranklist;
clif->update_rankingpoint = clif_update_rankingpoint;
clif->hotkeys = clif_hotkeys_send;
diff --git a/src/map/clif.h b/src/map/clif.h
index 5c28f80dd..ca7ae35b0 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -56,6 +56,7 @@ struct unit_data;
struct view_data;
struct achievement_data; // map/achievement.h
struct s_refine_requirement;
+struct PACKET_ZC_ACK_RANKING_sub;
enum clif_messages;
enum rodex_add_item;
@@ -849,6 +850,8 @@ struct clif_interface {
void (*fame_alchemist) (struct map_session_data *sd, int points);
void (*fame_taekwon) (struct map_session_data *sd, int points);
void (*ranklist) (struct map_session_data *sd, enum fame_list_type type);
+ void (*ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type);
+ void (*ranklist_sub2) (uint32 *chars, uint32 *points, enum fame_list_type type);
void (*update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points);
void (*pRanklist) (int fd, struct map_session_data *sd);
void (*hotkeys) (struct map_session_data *sd, int tab);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index f3a4c559a..d3e815872 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -552,6 +552,12 @@ static int homunculus_gainexp(struct homun_data *hd, unsigned int exp)
hd->homunculus.exp += exp;
+ if (hd->master->state.showexp && hd->exp_next > 0) {
+ char output[256];
+ sprintf(output, "Homunculus Experience Gained Base:%u (%.2f%%)", exp, ((float)exp / (float)hd->exp_next * (float)100));
+ clif_disp_onlyself(hd->master, output);
+ }
+
if(hd->homunculus.exp < hd->exp_next) {
clif->hominfo(hd->master,hd,0);
return 0;
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index e032def0c..f66abe066 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -521,7 +521,8 @@ struct item_data {
unsigned no_refine : 1; // [celest]
unsigned delay_consume : 1; ///< Signifies items that are not consumed immediately upon double-click [Skotlex]
unsigned trade_restriction : 9; ///< Item trade restrictions mask (@see enum ItemTradeRestrictions)
- unsigned autoequip: 1;
+ unsigned autoequip : 1;
+ unsigned auto_favorite : 1;
unsigned buyingstore : 1;
unsigned bindonequip : 1;
unsigned keepafteruse : 1;
diff --git a/src/map/messages_main.h b/src/map/messages_main.h
index b9458e374..4f75d5071 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: 20190522
+Latest version: 20190724
*/
enum clif_messages {
@@ -21708,10 +21708,17 @@ AP
상업도/방어도 확인
*/
MSG_ID_E2E = 0xe2e,
-/*20190522 to latest
+/*20190522 to 20190605
관리영지 "%s"(으)로 이동하시겠습니까?
(1회 이동 시 마다 1,000제니가 소모됩니다.
공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+20190619 to 20190619
+관리영지 "%s"(으)로 이동하시겠습니까?
+이동 시 마다 %d제니가 소모됩니다.
+20190703 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+이동 시 마다 %d제니가 소모됩니다.
+(공성전 시간에는 %d제니가 소모됩니다.)
*/
MSG_ID_E2F = 0xe2f,
/*20190522 to latest
@@ -21722,11 +21729,60 @@ AP
상업도: %d / %d
*/
MSG_ID_E30 = 0xe30,
-/*20190522 to latest
+/*20190522 to 20190717
공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+20190717 to latest
+공성 영지에서는 사용할 수 없는 기능입니다.
*/
MSG_ID_E31 = 0xe31,
#endif
+#if PACKETVER >= 20190619
+/*20190619 to latest
+기본 기능 스킬을 습득하지 않은 캐릭터입니다.
+*/
+ MSG_ID_E32 = 0xe32,
+#endif
+#if PACKETVER >= 20190703
+/*20190703 to latest
+접속하신 IP는 라그나로크 제로 이용이 불가능합니다.
+고객센터 또는 홈페이지로 문의해 주십시오.
+*/
+ MSG_ID_E33 = 0xe33,
+#endif
+#if PACKETVER >= 20190717
+/*20190717 to latest
+탑승/장착 해제
+*/
+ MSG_ID_E34 = 0xe34,
+/*20190717 to latest
+가져오기
+*/
+ MSG_ID_E35 = 0xe35,
+/*20190717 to latest
+직전 노점에 등록된 아이템 정보를 가져옵니다.
+*/
+ MSG_ID_E36 = 0xe36,
+/*20190717 to latest
+서버 이슈로 인해 로그인이 제한되고 있습니다.
+*/
+ MSG_ID_E37 = 0xe37,
+/*20190717 to latest
+메시지
+*/
+ MSG_ID_E38 = 0xe38,
+/*20190717 to latest
++18 이상만 플레이가 가능합니다.
+*/
+ MSG_ID_E39 = 0xe39,
+/*20190717 to latest
+3시간 이상의 게임 플레이를 권장하지 않습니다.
+*/
+ MSG_ID_E3A = 0xe3a,
+/*20190717 to latest
+AP가 부족합니다.
+*/
+ MSG_ID_E3B = 0xe3b,
+#endif
};
#endif /* MAP_MESSAGES_MAIN_H */
diff --git a/src/map/messages_re.h b/src/map/messages_re.h
index 3a434ca29..6a20844e4 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: 20190522
+Latest version: 20190717
*/
enum clif_messages {
@@ -21187,10 +21187,17 @@ AP
상업도/방어도 확인
*/
MSG_ID_E2E = 0xe2e,
-/*20190522 to latest
+/*20190522 to 20190605
관리영지 "%s"(으)로 이동하시겠습니까?
(1회 이동 시 마다 1,000제니가 소모됩니다.
공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+20190619 to 20190626
+관리영지 "%s"(으)로 이동하시겠습니까?
+이동 시 마다 %d제니가 소모됩니다.
+20190703 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+이동 시 마다 %d제니가 소모됩니다.
+(공성전 시간에는 %d제니가 소모됩니다.)
*/
MSG_ID_E2F = 0xe2f,
/*20190522 to latest
@@ -21201,11 +21208,60 @@ AP
상업도: %d / %d
*/
MSG_ID_E30 = 0xe30,
-/*20190522 to latest
+/*20190522 to 20190703
공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+20190717 to latest
+공성 영지에서는 사용할 수 없는 기능입니다.
*/
MSG_ID_E31 = 0xe31,
#endif
+#if PACKETVER >= 20190619
+/*20190619 to latest
+기본 기능 스킬을 습득하지 않은 캐릭터입니다.
+*/
+ MSG_ID_E32 = 0xe32,
+#endif
+#if PACKETVER >= 20190703
+/*20190703 to latest
+접속하신 IP는 라그나로크 제로 이용이 불가능합니다.
+고객센터 또는 홈페이지로 문의해 주십시오.
+*/
+ MSG_ID_E33 = 0xe33,
+#endif
+#if PACKETVER >= 20190717
+/*20190717 to latest
+탑승/장착 해제
+*/
+ MSG_ID_E34 = 0xe34,
+/*20190717 to latest
+가져오기
+*/
+ MSG_ID_E35 = 0xe35,
+/*20190717 to latest
+직전 노점에 등록된 아이템 정보를 가져옵니다.
+*/
+ MSG_ID_E36 = 0xe36,
+/*20190717 to latest
+서버 이슈로 인해 로그인이 제한되고 있습니다.
+*/
+ MSG_ID_E37 = 0xe37,
+/*20190717 to latest
+메시지
+*/
+ MSG_ID_E38 = 0xe38,
+/*20190717 to latest
++18 이상만 플레이가 가능합니다.
+*/
+ MSG_ID_E39 = 0xe39,
+/*20190717 to latest
+3시간 이상의 게임 플레이를 권장하지 않습니다.
+*/
+ MSG_ID_E3A = 0xe3a,
+/*20190717 to latest
+AP가 부족합니다.
+*/
+ MSG_ID_E3B = 0xe3b,
+#endif
};
#endif /* MAP_MESSAGES_RE_H */
diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index 43f8b4f31..b9ddb229c 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: 20190515
+Latest version: 20190724
*/
enum clif_messages {
@@ -17793,10 +17793,14 @@ AP
상업도/방어도 확인
*/
MSG_ID_E2E = 0xe2e,
-/*20190515 to latest
+/*20190515 to 20190605
관리영지 "%s"(으)로 이동하시겠습니까?
(1회 이동 시 마다 1,000제니가 소모됩니다.
공성전 시간에는 제니의 소모가 100배로 증가합니다.)
+20190626 to latest
+관리영지 "%s"(으)로 이동하시겠습니까?
+이동 시 마다 %d제니가 소모됩니다.
+(공성전 시간에는 %d제니가 소모됩니다.)
*/
MSG_ID_E2F = 0xe2f,
/*20190515 to latest
@@ -17807,11 +17811,72 @@ AP
상업도: %d / %d
*/
MSG_ID_E30 = 0xe30,
-/*20190515 to latest
+/*20190515 to 20190717
공성 영지 내에서는 다른 공성 영지로 이동 할 수 없습니다.
+20190724 to latest
+공성 영지에서는 사용할 수 없는 기능입니다.
*/
MSG_ID_E31 = 0xe31,
#endif
+#if PACKETVER >= 20190626
+/*20190626 to latest
+기본 기능 스킬을 습득하지 않은 캐릭터입니다.
+*/
+ MSG_ID_E32 = 0xe32,
+/*20190626 to latest
+접속하신 IP는 라그나로크 제로 이용이 불가능합니다.
+고객센터 또는 홈페이지로 문의해 주십시오.
+*/
+ MSG_ID_E33 = 0xe33,
+#endif
+#if PACKETVER >= 20190709
+/*20190709 to latest
+탑승/장착 해제
+*/
+ MSG_ID_E34 = 0xe34,
+/*20190709 to latest
+가져오기
+*/
+ MSG_ID_E35 = 0xe35,
+/*20190709 to latest
+직전 노점에 등록된 아이템 정보를 가져옵니다.
+*/
+ MSG_ID_E36 = 0xe36,
+/*20190709 to latest
+서버 이슈로 인해 로그인이 제한되고 있습니다.
+*/
+ MSG_ID_E37 = 0xe37,
+/*20190709 to latest
+메시지
+*/
+ MSG_ID_E38 = 0xe38,
+/*20190709 to latest
++18 이상만 플레이가 가능합니다.
+*/
+ MSG_ID_E39 = 0xe39,
+/*20190709 to latest
+3시간 이상의 게임 플레이를 권장하지 않습니다.
+*/
+ MSG_ID_E3A = 0xe3a,
+/*20190709 to latest
+AP가 부족합니다.
+*/
+ MSG_ID_E3B = 0xe3b,
+#endif
+#if PACKETVER >= 20190724
+/*20190724 to latest
+제련도가 높아서 조합할 수 없습니다.
+*/
+ MSG_ID_E3C = 0xe3c,
+/*20190724 to latest
+제련도가 조합에 필요한 요구치보다 높습니다.
+*/
+ MSG_ID_E3D = 0xe3d,
+/*20190724 to latest
+'카드가 끼워져있거나 인챈트 되어 있습니다.
+*/
+ MSG_ID_E3E = 0xe3e,
+#endif
};
#endif /* MAP_MESSAGES_ZERO_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index 8511f8523..283bec25a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2570,7 +2570,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type)
// Announce first, or else ditem will be freed. [Lance]
// By popular demand, use base drop rate for autoloot code. [Skotlex]
- mob->item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly);
+ mob->item_drop(md, dlist, ditem, 0, battle_config.autoloot_adjust ? drop_rate : md->db->dropitem[i].p, homkillonly);
}
// Ore Discovery [Celest]
@@ -4604,6 +4604,7 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou
* AttackMotion: attack motion
* DamageMotion: damage motion
* MvpExp: mvp experience
+ * DamageTakenRate: damage taken rate
* MvpDrops: {
* AegisName: chance
* ...
@@ -4837,6 +4838,12 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou
}
}
+ if (mob->lookup_const(mobt, "DamageTakenRate", &i32) && i32 >= 0) {
+ md.dmg_taken_rate = cap_value(i32, 1, INT_MAX);
+ } else if (!inherit) {
+ md.dmg_taken_rate = 100;
+ }
+
mob->read_db_additional_fields(&md, mobt, n, source);
return mob->db_validate_entry(&md, n, source);
@@ -5547,6 +5554,29 @@ static int mob_final_ratio_sub(union DBKey key, struct DBData *data, va_list ap)
return 0;
}
+static int mob_reload_sub_mob(struct mob_data *md, va_list args)
+{
+ nullpo_ret(md);
+ md->db = mob_db(md->class_);
+
+ status_calc_mob(md, SCO_FIRST);
+
+ // If the view data was not overwritten manually
+ if (md->vd != NULL) {
+ // Get the new view data from the mob database
+ md->vd = mob_get_viewdata(md->class_);
+
+ // If they are spawned right now
+ if (md->bl.prev != NULL) {
+ // Respawn all mobs on client side so that they are displayed correctly(if their view id changed)
+ clif->clearunit_area(&md->bl, CLR_OUTSIGHT);
+ clif->spawn(&md->bl);
+ }
+ }
+
+ return 0;
+}
+
static void mob_reload(void)
{
int i;
@@ -5570,6 +5600,7 @@ static void mob_reload(void)
mob->destroy_drop_groups();
mob->load(false);
+ map->foreachmob(mob->reload_sub_mob);
}
/**
@@ -5726,6 +5757,7 @@ void mob_defaults(void)
/* */
mob->reload = mob_reload;
+ mob->reload_sub_mob = mob_reload_sub_mob;
mob->init = do_init_mob;
mob->final = do_final_mob;
/* */
diff --git a/src/map/mob.h b/src/map/mob.h
index b63efd272..a48c4cc74 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -206,6 +206,7 @@ struct mob_db {
unsigned int option;
int summonper[MAX_RANDOMMONSTER];
int maxskill;
+ int dmg_taken_rate;
struct mob_skill skill[MAX_MOBSKILL];
struct spawn_info spawn[10];
struct hplugin_data_store *hdata; ///< HPM Plugin Data Store
@@ -244,6 +245,7 @@ struct mob_data {
unsigned int dmg;
unsigned int flag : 2; //0: Normal. 1: Homunc exp. 2: Pet exp
} dmglog[DAMAGELOG_SIZE];
+ int dmg_taken_rate;
struct spawn_data *spawn; //Spawn data.
int spawn_timer; //Required for Convex Mirror
struct item *lootitem;
@@ -488,6 +490,7 @@ struct mob_interface {
int (*init) (bool mimimal);
int (*final) (void);
void (*reload) (void);
+ int (*reload_sub_mob) (struct mob_data *md, va_list args);
/* */
struct mob_db* (*db) (int index);
struct mob_chat* (*chat) (short id);
diff --git a/src/map/npc.c b/src/map/npc.c
index c7fc7e133..fea82c873 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -4368,8 +4368,7 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char
if (!strcmpi(w3, "nosave")) {
char savemap[32];
int savex, savey;
- if (state == 0)
- ; //Map flag disabled.
+ if (state == 0); //Map flag disabled.
else if (w4 && !strcmpi(w4, "SavePoint")) {
map->list[m].save.map = 0;
map->list[m].save.x = -1;
@@ -4662,7 +4661,8 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char
}
}
- if( modifier[0] == '\0' ) {
+ if (state == 0); //Map flag disabled.
+ else if (modifier[0] == '\0') {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
} else if( !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) ) {
@@ -4721,7 +4721,8 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char
}
}
- if( modifier[0] == '\0' ) {
+ if (state == 0); //Map flag disabled.
+ else if (modifier[0] == '\0') {
ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer));
if (retval) *retval = EXIT_FAILURE;
} else if( !( skill_id = skill->name2id(skill_name) ) ) {
diff --git a/src/map/packets.h b/src/map/packets.h
index 45b47c921..83a9d0322 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1949,7 +1949,7 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0b1c,clif->pPing);
#endif
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
packet(0x0b21,clif->pHotkey2);
packet(0x0b22,clif->pHotkeyRowShift2); // CZ_SHORTCUTKEYBAR_ROTATE
#endif
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 6c1cc151a..601c7dc86 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, 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, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE
+// 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, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE
#if PACKETVER == 20101123 || \
PACKETVER == 20101124 || \
PACKETVER == 20101125 || \
@@ -152,7 +152,13 @@
PACKETVER == 20190522 || \
PACKETVER == 20190523 || \
PACKETVER == 20190529 || \
- PACKETVER >= 20190530
+ PACKETVER == 20190530 || \
+ PACKETVER == 20190605 || \
+ PACKETVER == 20190619 || \
+ PACKETVER == 20190626 || \
+ PACKETVER == 20190703 || \
+ PACKETVER == 20190717 || \
+ PACKETVER >= 20190724
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index c9a1a1ff0..8eea0214c 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, 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, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_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, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero
#if PACKETVER == 20171018 || \
PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
@@ -84,7 +84,13 @@
PACKETVER == 20190508 || \
PACKETVER == 20190515 || \
PACKETVER == 20190529 || \
- PACKETVER >= 20190530
+ PACKETVER == 20190530 || \
+ PACKETVER == 20190605 || \
+ PACKETVER == 20190626 || \
+ PACKETVER == 20190709 || \
+ PACKETVER == 20190710 || \
+ PACKETVER == 20190717 || \
+ PACKETVER >= 20190724
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 016de4e26..1fef4cd25 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -9727,7 +9727,7 @@
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, 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, 2019-04-17aRagexe, 2019-04-18aRagexe, 2019-05-08cRagexe, 2019-05-22bRagexe, 2019-05-22cRagexe, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29cRagexe, 2019-05-30aRagexe
+// 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, 2019-04-17aRagexe, 2019-04-18aRagexe, 2019-05-08cRagexe, 2019-05-22bRagexe, 2019-05-22cRagexe, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29cRagexe, 2019-05-30aRagexe, 2019-06-05fRagexe, 2019-06-05KRagexe, 2019-06-19bRagexe, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-07-03aRagexe, 2019-07-17aRagexe, 2019-07-17dRagexe, 2019-07-24aRagexe
#if PACKETVER == 20181121 || \
PACKETVER == 20181128 || \
PACKETVER == 20181205 || \
@@ -9752,7 +9752,12 @@
PACKETVER == 20190522 || \
PACKETVER == 20190523 || \
PACKETVER == 20190529 || \
- PACKETVER >= 20190530
+ PACKETVER == 20190530 || \
+ PACKETVER == 20190605 || \
+ PACKETVER == 20190619 || \
+ PACKETVER == 20190703 || \
+ PACKETVER == 20190717 || \
+ PACKETVER >= 20190724
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 9c02161ff..ce789b837 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, 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, 2019-04-17cRagexeRE, 2019-04-18aRagexeRE, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexeRE, 2019-05-22cRagexeRE, 2019-05-29bRagexeRE, 2019-05-29cRagexeRE, 2019-05-30aRagexeRE
+// 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, 2019-04-17cRagexeRE, 2019-04-18aRagexeRE, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexeRE, 2019-05-22cRagexeRE, 2019-05-29bRagexeRE, 2019-05-29cRagexeRE, 2019-05-30aRagexeRE, 2019-06-05hRagexeRE, 2019-06-05JRagexeRE, 2019-06-05LRagexeRE, 2019-06-19cRagexeRE, 2019-06-26bRagexeRE, 2019-07-03bRagexeRE, 2019-07-17cRagexeRE, 2019-07-17dRagexeRE, 2019-07-24bRagexeRE
#if PACKETVER == 20180704 || \
PACKETVER == 20180711 || \
PACKETVER == 20180718 || \
@@ -9701,7 +9701,13 @@
PACKETVER == 20190508 || \
PACKETVER == 20190522 || \
PACKETVER == 20190529 || \
- PACKETVER >= 20190530
+ PACKETVER == 20190530 || \
+ PACKETVER == 20190605 || \
+ PACKETVER == 20190619 || \
+ PACKETVER == 20190626 || \
+ PACKETVER == 20190703 || \
+ PACKETVER == 20190717 || \
+ PACKETVER >= 20190724
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 bbf44cbc8..6e42253fe 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -742,7 +742,7 @@
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, 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, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_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, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero
#if PACKETVER == 20181114 || \
PACKETVER == 20181120 || \
PACKETVER == 20181128 || \
@@ -764,7 +764,13 @@
PACKETVER == 20190508 || \
PACKETVER == 20190515 || \
PACKETVER == 20190529 || \
- PACKETVER >= 20190530
+ PACKETVER == 20190530 || \
+ PACKETVER == 20190605 || \
+ PACKETVER == 20190626 || \
+ PACKETVER == 20190709 || \
+ PACKETVER == 20190710 || \
+ PACKETVER == 20190717 || \
+ PACKETVER >= 20190724
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 2da1ece9e..59f148c94 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1423,7 +1423,7 @@ struct hotkey_data {
int16 count; // Item Quantity/Skill Level
} __attribute__((packed));
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
#define MAX_HOTKEYS_PACKET 38
struct PACKET_ZC_SHORTCUT_KEY_LIST {
int16 packetType;
@@ -1472,7 +1472,7 @@ struct PACKET_CZ_SHORTCUT_KEY_CHANGE1 {
DEFINE_PACKET_HEADER(CZ_SHORTCUT_KEY_CHANGE1, 0x02ba);
#endif
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
struct PACKET_CZ_SHORTCUT_KEY_CHANGE2 {
int16 packetType;
uint16 tab;
@@ -1490,7 +1490,7 @@ struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE1 {
DEFINE_PACKET_HEADER(CZ_SHORTCUTKEYBAR_ROTATE1, 0x0a01);
#endif
-#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508
+#if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
struct PACKET_CZ_SHORTCUTKEYBAR_ROTATE2 {
int16 packetType;
uint16 tab;
@@ -2326,7 +2326,35 @@ struct PACKET_ZC_ACK_WEAPONREFINE {
#endif
} __attribute__((packed));
-#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+#if PACKETVER_MAIN_NUM >= 20190619 || PACKETVER_RE_NUM >= 20190605 || PACKETVER_ZERO_NUM >= 20190626
+// PACKET_ZC_PROPERTY_HOMUN3
+struct PACKET_ZC_PROPERTY_HOMUN {
+ int16 packetType;
+ char name[NAME_LENGTH];
+ // Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
+ uint8 flags;
+ uint16 level;
+ uint16 hunger;
+ uint16 intimacy;
+ uint16 atk2;
+ uint16 matk;
+ uint16 hit;
+ uint16 crit;
+ uint16 def;
+ uint16 mdef;
+ uint16 flee;
+ uint16 amotion;
+ uint32 hp;
+ uint32 maxHp;
+ uint16 sp;
+ uint16 maxSp;
+ uint32 exp;
+ uint32 expNext;
+ uint16 skillPoints;
+ uint16 range;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x0b2f);
+#elif PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
// PACKET_ZC_PROPERTY_HOMUN2
struct PACKET_ZC_PROPERTY_HOMUN {
int16 packetType;
@@ -2651,6 +2679,7 @@ struct PACKET_ZC_MAKINGARROW_LIST {
int16 packetLength;
struct PACKET_ZC_MAKINGARROW_LIST_sub items[];
} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_MAKINGARROW_LIST, 0x01ad);
struct PACKET_ZC_REPAIRITEMLIST_sub {
int16 index;
@@ -3451,6 +3480,58 @@ struct PACKET_ZC_REFINE_STATUS {
DEFINE_PACKET_HEADER(ZC_REFINE_STATUS, 0x0ada);
#endif
+#if PACKETVER_RE_NUM >= 20190703 || PACKETVER_ZERO_NUM >= 20190724
+struct PACKET_ZC_ACK_RANKING_sub {
+ char name[NAME_LENGTH];
+ uint32 points;
+} __attribute__((packed));
+
+struct PACKET_ZC_ACK_RANKING {
+ int16 packetType;
+ int16 rankType;
+ uint32 chars[10];
+ uint32 points[10];
+ uint32 myPoints;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x0af6);
+#elif PACKETVER_MAIN_NUM >= 20130605 || PACKETVER_RE_NUM >= 20130529 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_ACK_RANKING_sub {
+ char name[NAME_LENGTH];
+ uint32 points;
+} __attribute__((packed));
+
+struct PACKET_ZC_ACK_RANKING {
+ int16 packetType;
+ int16 rankType;
+ struct PACKET_ZC_ACK_RANKING_sub ranks[10];
+ uint32 myPoints;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ACK_RANKING, 0x097d);
+#else
+struct PACKET_ZC_ACK_RANKING_sub {
+ char name[NAME_LENGTH];
+ uint32 points;
+} __attribute__((packed));
+#endif
+
+struct PACKET_ZC_STATUS_CHANGE_ACK {
+ int16 packetType;
+ uint16 sp;
+ uint8 ok;
+ uint8 value;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_STATUS_CHANGE_ACK, 0x00bc);
+
+#if PACKETVER_MAIN_NUM >= 20150507 || PACKETVER_RE_NUM >= 20150429 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_HAT_EFFECT {
+ int16 packetType;
+ int16 packetLength;
+ uint32 aid;
+ int8 status;
+ uint16 effects[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_HAT_EFFECT, 0x0a3b);
+#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)
diff --git a/src/map/pc.c b/src/map/pc.c
index 5416fbec2..84d49e1db 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4778,6 +4778,13 @@ static int pc_additem(struct map_session_data *sd, const struct item *item_data,
sd->weight += w;
clif->updatestatus(sd,SP_WEIGHT);
+
+ // auto-favorite
+ if (data->flag.auto_favorite > 0) {
+ sd->status.inventory[i].favorite = 1;
+ clif->favorite_item(sd, i);
+ }
+
//Auto-equip
if(data->flag.autoequip)
pc->equipitem(sd, i, data->equip);
@@ -7136,6 +7143,11 @@ static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint
clif_disp_onlyself(sd, output);
}
+ // Share master EXP to homunculus
+ if (sd->hd != NULL && battle_config.hom_bonus_exp_from_master > 0) {
+ homun->gainexp(sd->hd, apply_percentrate((int)base_exp, battle_config.hom_bonus_exp_from_master, 100));
+ }
+
return true;
}
@@ -7352,34 +7364,33 @@ static int pc_maxparameterincrease(struct map_session_data *sd, int type)
*/
static bool pc_statusup(struct map_session_data *sd, int type, int increase)
{
- int max_increase = 0, current = 0, needed_points = 0, final_value = 0;
-
nullpo_ret(sd);
+ int realIncrease = increase;
// check conditions
- if (type < SP_STR || type > SP_LUK || increase <= 0) {
- clif->statusupack(sd, type, 0, 0);
+ if (type < SP_STR || type > SP_LUK || realIncrease <= 0) {
+ clif->statusupack(sd, type, 0, increase);
return false;
}
// check limits
- current = pc->getstat(sd, type);
- max_increase = pc->maxparameterincrease(sd, type);
- increase = cap_value(increase, 0, max_increase); // cap to the maximum status points available
- if (increase <= 0 || current + increase > pc_maxparameter(sd)) {
- clif->statusupack(sd, type, 0, 0);
+ int current = pc->getstat(sd, type);
+ int max_increase = pc->maxparameterincrease(sd, type);
+ realIncrease = cap_value(realIncrease, 0, max_increase); // cap to the maximum status points available
+ if (realIncrease <= 0 || current + realIncrease > pc_maxparameter(sd)) {
+ clif->statusupack(sd, type, 0, increase);
return false;
}
// check status points
- needed_points = pc->need_status_point(sd, type, increase);
+ int needed_points = pc->need_status_point(sd, type, realIncrease);
if (needed_points < 0 || needed_points > sd->status.status_point) { // Sanity check
- clif->statusupack(sd, type, 0, 0);
+ clif->statusupack(sd, type, 0, increase);
return false;
}
// set new values
- final_value = pc->setstat(sd, type, current + increase);
+ int final_value = pc->setstat(sd, type, current + realIncrease);
sd->status.status_point -= needed_points;
status_calc_pc(sd, SCO_NONE);
diff --git a/src/map/script.c b/src/map/script.c
index c6f1c9a12..f515d4403 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -16589,6 +16589,8 @@ static BUILDIN(isequippedcnt)
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) continue;
if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) continue;
+ if(j == EQI_COSTUME_MID && sd->equip_index[EQI_COSTUME_LOW] == index) continue;
+ if(j == EQI_COSTUME_TOP && (sd->equip_index[EQI_COSTUME_MID] == index || sd->equip_index[EQI_COSTUME_LOW] == index)) continue;
if(!sd->inventory_data[index])
continue;
@@ -16642,6 +16644,8 @@ static BUILDIN(isequipped)
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) continue;
if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) continue;
+ if(j == EQI_COSTUME_MID && sd->equip_index[EQI_COSTUME_LOW] == index) continue;
+ if(j == EQI_COSTUME_TOP && (sd->equip_index[EQI_COSTUME_MID] == index || sd->equip_index[EQI_COSTUME_LOW] == index)) continue;
if(!sd->inventory_data[index])
continue;
@@ -18580,6 +18584,7 @@ static BUILDIN(getmonsterinfo)
case 20: script_pushint(st,monster->status.def_ele); break;
case 21: script_pushint(st,monster->status.mode); break;
case 22: script_pushint(st,monster->mexp); break;
+ case 23: script_pushint(st, monster->dmg_taken_rate); break;
default: script_pushint(st,-1); //wrong Index
}
return true;
@@ -19137,6 +19142,9 @@ static BUILDIN(setunitdata)
script_pushint(st, 1);
return true;
}
+ case UDT_DAMAGE_TAKEN_RATE:
+ setunitdata_check_bounds(4, 1, INT_MAX);
+ break;
default:
break;
}
@@ -19311,6 +19319,9 @@ static BUILDIN(setunitdata)
case UDT_DMOTION:
md->status.dmotion = (unsigned short) val;
break;
+ case UDT_DAMAGE_TAKEN_RATE:
+ md->dmg_taken_rate = (int) val;
+ break;
default:
ShowWarning("buildin_setunitdata: Invalid data type '%s' for mob unit.\n", udtype);
script_pushint(st, 0);
@@ -20158,6 +20169,7 @@ static BUILDIN(getunitdata)
case UDT_AMOTION: script_pushint(st, md->status.amotion); break;
case UDT_ADELAY: script_pushint(st, md->status.adelay); break;
case UDT_DMOTION: script_pushint(st, md->status.dmotion); break;
+ case UDT_DAMAGE_TAKEN_RATE: script_pushint(st, md->dmg_taken_rate); break;
default:
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype);
script_pushint(st, -1);
@@ -24848,6 +24860,49 @@ static BUILDIN(consolemes)
return true;
}
+static BUILDIN(setfavoriteitemidx)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+ int idx = script_getnum(st, 2);
+ int value = script_getnum(st, 3);
+
+ if (sd == NULL) {
+ ShowError("buildin_setfavoriteitemidx: No player attached.\n");
+ return false;
+ }
+
+ if (idx < 0 || idx >= sd->status.inventorySize) {
+ ShowError("buildin_setfavoriteitemidx: Invalid inventory index %d (min: %d, max: %d).\n", idx, 0, (sd->status.inventorySize - 1));
+ return false;
+ } else if (sd->inventory_data[idx] == NULL || sd->inventory_data[idx]->nameid <= 0) {
+ ShowWarning("buildin_setfavoriteitemidx: Current inventory index %d has no data.\n", idx);
+ return false;
+ } else if (sd->status.inventory[idx].equip > 0) {
+ ShowWarning("buildin_setfavoriteitemidx: Cant change favorite flag of an equipped item.\n");
+ return false;
+ } else {
+ sd->status.inventory[idx].favorite = cap_value(value, 0, 1);
+ clif->favorite_item(sd, idx);
+ }
+
+ return true;
+}
+
+static BUILDIN(autofavoriteitem)
+{
+ int nameid = script_getnum(st, 2);
+ int flag = script_getnum(st, 3);
+ struct item_data *item_data;
+
+ if ((item_data = itemdb->exists(nameid)) == NULL) {
+ ShowError("buildin_autofavoriteitem: Invalid item '%d'.\n", nameid);
+ return false;
+ }
+
+ item_data->flag.auto_favorite = cap_value(flag, 0, 1);
+ return true;
+}
+
/** place holder for the translation macro **/
static BUILDIN(_)
{
@@ -25473,6 +25528,75 @@ static BUILDIN(openrefineryui)
}
/**
+ * identify(<item id>)
+ * Identifies the first unidentified <item id> item on player's inventory.
+ * Returns -2 on error, -1 if no item to identify was found, identified idx otherwise.
+ */
+static BUILDIN(identify)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+
+ if (sd == NULL) {
+ script_pushint(st, -2);
+ return true;
+ }
+
+ int itemid = script_getnum(st, 2);
+ if (itemdb->exists(itemid) == NULL) {
+ ShowError("buildin_identify: Invalid item ID (%d)\n", itemid);
+ script_pushint(st, -2);
+ return true;
+ }
+
+ int idx = -1;
+ ARR_FIND(0, sd->status.inventorySize, idx, (sd->status.inventory[idx].nameid == itemid && sd->status.inventory[idx].identify == 0));
+
+ if (idx < 0 || idx >= sd->status.inventorySize) {
+ script_pushint(st, -1);
+ return true;
+ }
+
+ sd->status.inventory[idx].identify = 1;
+ clif->item_identified(sd, idx, 0);
+ script_pushint(st, idx);
+
+ return true;
+}
+
+/**
+ * identifyidx(idx)
+ * Identifies item at idx.
+ * Returns true if item is identified, false otherwise.
+ */
+static BUILDIN(identifyidx)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+
+ if (sd == NULL) {
+ script_pushint(st, false);
+ return true;
+ }
+
+ int idx = script_getnum(st, 2);
+ if (idx < 0 || idx >= sd->status.inventorySize) {
+ ShowError("buildin_identifyidx: Invalid inventory index (%d), expected a value between 0 and %d\n", idx, sd->status.inventorySize);
+ script_pushint(st, false);
+ return true;
+ }
+
+ if (sd->status.inventory[idx].nameid <= 0 || sd->status.inventory[idx].identify != 0) {
+ script_pushint(st, false);
+ return true;
+ }
+
+ sd->status.inventory[idx].identify = 1;
+ clif->item_identified(sd, idx, 0);
+ script_pushint(st, true);
+
+ return true;
+}
+
+/**
* Adds a built-in script function.
*
* @param buildin Script function data
@@ -26230,6 +26354,11 @@ static void script_parse_builtin(void)
BUILDIN_DEF(closeroulette, ""),
BUILDIN_DEF(openrefineryui, ""),
+ BUILDIN_DEF(setfavoriteitemidx, "ii"),
+ BUILDIN_DEF(autofavoriteitem, "ii"),
+
+ BUILDIN_DEF(identify, "i"),
+ BUILDIN_DEF(identifyidx, "i"),
};
int i, len = ARRAYLENGTH(BUILDIN);
RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up
@@ -26773,6 +26902,7 @@ static void script_hardcoded_constants(void)
script->set_constant("UDT_ROBE", UDT_ROBE, false, false);
script->set_constant("UDT_BODY2", UDT_BODY2, false, false);
script->set_constant("UDT_GROUP", UDT_GROUP, false, false);
+ script->set_constant("UDT_DAMAGE_TAKEN_RATE", UDT_DAMAGE_TAKEN_RATE, false, false);
script->constdb_comment("getguildonline types");
script->set_constant("GUILD_ONLINE_ALL", GUILD_ONLINE_ALL, false, false);
diff --git a/src/map/script.h b/src/map/script.h
index 62950ba8d..84a8e3b6e 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -434,6 +434,7 @@ enum script_unit_data_types {
UDT_ROBE,
UDT_BODY2,
UDT_GROUP,
+ UDT_DAMAGE_TAKEN_RATE,
UDT_MAX
};
diff --git a/src/map/skill.c b/src/map/skill.c
index a259829ef..af61c887c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2906,6 +2906,18 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li
}
}
+ if (bl->type == BL_MOB) {
+ struct mob_data *md = BL_CAST(BL_MOB, bl);
+ if (md != NULL) {
+ if (md->db->dmg_taken_rate != 100) {
+ if (dmg.damage > 0)
+ dmg.damage = apply_percentrate64(dmg.damage, md->db->dmg_taken_rate, 100);
+ if (dmg.damage2 > 0)
+ dmg.damage2 = apply_percentrate64(dmg.damage2, md->db->dmg_taken_rate, 100);
+ }
+ }
+ }
+
damage = dmg.damage + dmg.damage2;
if( (skill_id == AL_INCAGI || skill_id == AL_BLESSING ||
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 4f4d628a5..24958711e 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1296,6 +1296,10 @@ typedef void (*HPMHOOK_pre_clif_fame_taekwon) (struct map_session_data **sd, int
typedef void (*HPMHOOK_post_clif_fame_taekwon) (struct map_session_data *sd, int points);
typedef void (*HPMHOOK_pre_clif_ranklist) (struct map_session_data **sd, enum fame_list_type *type);
typedef void (*HPMHOOK_post_clif_ranklist) (struct map_session_data *sd, enum fame_list_type type);
+typedef void (*HPMHOOK_pre_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type);
+typedef void (*HPMHOOK_post_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type);
+typedef void (*HPMHOOK_pre_clif_ranklist_sub2) (uint32 **chars, uint32 **points, enum fame_list_type *type);
+typedef void (*HPMHOOK_post_clif_ranklist_sub2) (uint32 *chars, uint32 *points, enum fame_list_type type);
typedef void (*HPMHOOK_pre_clif_update_rankingpoint) (struct map_session_data **sd, enum fame_list_type *type, int *points);
typedef void (*HPMHOOK_post_clif_update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points);
typedef void (*HPMHOOK_pre_clif_pRanklist) (int *fd, struct map_session_data **sd);
@@ -5300,6 +5304,8 @@ typedef int (*HPMHOOK_pre_mob_final) (void);
typedef int (*HPMHOOK_post_mob_final) (int retVal___);
typedef void (*HPMHOOK_pre_mob_reload) (void);
typedef void (*HPMHOOK_post_mob_reload) (void);
+typedef int (*HPMHOOK_pre_mob_reload_sub_mob) (struct mob_data **md, va_list args);
+typedef int (*HPMHOOK_post_mob_reload_sub_mob) (int retVal___, struct mob_data *md, va_list args);
typedef struct mob_db* (*HPMHOOK_pre_mob_db) (int *index);
typedef struct mob_db* (*HPMHOOK_post_mob_db) (struct mob_db* retVal___, int index);
typedef struct mob_chat* (*HPMHOOK_pre_mob_chat) (short *id);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 14e1cc8ea..ad49bacb4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -886,6 +886,10 @@ struct {
struct HPMHookPoint *HP_clif_fame_taekwon_post;
struct HPMHookPoint *HP_clif_ranklist_pre;
struct HPMHookPoint *HP_clif_ranklist_post;
+ struct HPMHookPoint *HP_clif_ranklist_sub_pre;
+ struct HPMHookPoint *HP_clif_ranklist_sub_post;
+ struct HPMHookPoint *HP_clif_ranklist_sub2_pre;
+ struct HPMHookPoint *HP_clif_ranklist_sub2_post;
struct HPMHookPoint *HP_clif_update_rankingpoint_pre;
struct HPMHookPoint *HP_clif_update_rankingpoint_post;
struct HPMHookPoint *HP_clif_pRanklist_pre;
@@ -3868,6 +3872,8 @@ struct {
struct HPMHookPoint *HP_mob_final_post;
struct HPMHookPoint *HP_mob_reload_pre;
struct HPMHookPoint *HP_mob_reload_post;
+ struct HPMHookPoint *HP_mob_reload_sub_mob_pre;
+ struct HPMHookPoint *HP_mob_reload_sub_mob_post;
struct HPMHookPoint *HP_mob_db_pre;
struct HPMHookPoint *HP_mob_db_post;
struct HPMHookPoint *HP_mob_chat_pre;
@@ -7675,6 +7681,10 @@ struct {
int HP_clif_fame_taekwon_post;
int HP_clif_ranklist_pre;
int HP_clif_ranklist_post;
+ int HP_clif_ranklist_sub_pre;
+ int HP_clif_ranklist_sub_post;
+ int HP_clif_ranklist_sub2_pre;
+ int HP_clif_ranklist_sub2_post;
int HP_clif_update_rankingpoint_pre;
int HP_clif_update_rankingpoint_post;
int HP_clif_pRanklist_pre;
@@ -10657,6 +10667,8 @@ struct {
int HP_mob_final_post;
int HP_mob_reload_pre;
int HP_mob_reload_post;
+ int HP_mob_reload_sub_mob_pre;
+ int HP_mob_reload_sub_mob_post;
int HP_mob_db_pre;
int HP_mob_db_post;
int HP_mob_chat_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index a5848995c..474bcfb14 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -467,6 +467,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->fame_alchemist, HP_clif_fame_alchemist) },
{ HP_POP(clif->fame_taekwon, HP_clif_fame_taekwon) },
{ HP_POP(clif->ranklist, HP_clif_ranklist) },
+ { HP_POP(clif->ranklist_sub, HP_clif_ranklist_sub) },
+ { HP_POP(clif->ranklist_sub2, HP_clif_ranklist_sub2) },
{ HP_POP(clif->update_rankingpoint, HP_clif_update_rankingpoint) },
{ HP_POP(clif->pRanklist, HP_clif_pRanklist) },
{ HP_POP(clif->hotkeys, HP_clif_hotkeys) },
@@ -1983,6 +1985,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->init, HP_mob_init) },
{ HP_POP(mob->final, HP_mob_final) },
{ HP_POP(mob->reload, HP_mob_reload) },
+ { HP_POP(mob->reload_sub_mob, HP_mob_reload_sub_mob) },
{ HP_POP(mob->db, HP_mob_db) },
{ HP_POP(mob->chat, HP_mob_chat) },
{ HP_POP(mob->makedummymobdb, HP_mob_makedummymobdb) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 25844b1cc..8817c34cc 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -11539,6 +11539,58 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) {
}
return;
}
+void HP_clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_ranklist_sub_pre > 0) {
+ void (*preHookFunc) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_ranklist_sub_pre[hIndex].func;
+ preHookFunc(&ranks, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ranklist_sub(ranks, type);
+ }
+ if (HPMHooks.count.HP_clif_ranklist_sub_post > 0) {
+ void (*postHookFunc) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_ranklist_sub_post[hIndex].func;
+ postHookFunc(ranks, type);
+ }
+ }
+ return;
+}
+void HP_clif_ranklist_sub2(uint32 *chars, uint32 *points, enum fame_list_type type) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_clif_ranklist_sub2_pre > 0) {
+ void (*preHookFunc) (uint32 **chars, uint32 **points, enum fame_list_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_pre[hIndex].func;
+ preHookFunc(&chars, &points, &type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ranklist_sub2(chars, points, type);
+ }
+ if (HPMHooks.count.HP_clif_ranklist_sub2_post > 0) {
+ void (*postHookFunc) (uint32 *chars, uint32 *points, enum fame_list_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_post[hIndex].func;
+ postHookFunc(chars, points, type);
+ }
+ }
+ return;
+}
void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_update_rankingpoint_pre > 0) {
@@ -51181,6 +51233,39 @@ void HP_mob_reload(void) {
}
return;
}
+int HP_mob_reload_sub_mob(struct mob_data *md, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_mob_reload_sub_mob_pre > 0) {
+ int (*preHookFunc) (struct mob_data **md, va_list args);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_pre; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_pre[hIndex].func;
+ retVal___ = preHookFunc(&md, args___copy);
+ va_end(args___copy);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.mob.reload_sub_mob(md, args___copy);
+ va_end(args___copy);
+ }
+ if (HPMHooks.count.HP_mob_reload_sub_mob_post > 0) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_post; hIndex++) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
struct mob_db* HP_mob_db(int index) {
int hIndex = 0;
struct mob_db* retVal___ = NULL;