From c7f9f24d69d75a3fec306b6a3dfd00784af344c1 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 17:07:09 +0300
Subject: Update messages up to 2018-10-10.

---
 src/map/messages_zero.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/map')

diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index c562bb07c..348bc00c8 100644
--- a/src/map/messages_zero.h
+++ b/src/map/messages_zero.h
@@ -23,7 +23,7 @@
 
 /* This file is autogenerated, please do not commit manual changes
 
-Latest version: 20180919
+Latest version: 20181010
 */
 
 enum clif_messages {
@@ -13926,9 +13926,11 @@ DEATH : %.1f%% ( basic 100.0%% VIP Bonus %.1f%% + %s %.1f%%)
 DEATH: %.1f%% (Basic 100.0%% VIP Bonus %.1f%% + %s %.1f%%)
 */
 	MSG_ID_AFB = 0xafb,
-/*20171018 to latest
+/*20171018 to 20180928
  해당 태그는 이름으로 사용하실 수 없습니다.
 Name with this tag cannot be used.
+20181010 to latest
+ 해당 내용은 이름으로 사용하실 수 없습니다. 
 */
 	MSG_ID_AFC = 0xafc,
 /*20171018 to latest
-- 
cgit v1.2.3-70-g09d2


From 96e23d8b7ea3dcabaa1599b8e0429ec109f7cd41 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 17:07:43 +0300
Subject: Update keys up to 2018-10-17

---
 src/map/packets_keys_main.h | 5 +++--
 src/map/packets_keys_zero.h | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/map')

diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 03ece5d27..c94e44525 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -874,7 +874,7 @@
 	packetKeys(0x6A596301,0x76866D0E,0x32294A45);
 #endif
 
-// 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
+// 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-17bRagexe, 2018-10-17bRagexeRE
 #if PACKETVER == 20131223 || \
     PACKETVER == 20140508 || \
     PACKETVER == 20140611 || \
@@ -904,7 +904,8 @@
     PACKETVER == 20180831 || \
     PACKETVER == 20180912 || \
     PACKETVER == 20180919 || \
-    PACKETVER >= 20181002
+    PACKETVER == 20181002 || \
+    PACKETVER >= 20181017
 	packetKeys(0x00000000,0x00000000,0x00000000);
 #endif
 
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index 1b6cd537c..2d1f35e94 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -29,7 +29,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
+// 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
 #if PACKETVER == 20171018 || \
     PACKETVER == 20171019 || \
     PACKETVER == 20171023 || \
@@ -59,7 +59,8 @@
     PACKETVER == 20180905 || \
     PACKETVER == 20180912 || \
     PACKETVER == 20180919 || \
-    PACKETVER >= 20180928
+    PACKETVER == 20180928 || \
+    PACKETVER >= 20181010
 	packetKeys(0x00000000,0x00000000,0x00000000);
 #endif
 
-- 
cgit v1.2.3-70-g09d2


From 68e3d22c58ec5d1c0aeb106d6c9bdb498309dd07 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 17:08:05 +0300
Subject: Update shuffle packets up to 2018-10-17

---
 src/map/packets_shuffle_main.h | 5 +++--
 src/map/packets_shuffle_re.h   | 5 +++--
 src/map/packets_shuffle_zero.h | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

(limited to 'src/map')

diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 53bdfa59d..32396ad99 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -3344,7 +3344,7 @@
 	packet(0x0969,2,clif->pSearchStoreInfoNextPage,0);  // CZ_SEARCH_STORE_INFO_NEXT_PAGE
 #endif
 
-// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe, 2018-08-29aRagexe, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-19aRagexe, 2018-10-02aRagexe, 2018-10-02bRagexe
+// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-28bRagexe, 2018-04-04bRagexe, 2018-04-18aRagexe, 2018-04-25cRagexe, 2018-05-02bRagexe, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-23aRagexe, 2018-05-30aRagexe, 2018-06-05bRagexe, 2018-06-20cRagexe, 2018-06-20eRagexe, 2018-06-21aRagexe, 2018-07-04aRagexe, 2018-07-18bRagexe, 2018-07-18cRagexe, 2018-08-01cRagexe, 2018-08-08bRagexe, 2018-08-22cRagexe, 2018-08-29aRagexe, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-19aRagexe, 2018-10-02aRagexe, 2018-10-02bRagexe, 2018-10-17bRagexe
 #if PACKETVER == 20140611 || \
     PACKETVER == 20150225 || \
     PACKETVER == 20180315 || \
@@ -3370,7 +3370,8 @@
     PACKETVER == 20180831 || \
     PACKETVER == 20180912 || \
     PACKETVER == 20180919 || \
-    PACKETVER >= 20181002
+    PACKETVER == 20181002 || \
+    PACKETVER >= 20181017
 	packet(0x0202,26,clif->pFriendsListAdd,2);  // CZ_ADD_FRIENDS
 	packet(0x022d,5,clif->pHomMenu,2,4);  // CZ_COMMAND_MER
 	packet(0x023b,36,clif->pStoragePassword,0);  // CZ_ACK_STORE_PASSWORD
diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h
index e77b97cac..bf44faa7c 100644
--- a/src/map/packets_shuffle_re.h
+++ b/src/map/packets_shuffle_re.h
@@ -9662,7 +9662,7 @@
 	packet(0x083c,12,clif->pSearchStoreInfoListItemClick,2,6,10);  // CZ_SSILIST_ITEM_CLICK
 #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-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-17bRagexeRE
 #if PACKETVER == 20180704 || \
     PACKETVER == 20180711 || \
     PACKETVER == 20180718 || \
@@ -9672,7 +9672,8 @@
     PACKETVER == 20180829 || \
     PACKETVER == 20180912 || \
     PACKETVER == 20180919 || \
-    PACKETVER >= 20181002
+    PACKETVER == 20181002 || \
+    PACKETVER >= 20181017
 	packet(0x0202,26,clif->pFriendsListAdd,2);  // CZ_ADD_FRIENDS
 	packet(0x022d,5,clif->pHomMenu,2,4);  // CZ_COMMAND_MER
 	packet(0x023b,36,clif->pStoragePassword,0);  // CZ_ACK_STORE_PASSWORD
diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h
index fedefbe3d..db83c0ba0 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -36,7 +36,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
+// 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
 #if PACKETVER == 20171018 || \
     PACKETVER == 20171019 || \
     PACKETVER == 20171023 || \
@@ -66,7 +66,8 @@
     PACKETVER == 20180905 || \
     PACKETVER == 20180912 || \
     PACKETVER == 20180919 || \
-    PACKETVER >= 20180928
+    PACKETVER == 20180928 || \
+    PACKETVER >= 20181010
 	packet(0x0202,26,clif->pFriendsListAdd,2);  // CZ_ADD_FRIENDS
 	packet(0x022d,5,clif->pHomMenu,2,4);  // CZ_COMMAND_MER
 	packet(0x023b,36,clif->pStoragePassword,0);  // CZ_ACK_STORE_PASSWORD
-- 
cgit v1.2.3-70-g09d2


From 2b939af9320e0b6be7b2455cb862c08ebd62eb2d Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 17:09:19 +0300
Subject: Update non shuffle packets list up to 2018-10-17

---
 src/map/packets.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'src/map')

diff --git a/src/map/packets.h b/src/map/packets.h
index dc610ce2a..fb48d953b 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -4355,4 +4355,28 @@ packet(0x96e,-1,clif->ackmergeitems);
 // changed packet sizes
 #endif
 
+// 2018-10-10_2aRagexe_zero
+#if PACKETVER_ZERO_NUM >= 20181010
+// new packets
+	packet(0x0b10,10,clif->pDull/*,XXX*/);
+	packet(0x0b11,4,clif->pDull/*,XXX*/);
+// changed packet sizes
+#endif
+
+// 2018-10-17bRagexe
+#if PACKETVER_MAIN_NUM >= 20181017
+// new packets
+	packet(0x0b12,2,clif->pDull/*,XXX*/);
+	packet(0x0b13,40);
+// changed packet sizes
+#endif
+
+// 2018-10-17bRagexeRE
+#if PACKETVER_RE_NUM >= 20181017
+// new packets
+	packet(0x0b12,2,clif->pDull/*,XXX*/);
+	packet(0x0b13,48);
+// changed packet sizes
+#endif
+
 #endif /* MAP_PACKETS_H */
-- 
cgit v1.2.3-70-g09d2


From cd98199c9378bc15078317fc79ef7a32ad096f76 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 21:05:40 +0300
Subject: Update packet ZC_UPDATE_MISSION_HUNT_EX

---
 src/map/clif.c           | 5 ++++-
 src/map/packets_struct.h | 9 +++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index 1e9844f14..a7e8b66b9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17022,7 +17022,10 @@ static void clif_quest_update_objective(struct map_session_data *sd, struct ques
 		real_len += sizeof(packet->objectives[i]);
 
 		packet->objectives[i].questID = qd->quest_id;
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+		packet->objectives[i].huntIdent = qd->quest_id;
+		packet->objectives[i].huntIdent2 = i;
+#elif PACKETVER >= 20150513
 		packet->objectives[i].huntIdent = (qd->quest_id * 1000) + i;
 #else
 		packet->objectives[i].mob_id = qi->objectives[i].mob;
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 9248d96c8..9fde3205c 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -383,7 +383,9 @@ enum packet_headers {
 #else
 	questAddType = 0x2b3,
 #endif // PACKETVER < 20150513
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	questUpdateType = 0xafe,
+#elif PACKETVER >= 20150513
 	questUpdateType = 0x9fa,
 #else
 	questUpdateType = 0x2b5,
@@ -1853,7 +1855,10 @@ struct packet_quest_add_header {
  */
 struct packet_quest_update_hunt {
 	uint32 questID;
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	uint32 huntIdent;
+	uint32 huntIdent2;
+#elif PACKETVER >= 20150513
 	uint32 huntIdent;
 #else
 	uint32 mob_id;
-- 
cgit v1.2.3-70-g09d2


From 36ba4a248e5c23af16e1cdf64cddff172e42a383 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 21:11:03 +0300
Subject: Update packet ZC_ALL_QUEST_LIST.

---
 src/map/clif.c           |  6 +++++-
 src/map/packets_struct.h | 10 ++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index a7e8b66b9..dca381897 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16872,7 +16872,11 @@ static void clif_quest_send_list(struct map_session_data *sd)
 			real_len += sizeof(info->objectives[j]);
 
 			mob_data = mob->db(qi->objectives[j].mob);
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+			info->objectives[j].huntIdent = sd->quest_log[i].quest_id;
+			info->objectives[j].huntIdent2 = j;
+			info->objectives[j].mobType = 0; // Info Needed
+#elif PACKETVER >= 20150513
 			info->objectives[j].huntIdent = (sd->quest_log[i].quest_id * 1000) + j;
 			info->objectives[j].mobType = 0; // Info Needed
 #endif
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 9fde3205c..5d209cee0 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -324,7 +324,9 @@ enum packet_headers {
 	achievementUpdateType = 0xa24,
 	achievementRewardAckType = 0xa26,
 #endif // PACKETVER >= 20141016
-#if PACKETVER >= 20150513  // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	questListType = 0xaff, ///< ZC_ALL_QUEST_LIST4
+#elif PACKETVER >= 20150513  // [4144] 0x09f8 handling in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
 	questListType = 0x9f8, ///< ZC_ALL_QUEST_LIST3
 #elif PACKETVER >= 20141022
 	questListType = 0x97a, ///< ZC_ALL_QUEST_LIST2
@@ -1451,7 +1453,11 @@ struct packet_hotkey {
  * MISSION_HUNT_INFO_EX (PACKETVER >= 20150513)
  */
 struct packet_mission_info_sub {
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	uint32 huntIdent;
+	uint32 huntIdent2;
+	uint32 mobType;
+#elif PACKETVER >= 20150513
 	uint32 huntIdent;
 	uint32 mobType;
 #endif
-- 
cgit v1.2.3-70-g09d2


From 2df7202ba89332afb00372a0b95926078059e968 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 21:23:52 +0300
Subject: Update packet ZC_ADD_QUEST_EX.

---
 src/map/clif.c           |  6 +++++-
 src/map/packets_struct.h | 10 ++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index dca381897..00ac4ea81 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16965,7 +16965,11 @@ static void clif_quest_add(struct map_session_data *sd, struct quest *qd)
 
 		monster = mob->db(qi->objectives[i].mob);
 
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+		packet->objectives[i].huntIdent = qd->quest_id;
+		packet->objectives[i].huntIdent2 = i;
+		packet->objectives[i].mobType = 0; // Info Needed
+#elif PACKETVER >= 20150513
 		packet->objectives[i].huntIdent = (qd->quest_id * 1000) + i;
 		packet->objectives[i].mobType = 0; // Info Needed
 #endif
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 5d209cee0..6f3f3aeb1 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -380,7 +380,9 @@ enum packet_headers {
 	clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
 	clanMessage = 0x098E, ///< ZC_NOTIFY_CLAN_CHAT
 #endif
-#if PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	questAddType = 0xb0c,
+#elif PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
 	questAddType = 0x9f9,
 #else
 	questAddType = 0x2b3,
@@ -1827,7 +1829,11 @@ struct PACKET_ZC_NOTIFY_CLAN_CHAT {
  * PACKET_ZC_MISSION_HUNT_EX (PACKETVER >= 20150513)
  */
 struct packet_quest_hunt_sub {
-#if PACKETVER >= 20150513
+#if PACKETVER_ZERO_NUM >= 20181010 || PACKETVER >= 20181017
+	uint32 huntIdent;
+	uint32 huntIdent2;
+	uint32 mobType;
+#elif PACKETVER >= 20150513
 	uint32 huntIdent;
 	uint32 mobType;
 #endif
-- 
cgit v1.2.3-70-g09d2


From ade1ec3b4581c5671b588067ed6b86fecaf166b5 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 10 Oct 2018 21:26:20 +0300
Subject: Update packet ZC_REMOVE_EFFECT for zero clients.

---
 src/map/clif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index 00ac4ea81..787a9db3b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8872,7 +8872,7 @@ static void clif_specialeffect_value(struct block_list *bl, int effect_id, int n
 ///     @see doc/effect_list.txt
 static void clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target)
 {
-#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
 	nullpo_retv(bl);
 
 	struct PACKET_ZC_REMOVE_EFFECT p;
@@ -8891,7 +8891,7 @@ static void clif_removeSpecialEffect(struct block_list *bl, int effectId, enum s
 
 static void clif_removeSpecialEffect_single(struct block_list *bl, int effectId, struct block_list *targetBl)
 {
-#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002
+#if PACKETVER_MAIN_NUM >= 20181002 || PACKETVER_RE_NUM >= 20181002 || PACKETVER_ZERO_NUM >= 20181010
 	nullpo_retv(bl);
 	nullpo_retv(targetBl);
 
-- 
cgit v1.2.3-70-g09d2


From 152e4ee83f5637a25c1e7adb13d34cd10a4686d4 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 17 Oct 2018 23:51:50 +0300
Subject: Add missing checks into camera packets.

---
 src/map/clif.c | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index 787a9db3b..ab1e88ffc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -21936,6 +21936,7 @@ static void clif_parse_memorial_dungeon_command(int fd, struct map_session_data
 static void clif_camera_showWindow(struct map_session_data *sd)
 {
 #if PACKETVER >= 20160525
+	nullpo_retv(sd);
 	struct PACKET_ZC_CAMERA_INFO p;
 	p.packetType = 0xa78;
 	p.action = 1;
@@ -21949,6 +21950,7 @@ static void clif_camera_showWindow(struct map_session_data *sd)
 static void clif_camera_change(struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target)
 {
 #if PACKETVER >= 20160525
+	nullpo_retv(sd);
 	struct PACKET_ZC_CAMERA_INFO p;
 	p.packetType = 0xa78;
 	p.action = 0;
-- 
cgit v1.2.3-70-g09d2


From bf5b2da6f9a395e280c5806456cfe3f7ccf3aaa6 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Wed, 17 Oct 2018 23:11:40 +0300
Subject: Add packet ZC_ITEM_PREVIEW.

It allow show item preview in already opened preview window.
---
 src/map/clif.c           | 21 +++++++++++++++++++++
 src/map/clif.h           |  1 +
 src/map/packets_struct.h | 16 ++++++++++++++++
 3 files changed, 38 insertions(+)

(limited to 'src/map')

diff --git a/src/map/clif.c b/src/map/clif.c
index ab1e88ffc..62b9a4ca9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -21961,6 +21961,26 @@ static void clif_camera_change(struct map_session_data *sd, float range, float r
 #endif
 }
 
+// show item preview in already opened preview window
+static void clif_item_preview(struct map_session_data *sd, int n)
+{
+#if PACKETVER_MAIN_NUM >= 20170726 || PACKETVER_RE_NUM >= 20170621 || defined(PACKETVER_ZERO)
+	nullpo_retv(sd);
+	Assert_retv(n >= 0 && n < MAX_INVENTORY);
+
+	struct PACKET_ZC_ITEM_PREVIEW p;
+	p.packetType = itemPreview;
+	p.index = n + 2;
+#if PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017
+	p.isDamaged = (sd->status.inventory[n].attribute & ATTR_BROKEN) != 0 ? 1 : 0;
+#endif
+	p.refiningLevel = sd->status.inventory[n].refine;
+	clif->addcards(&p.slot, &sd->status.inventory[n]);
+	clif->add_item_options(&p.option_data[0], &sd->status.inventory[n]);
+	clif->send(&p, sizeof(p), &sd->bl, SELF);
+#endif
+}
+
 /*==========================================
  * Main client packet processing function
  *------------------------------------------*/
@@ -23127,6 +23147,7 @@ void clif_defaults(void)
 
 	clif->camera_showWindow = clif_camera_showWindow;
 	clif->camera_change = clif_camera_change;
+	clif->item_preview = clif_item_preview;
 
 	// -- Pet Evolution
 	clif->pPetEvolution = clif_parse_pet_evolution;
diff --git a/src/map/clif.h b/src/map/clif.h
index 13c34c77d..b76c5ed70 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1554,6 +1554,7 @@ struct clif_interface {
 	void (*pMemorialDungeonCommand) (int fd, struct map_session_data *sd);
 	void (*camera_showWindow) (struct map_session_data *sd);
 	void (*camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target);
+	void (*item_preview) (struct map_session_data *sd, int n);
 };
 
 #ifdef HERCULES_CORE
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 6f3f3aeb1..c786e2457 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -451,6 +451,11 @@ enum packet_headers {
 #else
 	guildLeave = 0x15a,
 #endif
+#if PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017
+	itemPreview = 0xb13,
+#else
+	itemPreview = 0xab9,
+#endif
 };
 
 #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
@@ -2872,6 +2877,17 @@ struct PACKET_ZC_CAMERA_INFO {
 	float latitude;
 } __attribute__((packed));
 
+struct PACKET_ZC_ITEM_PREVIEW {
+	int16 packetType;
+	int16 index;
+#if PACKETVER_MAIN_NUM >= 20181017 || PACKETVER_RE_NUM >= 20181017
+	int8 isDamaged;
+#endif
+	int16 refiningLevel;
+	struct EQUIPSLOTINFO slot;
+	struct ItemOptions option_data[MAX_ITEM_OPTIONS];
+} __attribute__((packed));
+
 
 #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)
-- 
cgit v1.2.3-70-g09d2


From cf24c2af665191a9ae397ddf58badb1638a8a5bd Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Thu, 18 Oct 2018 00:42:51 +0300
Subject: Add script command itempreview for update preview window with given
 item.

---
 doc/script_commands.txt |  8 ++++++++
 src/map/script.c        | 12 ++++++++++++
 2 files changed, 20 insertions(+)

(limited to 'src/map')

diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index a80a8f2fa..4812a2cf2 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -10215,3 +10215,11 @@ account_id  - (optional) AID to perform on (default to attached player).
 returns progress on success and false on failure
 
 ---------------------------------------
+
+*itempreview(<index>)
+
+Update already opened preview window with item from
+ inventory with given index.
+Works for 20181017 RE and main clients or newer.
+
+---------------------------------------
diff --git a/src/map/script.c b/src/map/script.c
index 212c11687..e7a2fdb14 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24816,6 +24816,16 @@ static BUILDIN(changecamera)
 	return true;
 }
 
+// update preview window to given item
+static BUILDIN(itempreview)
+{
+	struct map_session_data *sd = script_rid2sd(st);
+	if (sd == NULL)
+		return false;
+	clif->item_preview(sd, script_getnum(st, 2));
+	return true;
+}
+
 /**
  * Adds a built-in script function.
  *
@@ -25550,6 +25560,8 @@ static void script_parse_builtin(void)
 		// camera
 		BUILDIN_DEF(camerainfo, ""),
 		BUILDIN_DEF(changecamera, "iii?"),
+
+		BUILDIN_DEF(itempreview, "i"),
 	};
 	int i, len = ARRAYLENGTH(BUILDIN);
 	RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up
-- 
cgit v1.2.3-70-g09d2