summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-02-09 20:14:56 +0100
committerGitHub <noreply@github.com>2020-02-09 20:14:56 +0100
commit57a71ed4da680c81a9ef313b80454b15f2c29765 (patch)
tree803ba967a4b5396181de4d1c7a692dd073122bf5
parentc6859fe3af9165b4187470d92ee39aa1ac684b1b (diff)
parent35cc058ec2a4ccf5c3fbfae4ad4687398e3e7f62 (diff)
downloadhercules-57a71ed4da680c81a9ef313b80454b15f2c29765.tar.gz
hercules-57a71ed4da680c81a9ef313b80454b15f2c29765.tar.bz2
hercules-57a71ed4da680c81a9ef313b80454b15f2c29765.tar.xz
hercules-57a71ed4da680c81a9ef313b80454b15f2c29765.zip
Merge pull request #2625 from 4144/updatepackets
Update packets up to 2020-02-06
-rw-r--r--.travis.yml16
-rw-r--r--conf/common/inter-server.conf1
-rw-r--r--doc/script_commands.txt37
-rw-r--r--npc/custom/expandedbartershop.txt63
-rw-r--r--npc/scripts_custom.conf1
-rw-r--r--sql-files/main.sql44
-rw-r--r--sql-files/upgrades/2020-01-24--01-09.sql63
-rw-r--r--sql-files/upgrades/index.txt1
-rw-r--r--src/common/packets/packets2020_len_main.h24
-rw-r--r--src/common/packets/packets2020_len_re.h24
-rw-r--r--src/common/packets/packets2020_len_zero.h4635
-rw-r--r--src/common/packets/packets_len_main.h4
-rw-r--r--src/common/packets/packets_len_re.h4
-rw-r--r--src/common/packets/packets_len_zero.h8
-rw-r--r--src/map/clif.c115
-rw-r--r--src/map/clif.h3
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/messages_main.h63
-rw-r--r--src/map/messages_re.h63
-rw-r--r--src/map/messages_zero.h79
-rw-r--r--src/map/npc.c355
-rw-r--r--src/map/npc.h18
-rw-r--r--src/map/packets.h5
-rw-r--r--src/map/packets_keys_main.h13
-rw-r--r--src/map/packets_keys_zero.h10
-rw-r--r--src/map/packets_shuffle_main.h13
-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.h66
-rw-r--r--src/map/script.c322
-rw-r--r--src/map/script.h1
32 files changed, 5986 insertions, 88 deletions
diff --git a/.travis.yml b/.travis.yml
index cb4139c38..e4497257b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,7 +47,7 @@ matrix:
- cd ../..
- ./tools/checksql.sh
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" HPM="1"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot" HPM="1"
addons:
apt:
sources:
@@ -60,7 +60,7 @@ matrix:
- libxml-sax-perl
- libxml-parser-perl
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -80,7 +80,7 @@ matrix:
- gdb
- clang-5.0
- compiler: clang
- env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -114,11 +114,11 @@ matrix:
- compiler: clang
env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot"
- compiler: gcc
- env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
- compiler: gcc
env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot"
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -136,7 +136,7 @@ matrix:
- gdb
- gcc-5
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -154,7 +154,7 @@ matrix:
- gdb
- gcc-6
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
@@ -172,7 +172,7 @@ matrix:
- gdb
- gcc-7
- compiler: gcc
- env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot"
+ env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200205 --enable-packetver-re --enable-buildbot"
addons:
apt:
sources:
diff --git a/conf/common/inter-server.conf b/conf/common/inter-server.conf
index 5bec34d44..7696774d6 100644
--- a/conf/common/inter-server.conf
+++ b/conf/common/inter-server.conf
@@ -118,6 +118,7 @@ inter_configuration: {
autotrade_data_db: "autotrade_data"
npc_market_data_db: "npc_market_data"
npc_barter_data_db: "npc_barter_data"
+ npc_expanded_barter_data_db: "npc_expanded_barter_data"
}
}
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 1d8ed786b..244de4c0c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -324,11 +324,13 @@ The types that a trader object can have are the following:
and need to be refurbished)
- NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample)
- NST_BARTER (4) Barter Shop (each item with own item currency)
+- NST_EXPANDED_BARTER (5) Expanded Barter Shop (buy items and spend zeny and items)
Unless otherwise specified via *tradertype an trader object will be defined as
NST_ZENY.
Note: NST_MARKET is only available with PACKETVER 20131223 or newer.
-Note: NST_BARTER is only available with PACKETVER 20181226 zero or newer.
+Note: NST_BARTER is only available with PACKETVER 20190116 main or 20190116 RE or 20181226 zero or newer.
+Note: NST_EXPANDED_BARTER is only available with PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer.
See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for
more information regarding how to use this NPC type.
@@ -10290,6 +10292,7 @@ when the optional NPC_Name param is used.
*sellitem(<Item_ID>{, <price>{, <qty>}})
*sellitem(<Item_ID>, <qty>, <currency_id>, <currency_amount>)
+*sellitem(<Item_ID>, <zeny>, <qty>{, <currency_id1>, <currency_amount1>{, <currency_refine1>}{, ...}})
adds (or modifies) <Item_ID> data to the shop,
when <price> is not provided (or when it is -1) itemdb default is used.
@@ -10298,7 +10301,37 @@ qty is only necessary for NST_MARKET trader types.
when <Item_ID> is already in the shop,
the previous data (price/qty), is overwritten with the new.
-currency_id and currency_amount can be used only with shop type NST_BARTER
+currency_id and currency_amount can be used only with shop type NST_BARTER.
+zeny, currency_id1, currency_amount1, currency_refine1, can be used only with
+shop type NST_EXPANDED_BARTER.
+
+---------------------------------------
+
+*startsellitem(<Item_ID>, <zeny>, <qty>)
+
+Starts adding item into expanded barter shop (NST_EXPANDED_BARTER).
+Before this command possible to use commands *sellitemcurrency.
+Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer.
+
+Alternative way for add item to expanded barter shop is *sellitem with
+currency parameters.
+
+---------------------------------------
+
+*sellitemcurrency(<Item_ID>, <qty>{, <refine>})
+
+adds <Item_ID> as currency into expanded barter shop (NST_EXPANDED_BARTER)
+If <refine> set to -1, mean for any refine level.
+if <refine> missing used value -1.
+
+Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer.
+
+---------------------------------------
+
+*endsellitem()
+
+Complete adding item into expanded barter shop (NST_EXPANDED_BARTER).
+Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer.
---------------------------------------
diff --git a/npc/custom/expandedbartershop.txt b/npc/custom/expandedbartershop.txt
new file mode 100644
index 000000000..5ba988ad9
--- /dev/null
+++ b/npc/custom/expandedbartershop.txt
@@ -0,0 +1,63 @@
+//===== Hercules Script ======================================
+//= Expanded barter shop demo
+//===== By: ==================================================
+//= 4144
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Expanded barter shop demo in prontera.
+//============================================================
+
+prontera,160,284,4 trader Expanded Barter Shop#prt 4_M_KID1,{
+ end;
+OnInit:
+ tradertype(NST_EXPANDED_BARTER);
+
+ // Selling Orange_Potion with items price and 4 items price
+ startsellitem(Orange_Potion, 2, 100000);
+ sellitemcurrency(Banana, 2);
+ sellitemcurrency(Apple, 1);
+ sellitemcurrency(Carrot, 2);
+ sellitemcurrency(Sweet_Potato, 1);
+ endsellitem();
+
+ // sell item with price only in zeny
+ sellitem(White_Herb, 1, 100);
+ // sell item with zeny and item price
+ sellitem(Blue_Herb, 22, 200, Orange_Potion, 2, 3);
+
+ // sell item with price only in zeny (infinite amount)
+ sellitem(Green_Herb, 3, -1);
+
+ // sell item with zeny and two items price (1)
+ sellitem(Orange_Potion, 20, 100000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ // sell item with zeny and two items price (same as before but with different zeny price)
+ sellitem(Orange_Potion, 1, 100000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ // sell item with item price
+ sellitem(Blade, 0, 1000, Sword, 2, -1);
+
+ // sell item with zeny and two items price
+ sellitem(Scimiter, 2000, -1, Sword, 1, 2, Sword, 1, 5);
+
+ // sell item with zeny and two items price (selling another Orange_Potion)
+ sellitem(Orange_Potion, 1, 100000, Green_Herb, 2, -1);
+
+ // modify selling Orange_Potion with items price (same as previous)
+ // modification reset amount stored in db
+ startsellitem(Orange_Potion, 1, 100);
+ sellitemcurrency(Green_Herb, 2);
+ endsellitem();
+
+ // sell item with zeny and item price (selling another White_Herb)
+ sellitem(White_Herb, 10, 100, Banana, 1, -1);
+
+ // stop selling blades
+// stopselling(Blade, 1);
+
+ // sell item with zeny and two items price (modify amount for entry (1))
+// sellitem(Orange_Potion, 1, 200000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ end;
+}
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
index 4e346238f..bf970b8ca 100644
--- a/npc/scripts_custom.conf
+++ b/npc/scripts_custom.conf
@@ -51,6 +51,7 @@
//"npc/custom/item_signer.txt",
//"npc/custom/woe_controller.txt",
//"npc/custom/bartershop.txt",
+//"npc/custom/expandedbartershop.txt",
//================= Other Scripts =========================================
// -- MVP Arena
diff --git a/sql-files/main.sql b/sql-files/main.sql
index 258c7293a..4e75ccc8b 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -935,6 +935,7 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1565293394); -- 2019-08-0
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1570309293); -- 2019-10-05--19-01.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1570870260); -- 2019-10-21--14-21.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1574463539); -- 2019-11-22--23-58.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1579817630); -- 2020-01-24--01-09.sql
--
-- Table structure for table `storage`
@@ -1032,3 +1033,46 @@ CREATE TABLE IF NOT EXISTS `npc_barter_data` (
`priceAmount` INT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`name`, `itemid`, `priceId`, `priceAmount`)
) ENGINE=MyISAM;
+
+CREATE TABLE IF NOT EXISTS `npc_expanded_barter_data` (
+ `name` VARCHAR(24) NOT NULL DEFAULT '',
+ `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyId1` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount1` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine1` INT(11) NOT NULL DEFAULT '0',
+ `currencyId2` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount2` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine2` INT(11) NOT NULL DEFAULT '0',
+ `currencyId3` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount3` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine3` INT(11) NOT NULL DEFAULT '0',
+ `currencyId4` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount4` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine4` INT(11) NOT NULL DEFAULT '0',
+ `currencyId5` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount5` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine5` INT(11) NOT NULL DEFAULT '0',
+ `currencyId6` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount6` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine6` INT(11) NOT NULL DEFAULT '0',
+ `currencyId7` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount7` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine7` INT(11) NOT NULL DEFAULT '0',
+ `currencyId8` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount8` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine8` INT(11) NOT NULL DEFAULT '0',
+ `currencyId9` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount9` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine9` INT(11) NOT NULL DEFAULT '0',
+ `currencyId10` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount10` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine10` INT(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`name`, `itemid`, `zeny`,
+ `currencyId1`, `currencyAmount1`, `currencyRefine1`,
+ `currencyId2`, `currencyAmount2`, `currencyRefine2`,
+ `currencyId3`, `currencyAmount3`, `currencyRefine3`,
+ `currencyId4`, `currencyAmount4`, `currencyRefine4`
+)
+) ENGINE=MyISAM;
diff --git a/sql-files/upgrades/2020-01-24--01-09.sql b/sql-files/upgrades/2020-01-24--01-09.sql
new file mode 100644
index 000000000..2370b267f
--- /dev/null
+++ b/sql-files/upgrades/2020-01-24--01-09.sql
@@ -0,0 +1,63 @@
+#1579817630
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2013-2020 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+CREATE TABLE IF NOT EXISTS `npc_expanded_barter_data` (
+ `name` VARCHAR(24) NOT NULL DEFAULT '',
+ `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyId1` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount1` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine1` INT(11) NOT NULL DEFAULT '0',
+ `currencyId2` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount2` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine2` INT(11) NOT NULL DEFAULT '0',
+ `currencyId3` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount3` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine3` INT(11) NOT NULL DEFAULT '0',
+ `currencyId4` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount4` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine4` INT(11) NOT NULL DEFAULT '0',
+ `currencyId5` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount5` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine5` INT(11) NOT NULL DEFAULT '0',
+ `currencyId6` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount6` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine6` INT(11) NOT NULL DEFAULT '0',
+ `currencyId7` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount7` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine7` INT(11) NOT NULL DEFAULT '0',
+ `currencyId8` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount8` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine8` INT(11) NOT NULL DEFAULT '0',
+ `currencyId9` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount9` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine9` INT(11) NOT NULL DEFAULT '0',
+ `currencyId10` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyAmount10` INT(11) UNSIGNED NOT NULL DEFAULT '0',
+ `currencyRefine10` INT(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`name`, `itemid`, `zeny`,
+ `currencyId1`, `currencyAmount1`, `currencyRefine1`,
+ `currencyId2`, `currencyAmount2`, `currencyRefine2`,
+ `currencyId3`, `currencyAmount3`, `currencyRefine3`,
+ `currencyId4`, `currencyAmount4`, `currencyRefine4`
+)
+) ENGINE=MyISAM;
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1579817630);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index f7fc2ac79..1ddd8b831 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -59,3 +59,4 @@
2019-10-05--19-01.sql
2019-10-12--14-21.sql
2019-11-22--23-58.sql
+2020-01-24--01-09.sql
diff --git a/src/common/packets/packets2020_len_main.h b/src/common/packets/packets2020_len_main.h
index a85cddb29..3349c9872 100644
--- a/src/common/packets/packets2020_len_main.h
+++ b/src/common/packets/packets2020_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -4611,5 +4611,25 @@ packetLen(0x0b6d, 6)
// Packet: 0x0b6e
packetLen(0x0b6e, 14)
+// Packet: 0x0b6f
+#if PACKETVER >= 20200122
+packetLen(0x0b6f, 177)
+#endif
+
+// Packet: 0x0b70
+#if PACKETVER >= 20200122
+packetLen(0x0b70, 8)
+#endif
+
+// Packet: 0x0b71
+#if PACKETVER >= 20200122
+packetLen(0x0b71, 177)
+#endif
+
+// Packet: 0x0b72
+#if PACKETVER >= 20200122
+packetLen(0x0b72, 4)
+#endif
+
#endif /* COMMON_PACKETS2020_LEN_MAIN_H */
diff --git a/src/common/packets/packets2020_len_re.h b/src/common/packets/packets2020_len_re.h
index 6e72cbb7d..b33278c1c 100644
--- a/src/common/packets/packets2020_len_re.h
+++ b/src/common/packets/packets2020_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -4617,5 +4617,25 @@ packetLen(0x0b6d, 6)
// Packet: 0x0b6e
packetLen(0x0b6e, 14)
+// Packet: 0x0b6f
+#if PACKETVER >= 20200122
+packetLen(0x0b6f, 177)
+#endif
+
+// Packet: 0x0b70
+#if PACKETVER >= 20200122
+packetLen(0x0b70, 8)
+#endif
+
+// Packet: 0x0b71
+#if PACKETVER >= 20200122
+packetLen(0x0b71, 177)
+#endif
+
+// Packet: 0x0b72
+#if PACKETVER >= 20200122
+packetLen(0x0b72, 4)
+#endif
+
#endif /* COMMON_PACKETS2020_LEN_RE_H */
diff --git a/src/common/packets/packets2020_len_zero.h b/src/common/packets/packets2020_len_zero.h
new file mode 100644
index 000000000..153b66286
--- /dev/null
+++ b/src/common/packets/packets2020_len_zero.h
@@ -0,0 +1,4635 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef COMMON_PACKETS2020_LEN_ZERO_H
+#define COMMON_PACKETS2020_LEN_ZERO_H
+
+/* This file is autogenerated, please do not commit manual changes */
+
+// Packet: 0x0064
+packetLen(0x0064, 55)
+
+// Packet: 0x0065
+packetLen(0x0065, 17)
+
+// Packet: 0x0066
+packetLen(0x0066, 3)
+
+// Packet: 0x0067
+packetLen(0x0067, 37)
+
+// Packet: 0x0068
+packetLen(0x0068, 46)
+
+// Packet: 0x0069
+packetLen(0x0069, -1)
+
+// Packet: 0x006a
+packetLen(0x006a, 23)
+
+// Packet: 0x006b
+packetLen(0x006b, -1)
+
+// Packet: 0x006c
+packetLen(0x006c, 3)
+
+// Packet: 0x006d
+packetLen(0x006d, 157)
+
+// Packet: 0x006e
+packetLen(0x006e, 3)
+
+// Packet: 0x006f
+packetLen(0x006f, 2)
+
+// Packet: 0x0070
+packetLen(0x0070, 3)
+
+// Packet: 0x0071
+packetLen(0x0071, 28)
+
+// Packet: 0x0072
+packetLen(0x0072, 22)
+
+// Packet: 0x0073
+packetLen(0x0073, 11)
+
+// Packet: 0x0074
+packetLen(0x0074, 3)
+
+// Packet: 0x0075
+packetLen(0x0075, -1)
+
+// Packet: 0x0076
+packetLen(0x0076, 9)
+
+// Packet: 0x0077
+packetLen(0x0077, 5)
+
+// Packet: 0x0078
+packetLen(0x0078, 55)
+
+// Packet: 0x0079
+packetLen(0x0079, 53)
+
+// Packet: 0x007a
+packetLen(0x007a, 58)
+
+// Packet: 0x007b
+packetLen(0x007b, 60)
+
+// Packet: 0x007c
+packetLen(0x007c, 44)
+
+// Packet: 0x007d
+packetLen(0x007d, 2)
+
+// Packet: 0x007e
+packetLen(0x007e, 46)
+
+// Packet: 0x007f
+packetLen(0x007f, 6)
+
+// Packet: 0x0080
+packetLen(0x0080, 7)
+
+// Packet: 0x0081
+packetLen(0x0081, 3)
+
+// Packet: 0x0082
+packetLen(0x0082, 2)
+
+// Packet: 0x0083
+packetLen(0x0083, 2)
+
+// Packet: 0x0084
+packetLen(0x0084, 2)
+
+// Packet: 0x0085
+packetLen(0x0085, 10)
+
+// Packet: 0x0086
+packetLen(0x0086, 16)
+
+// Packet: 0x0087
+packetLen(0x0087, 12)
+
+// Packet: 0x0088
+packetLen(0x0088, 10)
+
+// Packet: 0x0089
+packetLen(0x0089, 11)
+
+// Packet: 0x008a
+packetLen(0x008a, 29)
+
+// Packet: 0x008b
+packetLen(0x008b, 23)
+
+// Packet: 0x008c
+packetLen(0x008c, 14)
+
+// Packet: 0x008d
+packetLen(0x008d, -1)
+
+// Packet: 0x008e
+packetLen(0x008e, -1)
+
+// Packet: 0x0090
+packetLen(0x0090, 7)
+
+// Packet: 0x0091
+packetLen(0x0091, 22)
+
+// Packet: 0x0092
+packetLen(0x0092, 28)
+
+// Packet: 0x0093
+packetLen(0x0093, 2)
+
+// Packet: 0x0094
+packetLen(0x0094, 19)
+
+// Packet: 0x0095
+packetLen(0x0095, 30)
+
+// Packet: 0x0096
+packetLen(0x0096, -1)
+
+// Packet: 0x0097
+packetLen(0x0097, -1)
+
+// Packet: 0x0098
+packetLen(0x0098, 3)
+
+// Packet: 0x0099
+packetLen(0x0099, -1)
+
+// Packet: 0x009a
+packetLen(0x009a, -1)
+
+// Packet: 0x009b
+packetLen(0x009b, 34)
+
+// Packet: 0x009c
+packetLen(0x009c, 9)
+
+// Packet: 0x009d
+packetLen(0x009d, 19)
+
+// Packet: 0x009e
+packetLen(0x009e, 19)
+
+// Packet: 0x009f
+packetLen(0x009f, 20)
+
+// Packet: 0x00a0
+packetLen(0x00a0, 33)
+
+// Packet: 0x00a1
+packetLen(0x00a1, 6)
+
+// Packet: 0x00a2
+packetLen(0x00a2, 14)
+
+// Packet: 0x00a3
+packetLen(0x00a3, -1)
+
+// Packet: 0x00a4
+packetLen(0x00a4, -1)
+
+// Packet: 0x00a5
+packetLen(0x00a5, -1)
+
+// Packet: 0x00a6
+packetLen(0x00a6, -1)
+
+// Packet: 0x00a7
+packetLen(0x00a7, 9)
+
+// Packet: 0x00a8
+packetLen(0x00a8, 7)
+
+// Packet: 0x00a9
+packetLen(0x00a9, 6)
+
+// Packet: 0x00aa
+packetLen(0x00aa, 9)
+
+// Packet: 0x00ab
+packetLen(0x00ab, 4)
+
+// Packet: 0x00ac
+packetLen(0x00ac, 7)
+
+// Packet: 0x00ae
+packetLen(0x00ae, -1)
+
+// Packet: 0x00af
+packetLen(0x00af, 6)
+
+// Packet: 0x00b0
+packetLen(0x00b0, 8)
+
+// Packet: 0x00b1
+packetLen(0x00b1, 8)
+
+// Packet: 0x00b2
+packetLen(0x00b2, 3)
+
+// Packet: 0x00b3
+packetLen(0x00b3, 3)
+
+// Packet: 0x00b4
+packetLen(0x00b4, -1)
+
+// Packet: 0x00b5
+packetLen(0x00b5, 6)
+
+// Packet: 0x00b6
+packetLen(0x00b6, 6)
+
+// Packet: 0x00b7
+packetLen(0x00b7, -1)
+
+// Packet: 0x00b8
+packetLen(0x00b8, 7)
+
+// Packet: 0x00b9
+packetLen(0x00b9, 6)
+
+// Packet: 0x00ba
+packetLen(0x00ba, 2)
+
+// Packet: 0x00bb
+packetLen(0x00bb, 5)
+
+// Packet: 0x00bc
+packetLen(0x00bc, 6)
+
+// Packet: 0x00bd
+packetLen(0x00bd, 44)
+
+// Packet: 0x00be
+packetLen(0x00be, 5)
+
+// Packet: 0x00bf
+packetLen(0x00bf, 3)
+
+// Packet: 0x00c0
+packetLen(0x00c0, 7)
+
+// Packet: 0x00c1
+packetLen(0x00c1, 2)
+
+// Packet: 0x00c2
+packetLen(0x00c2, 6)
+
+// Packet: 0x00c3
+packetLen(0x00c3, 8)
+
+// Packet: 0x00c4
+packetLen(0x00c4, 6)
+
+// Packet: 0x00c5
+packetLen(0x00c5, 7)
+
+// Packet: 0x00c6
+packetLen(0x00c6, -1)
+
+// Packet: 0x00c7
+packetLen(0x00c7, -1)
+
+// Packet: 0x00c8
+packetLen(0x00c8, -1)
+
+// Packet: 0x00c9
+packetLen(0x00c9, -1)
+
+// Packet: 0x00ca
+packetLen(0x00ca, 3)
+
+// Packet: 0x00cb
+packetLen(0x00cb, 3)
+
+// Packet: 0x00cc
+packetLen(0x00cc, 6)
+
+// Packet: 0x00cd
+packetLen(0x00cd, 3)
+
+// Packet: 0x00ce
+packetLen(0x00ce, 2)
+
+// Packet: 0x00cf
+packetLen(0x00cf, 27)
+
+// Packet: 0x00d0
+packetLen(0x00d0, 3)
+
+// Packet: 0x00d1
+packetLen(0x00d1, 4)
+
+// Packet: 0x00d2
+packetLen(0x00d2, 4)
+
+// Packet: 0x00d3
+packetLen(0x00d3, 2)
+
+// Packet: 0x00d4
+packetLen(0x00d4, -1)
+
+// Packet: 0x00d5
+packetLen(0x00d5, -1)
+
+// Packet: 0x00d6
+packetLen(0x00d6, 3)
+
+// Packet: 0x00d7
+packetLen(0x00d7, -1)
+
+// Packet: 0x00d8
+packetLen(0x00d8, 6)
+
+// Packet: 0x00d9
+packetLen(0x00d9, 14)
+
+// Packet: 0x00da
+packetLen(0x00da, 3)
+
+// Packet: 0x00db
+packetLen(0x00db, -1)
+
+// Packet: 0x00dc
+packetLen(0x00dc, 28)
+
+// Packet: 0x00dd
+packetLen(0x00dd, 29)
+
+// Packet: 0x00de
+packetLen(0x00de, -1)
+
+// Packet: 0x00df
+packetLen(0x00df, -1)
+
+// Packet: 0x00e0
+packetLen(0x00e0, 30)
+
+// Packet: 0x00e1
+packetLen(0x00e1, 30)
+
+// Packet: 0x00e2
+packetLen(0x00e2, 26)
+
+// Packet: 0x00e3
+packetLen(0x00e3, 2)
+
+// Packet: 0x00e4
+packetLen(0x00e4, 6)
+
+// Packet: 0x00e5
+packetLen(0x00e5, 26)
+
+// Packet: 0x00e6
+packetLen(0x00e6, 3)
+
+// Packet: 0x00e7
+packetLen(0x00e7, 3)
+
+// Packet: 0x00e8
+packetLen(0x00e8, 8)
+
+// Packet: 0x00e9
+packetLen(0x00e9, 29)
+
+// Packet: 0x00ea
+packetLen(0x00ea, 5)
+
+// Packet: 0x00eb
+packetLen(0x00eb, 2)
+
+// Packet: 0x00ec
+packetLen(0x00ec, 3)
+
+// Packet: 0x00ed
+packetLen(0x00ed, 2)
+
+// Packet: 0x00ee
+packetLen(0x00ee, 2)
+
+// Packet: 0x00ef
+packetLen(0x00ef, 2)
+
+// Packet: 0x00f0
+packetLen(0x00f0, 3)
+
+// Packet: 0x00f1
+packetLen(0x00f1, 2)
+
+// Packet: 0x00f2
+packetLen(0x00f2, 6)
+
+// Packet: 0x00f3
+packetLen(0x00f3, -1)
+
+// Packet: 0x00f4
+packetLen(0x00f4, 31)
+
+// Packet: 0x00f5
+packetLen(0x00f5, 11)
+
+// Packet: 0x00f6
+packetLen(0x00f6, 8)
+
+// Packet: 0x00f7
+packetLen(0x00f7, 17)
+
+// Packet: 0x00f8
+packetLen(0x00f8, 2)
+
+// Packet: 0x00f9
+packetLen(0x00f9, 26)
+
+// Packet: 0x00fa
+packetLen(0x00fa, 3)
+
+// Packet: 0x00fb
+packetLen(0x00fb, -1)
+
+// Packet: 0x00fc
+packetLen(0x00fc, 6)
+
+// Packet: 0x00fd
+packetLen(0x00fd, 27)
+
+// Packet: 0x00fe
+packetLen(0x00fe, 30)
+
+// Packet: 0x00ff
+packetLen(0x00ff, 10)
+
+// Packet: 0x0100
+packetLen(0x0100, 2)
+
+// Packet: 0x0101
+packetLen(0x0101, 6)
+
+// Packet: 0x0102
+packetLen(0x0102, 6)
+
+// Packet: 0x0103
+packetLen(0x0103, 30)
+
+// Packet: 0x0104
+packetLen(0x0104, 79)
+
+// Packet: 0x0105
+packetLen(0x0105, 31)
+
+// Packet: 0x0106
+packetLen(0x0106, 10)
+
+// Packet: 0x0107
+packetLen(0x0107, 10)
+
+// Packet: 0x0108
+packetLen(0x0108, -1)
+
+// Packet: 0x0109
+packetLen(0x0109, -1)
+
+// Packet: 0x010a
+packetLen(0x010a, 6)
+
+// Packet: 0x010b
+packetLen(0x010b, 6)
+
+// Packet: 0x010c
+packetLen(0x010c, 6)
+
+// Packet: 0x010d
+packetLen(0x010d, 2)
+
+// Packet: 0x010e
+packetLen(0x010e, 11)
+
+// Packet: 0x010f
+packetLen(0x010f, -1)
+
+// Packet: 0x0110
+packetLen(0x0110, 14)
+
+// Packet: 0x0111
+packetLen(0x0111, 39)
+
+// Packet: 0x0112
+packetLen(0x0112, 4)
+
+// Packet: 0x0113
+packetLen(0x0113, 25)
+
+// Packet: 0x0114
+packetLen(0x0114, 31)
+
+// Packet: 0x0115
+packetLen(0x0115, 35)
+
+// Packet: 0x0116
+packetLen(0x0116, 17)
+
+// Packet: 0x0117
+packetLen(0x0117, 18)
+
+// Packet: 0x0118
+packetLen(0x0118, 2)
+
+// Packet: 0x0119
+packetLen(0x0119, 13)
+
+// Packet: 0x011a
+packetLen(0x011a, 15)
+
+// Packet: 0x011b
+packetLen(0x011b, 20)
+
+// Packet: 0x011c
+packetLen(0x011c, 68)
+
+// Packet: 0x011d
+packetLen(0x011d, 2)
+
+// Packet: 0x011e
+packetLen(0x011e, 3)
+
+// Packet: 0x011f
+packetLen(0x011f, 16)
+
+// Packet: 0x0120
+packetLen(0x0120, 6)
+
+// Packet: 0x0121
+packetLen(0x0121, 14)
+
+// Packet: 0x0122
+packetLen(0x0122, -1)
+
+// Packet: 0x0123
+packetLen(0x0123, -1)
+
+// Packet: 0x0124
+packetLen(0x0124, 31)
+
+// Packet: 0x0125
+packetLen(0x0125, 8)
+
+// Packet: 0x0126
+packetLen(0x0126, 8)
+
+// Packet: 0x0127
+packetLen(0x0127, 8)
+
+// Packet: 0x0128
+packetLen(0x0128, 8)
+
+// Packet: 0x0129
+packetLen(0x0129, 8)
+
+// Packet: 0x012a
+packetLen(0x012a, 2)
+
+// Packet: 0x012b
+packetLen(0x012b, 2)
+
+// Packet: 0x012c
+packetLen(0x012c, 3)
+
+// Packet: 0x012d
+packetLen(0x012d, 4)
+
+// Packet: 0x012e
+packetLen(0x012e, 2)
+
+// Packet: 0x012f
+packetLen(0x012f, -1)
+
+// Packet: 0x0130
+packetLen(0x0130, 6)
+
+// Packet: 0x0131
+packetLen(0x0131, 86)
+
+// Packet: 0x0132
+packetLen(0x0132, 6)
+
+// Packet: 0x0133
+packetLen(0x0133, -1)
+
+// Packet: 0x0134
+packetLen(0x0134, -1)
+
+// Packet: 0x0135
+packetLen(0x0135, 7)
+
+// Packet: 0x0136
+packetLen(0x0136, -1)
+
+// Packet: 0x0137
+packetLen(0x0137, 6)
+
+// Packet: 0x0138
+packetLen(0x0138, 3)
+
+// Packet: 0x0139
+packetLen(0x0139, 16)
+
+// Packet: 0x013a
+packetLen(0x013a, 4)
+
+// Packet: 0x013b
+packetLen(0x013b, 4)
+
+// Packet: 0x013c
+packetLen(0x013c, 4)
+
+// Packet: 0x013d
+packetLen(0x013d, 6)
+
+// Packet: 0x013e
+packetLen(0x013e, 24)
+
+// Packet: 0x013f
+packetLen(0x013f, 26)
+
+// Packet: 0x0140
+packetLen(0x0140, 22)
+
+// Packet: 0x0141
+packetLen(0x0141, 14)
+
+// Packet: 0x0142
+packetLen(0x0142, 6)
+
+// Packet: 0x0143
+packetLen(0x0143, 10)
+
+// Packet: 0x0144
+packetLen(0x0144, 23)
+
+// Packet: 0x0145
+packetLen(0x0145, 19)
+
+// Packet: 0x0146
+packetLen(0x0146, 6)
+
+// Packet: 0x0147
+packetLen(0x0147, 39)
+
+// Packet: 0x0148
+packetLen(0x0148, 8)
+
+// Packet: 0x0149
+packetLen(0x0149, 9)
+
+// Packet: 0x014a
+packetLen(0x014a, 6)
+
+// Packet: 0x014b
+packetLen(0x014b, 27)
+
+// Packet: 0x014c
+packetLen(0x014c, -1)
+
+// Packet: 0x014d
+packetLen(0x014d, 2)
+
+// Packet: 0x014e
+packetLen(0x014e, 6)
+
+// Packet: 0x014f
+packetLen(0x014f, 6)
+
+// Packet: 0x0150
+packetLen(0x0150, 110)
+
+// Packet: 0x0151
+packetLen(0x0151, 6)
+
+// Packet: 0x0152
+packetLen(0x0152, -1)
+
+// Packet: 0x0153
+packetLen(0x0153, -1)
+
+// Packet: 0x0154
+packetLen(0x0154, -1)
+
+// Packet: 0x0155
+packetLen(0x0155, -1)
+
+// Packet: 0x0156
+packetLen(0x0156, -1)
+
+// Packet: 0x0157
+packetLen(0x0157, 6)
+
+// Packet: 0x0159
+packetLen(0x0159, 54)
+
+// Packet: 0x015a
+packetLen(0x015a, 66)
+
+// Packet: 0x015b
+packetLen(0x015b, 54)
+
+// Packet: 0x015c
+packetLen(0x015c, 90)
+
+// Packet: 0x015d
+packetLen(0x015d, 42)
+
+// Packet: 0x015e
+packetLen(0x015e, 6)
+
+// Packet: 0x015f
+packetLen(0x015f, 42)
+
+// Packet: 0x0160
+packetLen(0x0160, -1)
+
+// Packet: 0x0161
+packetLen(0x0161, -1)
+
+// Packet: 0x0162
+packetLen(0x0162, -1)
+
+// Packet: 0x0163
+packetLen(0x0163, -1)
+
+// Packet: 0x0164
+packetLen(0x0164, -1)
+
+// Packet: 0x0165
+packetLen(0x0165, 30)
+
+// Packet: 0x0166
+packetLen(0x0166, -1)
+
+// Packet: 0x0167
+packetLen(0x0167, 3)
+
+// Packet: 0x0168
+packetLen(0x0168, 14)
+
+// Packet: 0x0169
+packetLen(0x0169, 3)
+
+// Packet: 0x016a
+packetLen(0x016a, 30)
+
+// Packet: 0x016b
+packetLen(0x016b, 10)
+
+// Packet: 0x016c
+packetLen(0x016c, 43)
+
+// Packet: 0x016d
+packetLen(0x016d, 14)
+
+// Packet: 0x016e
+packetLen(0x016e, 186)
+
+// Packet: 0x016f
+packetLen(0x016f, 182)
+
+// Packet: 0x0170
+packetLen(0x0170, 14)
+
+// Packet: 0x0171
+packetLen(0x0171, 30)
+
+// Packet: 0x0172
+packetLen(0x0172, 10)
+
+// Packet: 0x0173
+packetLen(0x0173, 3)
+
+// Packet: 0x0174
+packetLen(0x0174, -1)
+
+// Packet: 0x0175
+packetLen(0x0175, 6)
+
+// Packet: 0x0176
+packetLen(0x0176, 106)
+
+// Packet: 0x0177
+packetLen(0x0177, -1)
+
+// Packet: 0x0178
+packetLen(0x0178, 4)
+
+// Packet: 0x0179
+packetLen(0x0179, 5)
+
+// Packet: 0x017a
+packetLen(0x017a, 4)
+
+// Packet: 0x017b
+packetLen(0x017b, -1)
+
+// Packet: 0x017c
+packetLen(0x017c, 6)
+
+// Packet: 0x017d
+packetLen(0x017d, 7)
+
+// Packet: 0x017e
+packetLen(0x017e, -1)
+
+// Packet: 0x017f
+packetLen(0x017f, -1)
+
+// Packet: 0x0180
+packetLen(0x0180, 6)
+
+// Packet: 0x0181
+packetLen(0x0181, 3)
+
+// Packet: 0x0182
+packetLen(0x0182, 106)
+
+// Packet: 0x0183
+packetLen(0x0183, 10)
+
+// Packet: 0x0184
+packetLen(0x0184, 10)
+
+// Packet: 0x0185
+packetLen(0x0185, 34)
+
+// Packet: 0x0187
+packetLen(0x0187, 6)
+
+// Packet: 0x0188
+packetLen(0x0188, 8)
+
+// Packet: 0x0189
+packetLen(0x0189, 4)
+
+// Packet: 0x018a
+packetLen(0x018a, 4)
+
+// Packet: 0x018b
+packetLen(0x018b, 4)
+
+// Packet: 0x018c
+packetLen(0x018c, 29)
+
+// Packet: 0x018d
+packetLen(0x018d, -1)
+
+// Packet: 0x018e
+packetLen(0x018e, 18)
+
+// Packet: 0x018f
+packetLen(0x018f, 8)
+
+// Packet: 0x0190
+packetLen(0x0190, 23)
+
+// Packet: 0x0191
+packetLen(0x0191, 27)
+
+// Packet: 0x0192
+packetLen(0x0192, 24)
+
+// Packet: 0x0193
+packetLen(0x0193, 2)
+
+// Packet: 0x0194
+packetLen(0x0194, 30)
+
+// Packet: 0x0195
+packetLen(0x0195, 102)
+
+// Packet: 0x0196
+packetLen(0x0196, 9)
+
+// Packet: 0x0197
+packetLen(0x0197, 4)
+
+// Packet: 0x0198
+packetLen(0x0198, 8)
+
+// Packet: 0x0199
+packetLen(0x0199, 4)
+
+// Packet: 0x019a
+packetLen(0x019a, 14)
+
+// Packet: 0x019b
+packetLen(0x019b, 10)
+
+// Packet: 0x019c
+packetLen(0x019c, -1)
+
+// Packet: 0x019d
+packetLen(0x019d, 6)
+
+// Packet: 0x019e
+packetLen(0x019e, 2)
+
+// Packet: 0x019f
+packetLen(0x019f, 6)
+
+// Packet: 0x01a0
+packetLen(0x01a0, 3)
+
+// Packet: 0x01a1
+packetLen(0x01a1, 3)
+
+// Packet: 0x01a2
+packetLen(0x01a2, 37)
+
+// Packet: 0x01a3
+packetLen(0x01a3, 7)
+
+// Packet: 0x01a4
+packetLen(0x01a4, 11)
+
+// Packet: 0x01a5
+packetLen(0x01a5, 26)
+
+// Packet: 0x01a6
+packetLen(0x01a6, -1)
+
+// Packet: 0x01a7
+packetLen(0x01a7, 4)
+
+// Packet: 0x01a8
+packetLen(0x01a8, 4)
+
+// Packet: 0x01a9
+packetLen(0x01a9, 6)
+
+// Packet: 0x01aa
+packetLen(0x01aa, 10)
+
+// Packet: 0x01ab
+packetLen(0x01ab, 12)
+
+// Packet: 0x01ac
+packetLen(0x01ac, 6)
+
+// Packet: 0x01ad
+packetLen(0x01ad, -1)
+
+// Packet: 0x01ae
+packetLen(0x01ae, 6)
+
+// Packet: 0x01af
+packetLen(0x01af, 4)
+
+// Packet: 0x01b0
+packetLen(0x01b0, 11)
+
+// Packet: 0x01b1
+packetLen(0x01b1, 7)
+
+// Packet: 0x01b2
+packetLen(0x01b2, -1)
+
+// Packet: 0x01b3
+packetLen(0x01b3, 67)
+
+// Packet: 0x01b4
+packetLen(0x01b4, 12)
+
+// Packet: 0x01b5
+packetLen(0x01b5, 18)
+
+// Packet: 0x01b6
+packetLen(0x01b6, 114)
+
+// Packet: 0x01b7
+packetLen(0x01b7, 6)
+
+// Packet: 0x01b8
+packetLen(0x01b8, 3)
+
+// Packet: 0x01b9
+packetLen(0x01b9, 6)
+
+// Packet: 0x01ba
+packetLen(0x01ba, 26)
+
+// Packet: 0x01bb
+packetLen(0x01bb, 26)
+
+// Packet: 0x01bc
+packetLen(0x01bc, 26)
+
+// Packet: 0x01bd
+packetLen(0x01bd, 26)
+
+// Packet: 0x01be
+packetLen(0x01be, 2)
+
+// Packet: 0x01bf
+packetLen(0x01bf, 3)
+
+// Packet: 0x01c0
+packetLen(0x01c0, 2)
+
+// Packet: 0x01c1
+packetLen(0x01c1, 14)
+
+// Packet: 0x01c2
+packetLen(0x01c2, 10)
+
+// Packet: 0x01c3
+packetLen(0x01c3, -1)
+
+// Packet: 0x01c4
+packetLen(0x01c4, 32)
+
+// Packet: 0x01c5
+packetLen(0x01c5, 32)
+
+// Packet: 0x01c6
+packetLen(0x01c6, 4)
+
+// Packet: 0x01c7
+packetLen(0x01c7, 2)
+
+// Packet: 0x01c8
+packetLen(0x01c8, 15)
+
+// Packet: 0x01c9
+packetLen(0x01c9, 97)
+
+// Packet: 0x01ca
+packetLen(0x01ca, 3)
+
+// Packet: 0x01cb
+packetLen(0x01cb, 9)
+
+// Packet: 0x01cc
+packetLen(0x01cc, 9)
+
+// Packet: 0x01cd
+packetLen(0x01cd, 30)
+
+// Packet: 0x01ce
+packetLen(0x01ce, 6)
+
+// Packet: 0x01cf
+packetLen(0x01cf, 28)
+
+// Packet: 0x01d0
+packetLen(0x01d0, 8)
+
+// Packet: 0x01d1
+packetLen(0x01d1, 14)
+
+// Packet: 0x01d2
+packetLen(0x01d2, 10)
+
+// Packet: 0x01d3
+packetLen(0x01d3, 35)
+
+// Packet: 0x01d4
+packetLen(0x01d4, 6)
+
+// Packet: 0x01d5
+packetLen(0x01d5, -1)
+
+// Packet: 0x01d6
+packetLen(0x01d6, 4)
+
+// Packet: 0x01d7
+packetLen(0x01d7, 15)
+
+// Packet: 0x01d8
+packetLen(0x01d8, 58)
+
+// Packet: 0x01d9
+packetLen(0x01d9, 57)
+
+// Packet: 0x01da
+packetLen(0x01da, 64)
+
+// Packet: 0x01db
+packetLen(0x01db, 2)
+
+// Packet: 0x01dc
+packetLen(0x01dc, -1)
+
+// Packet: 0x01dd
+packetLen(0x01dd, 47)
+
+// Packet: 0x01de
+packetLen(0x01de, 33)
+
+// Packet: 0x01df
+packetLen(0x01df, 6)
+
+// Packet: 0x01e0
+packetLen(0x01e0, 30)
+
+// Packet: 0x01e1
+packetLen(0x01e1, 8)
+
+// Packet: 0x01e2
+packetLen(0x01e2, 34)
+
+// Packet: 0x01e3
+packetLen(0x01e3, 14)
+
+// Packet: 0x01e4
+packetLen(0x01e4, 2)
+
+// Packet: 0x01e5
+packetLen(0x01e5, 6)
+
+// Packet: 0x01e6
+packetLen(0x01e6, 26)
+
+// Packet: 0x01e7
+packetLen(0x01e7, 2)
+
+// Packet: 0x01e8
+packetLen(0x01e8, 28)
+
+// Packet: 0x01e9
+packetLen(0x01e9, 81)
+
+// Packet: 0x01ea
+packetLen(0x01ea, 6)
+
+// Packet: 0x01eb
+packetLen(0x01eb, 10)
+
+// Packet: 0x01ec
+packetLen(0x01ec, 26)
+
+// Packet: 0x01ed
+packetLen(0x01ed, 2)
+
+// Packet: 0x01ee
+packetLen(0x01ee, -1)
+
+// Packet: 0x01ef
+packetLen(0x01ef, -1)
+
+// Packet: 0x01f0
+packetLen(0x01f0, -1)
+
+// Packet: 0x01f1
+packetLen(0x01f1, -1)
+
+// Packet: 0x01f2
+packetLen(0x01f2, 20)
+
+// Packet: 0x01f3
+packetLen(0x01f3, 10)
+
+// Packet: 0x01f4
+packetLen(0x01f4, 32)
+
+// Packet: 0x01f5
+packetLen(0x01f5, 9)
+
+// Packet: 0x01f6
+packetLen(0x01f6, 34)
+
+// Packet: 0x01f7
+packetLen(0x01f7, 14)
+
+// Packet: 0x01f8
+packetLen(0x01f8, 2)
+
+// Packet: 0x01f9
+packetLen(0x01f9, 6)
+
+// Packet: 0x01fa
+packetLen(0x01fa, 48)
+
+// Packet: 0x01fb
+packetLen(0x01fb, 56)
+
+// Packet: 0x01fc
+packetLen(0x01fc, -1)
+
+// Packet: 0x01fd
+packetLen(0x01fd, 25)
+
+// Packet: 0x01fe
+packetLen(0x01fe, 5)
+
+// Packet: 0x01ff
+packetLen(0x01ff, 10)
+
+// Packet: 0x0200
+packetLen(0x0200, 26)
+
+// Packet: 0x0201
+packetLen(0x0201, -1)
+
+// Packet: 0x0202
+packetLen(0x0202, 26)
+
+// Packet: 0x0203
+packetLen(0x0203, 10)
+
+// Packet: 0x0204
+packetLen(0x0204, 18)
+
+// Packet: 0x0205
+packetLen(0x0205, 26)
+
+// Packet: 0x0206
+packetLen(0x0206, 35)
+
+// Packet: 0x0207
+packetLen(0x0207, 34)
+
+// Packet: 0x0208
+packetLen(0x0208, 14)
+
+// Packet: 0x0209
+packetLen(0x0209, 36)
+
+// Packet: 0x020a
+packetLen(0x020a, 10)
+
+// Packet: 0x020d
+packetLen(0x020d, -1)
+
+// Packet: 0x020e
+packetLen(0x020e, 32)
+
+// Packet: 0x0212
+packetLen(0x0212, 26)
+
+// Packet: 0x0213
+packetLen(0x0213, 26)
+
+// Packet: 0x0214
+packetLen(0x0214, 42)
+
+// Packet: 0x0215
+packetLen(0x0215, 6)
+
+// Packet: 0x0216
+packetLen(0x0216, 6)
+
+// Packet: 0x0217
+packetLen(0x0217, 2)
+
+// Packet: 0x0218
+packetLen(0x0218, 2)
+
+// Packet: 0x0219
+packetLen(0x0219, 282)
+
+// Packet: 0x021a
+packetLen(0x021a, 282)
+
+// Packet: 0x021b
+packetLen(0x021b, 10)
+
+// Packet: 0x021c
+packetLen(0x021c, 10)
+
+// Packet: 0x021d
+packetLen(0x021d, 6)
+
+// Packet: 0x021e
+packetLen(0x021e, 6)
+
+// Packet: 0x021f
+packetLen(0x021f, 66)
+
+// Packet: 0x0220
+packetLen(0x0220, 10)
+
+// Packet: 0x0221
+packetLen(0x0221, -1)
+
+// Packet: 0x0222
+packetLen(0x0222, 6)
+
+// Packet: 0x0223
+packetLen(0x0223, 10)
+
+// Packet: 0x0224
+packetLen(0x0224, 10)
+
+// Packet: 0x0225
+packetLen(0x0225, 2)
+
+// Packet: 0x0226
+packetLen(0x0226, 282)
+
+// Packet: 0x0227
+packetLen(0x0227, 18)
+
+// Packet: 0x0228
+packetLen(0x0228, 18)
+
+// Packet: 0x0229
+packetLen(0x0229, 15)
+
+// Packet: 0x022a
+packetLen(0x022a, 62)
+
+// Packet: 0x022b
+packetLen(0x022b, 61)
+
+// Packet: 0x022c
+packetLen(0x022c, 69)
+
+// Packet: 0x022d
+packetLen(0x022d, 5)
+
+// Packet: 0x022e
+packetLen(0x022e, 73)
+
+// Packet: 0x022f
+packetLen(0x022f, 7)
+
+// Packet: 0x0230
+packetLen(0x0230, 12)
+
+// Packet: 0x0231
+packetLen(0x0231, 26)
+
+// Packet: 0x0232
+packetLen(0x0232, 9)
+
+// Packet: 0x0233
+packetLen(0x0233, 11)
+
+// Packet: 0x0234
+packetLen(0x0234, 6)
+
+// Packet: 0x0235
+packetLen(0x0235, -1)
+
+// Packet: 0x0236
+packetLen(0x0236, 10)
+
+// Packet: 0x0237
+packetLen(0x0237, 2)
+
+// Packet: 0x0238
+packetLen(0x0238, 282)
+
+// Packet: 0x0239
+packetLen(0x0239, 11)
+
+// Packet: 0x023a
+packetLen(0x023a, 4)
+
+// Packet: 0x023b
+packetLen(0x023b, 36)
+
+// Packet: 0x023c
+packetLen(0x023c, 6)
+
+// Packet: 0x023d
+packetLen(0x023d, 6)
+
+// Packet: 0x023e
+packetLen(0x023e, 8)
+
+// Packet: 0x023f
+packetLen(0x023f, 2)
+
+// Packet: 0x0240
+packetLen(0x0240, -1)
+
+// Packet: 0x0241
+packetLen(0x0241, 6)
+
+// Packet: 0x0242
+packetLen(0x0242, -1)
+
+// Packet: 0x0243
+packetLen(0x0243, 6)
+
+// Packet: 0x0244
+packetLen(0x0244, 6)
+
+// Packet: 0x0245
+packetLen(0x0245, 3)
+
+// Packet: 0x0246
+packetLen(0x0246, 4)
+
+// Packet: 0x0247
+packetLen(0x0247, 8)
+
+// Packet: 0x0248
+packetLen(0x0248, -1)
+
+// Packet: 0x0249
+packetLen(0x0249, 3)
+
+// Packet: 0x024a
+packetLen(0x024a, 70)
+
+// Packet: 0x024b
+packetLen(0x024b, 4)
+
+// Packet: 0x024c
+packetLen(0x024c, 8)
+
+// Packet: 0x024d
+packetLen(0x024d, 12)
+
+// Packet: 0x024e
+packetLen(0x024e, 6)
+
+// Packet: 0x024f
+packetLen(0x024f, 10)
+
+// Packet: 0x0250
+packetLen(0x0250, 3)
+
+// Packet: 0x0251
+packetLen(0x0251, 34)
+
+// Packet: 0x0252
+packetLen(0x0252, -1)
+
+// Packet: 0x0253
+packetLen(0x0253, 3)
+
+// Packet: 0x0254
+packetLen(0x0254, 3)
+
+// Packet: 0x0255
+packetLen(0x0255, 5)
+
+// Packet: 0x0256
+packetLen(0x0256, 5)
+
+// Packet: 0x0257
+packetLen(0x0257, 8)
+
+// Packet: 0x0258
+packetLen(0x0258, 2)
+
+// Packet: 0x0259
+packetLen(0x0259, 3)
+
+// Packet: 0x025a
+packetLen(0x025a, -1)
+
+// Packet: 0x025b
+packetLen(0x025b, 8)
+
+// Packet: 0x025c
+packetLen(0x025c, 4)
+
+// Packet: 0x025d
+packetLen(0x025d, 6)
+
+// Packet: 0x025e
+packetLen(0x025e, 4)
+
+// Packet: 0x025f
+packetLen(0x025f, 6)
+
+// Packet: 0x0260
+packetLen(0x0260, 6)
+
+// Packet: 0x0261
+packetLen(0x0261, 11)
+
+// Packet: 0x0262
+packetLen(0x0262, 11)
+
+// Packet: 0x0263
+packetLen(0x0263, 11)
+
+// Packet: 0x0264
+packetLen(0x0264, 20)
+
+// Packet: 0x0265
+packetLen(0x0265, 20)
+
+// Packet: 0x0266
+packetLen(0x0266, 30)
+
+// Packet: 0x0267
+packetLen(0x0267, 4)
+
+// Packet: 0x0268
+packetLen(0x0268, 4)
+
+// Packet: 0x0269
+packetLen(0x0269, 4)
+
+// Packet: 0x026a
+packetLen(0x026a, 4)
+
+// Packet: 0x026b
+packetLen(0x026b, 4)
+
+// Packet: 0x026c
+packetLen(0x026c, 4)
+
+// Packet: 0x026d
+packetLen(0x026d, 4)
+
+// Packet: 0x026f
+packetLen(0x026f, 2)
+
+// Packet: 0x0270
+packetLen(0x0270, 2)
+
+// Packet: 0x0271
+packetLen(0x0271, 40)
+
+// Packet: 0x0272
+packetLen(0x0272, 44)
+
+// Packet: 0x0273
+packetLen(0x0273, 30)
+
+// Packet: 0x0274
+packetLen(0x0274, 8)
+
+// Packet: 0x0275
+packetLen(0x0275, 37)
+
+// Packet: 0x0276
+packetLen(0x0276, -1)
+
+// Packet: 0x0277
+packetLen(0x0277, 84)
+
+// Packet: 0x0278
+packetLen(0x0278, 2)
+
+// Packet: 0x0279
+packetLen(0x0279, 2)
+
+// Packet: 0x027a
+packetLen(0x027a, -1)
+
+// Packet: 0x027b
+packetLen(0x027b, 14)
+
+// Packet: 0x027c
+packetLen(0x027c, 60)
+
+// Packet: 0x027d
+packetLen(0x027d, 62)
+
+// Packet: 0x027e
+packetLen(0x027e, -1)
+
+// Packet: 0x027f
+packetLen(0x027f, 8)
+
+// Packet: 0x0280
+packetLen(0x0280, 12)
+
+// Packet: 0x0281
+packetLen(0x0281, 4)
+
+// Packet: 0x0282
+packetLen(0x0282, 284)
+
+// Packet: 0x0283
+packetLen(0x0283, 6)
+
+// Packet: 0x0284
+packetLen(0x0284, 14)
+
+// Packet: 0x0285
+packetLen(0x0285, 6)
+
+// Packet: 0x0286
+packetLen(0x0286, 4)
+
+// Packet: 0x0287
+packetLen(0x0287, -1)
+
+// Packet: 0x0288
+packetLen(0x0288, -1)
+
+// Packet: 0x0289
+packetLen(0x0289, 12)
+
+// Packet: 0x028a
+packetLen(0x028a, 18)
+
+// Packet: 0x028b
+packetLen(0x028b, -1)
+
+// Packet: 0x028c
+packetLen(0x028c, 46)
+
+// Packet: 0x028d
+packetLen(0x028d, 34)
+
+// Packet: 0x028e
+packetLen(0x028e, 4)
+
+// Packet: 0x028f
+packetLen(0x028f, 6)
+
+// Packet: 0x0290
+packetLen(0x0290, 4)
+
+// Packet: 0x0291
+packetLen(0x0291, 4)
+
+// Packet: 0x0292
+packetLen(0x0292, 2)
+
+// Packet: 0x0293
+packetLen(0x0293, 70)
+
+// Packet: 0x0294
+packetLen(0x0294, 10)
+
+// Packet: 0x0295
+packetLen(0x0295, -1)
+
+// Packet: 0x0296
+packetLen(0x0296, -1)
+
+// Packet: 0x0297
+packetLen(0x0297, -1)
+
+// Packet: 0x0298
+packetLen(0x0298, 10)
+
+// Packet: 0x0299
+packetLen(0x0299, 8)
+
+// Packet: 0x029a
+packetLen(0x029a, 37)
+
+// Packet: 0x029b
+packetLen(0x029b, 80)
+
+// Packet: 0x029c
+packetLen(0x029c, 66)
+
+// Packet: 0x029d
+packetLen(0x029d, -1)
+
+// Packet: 0x029e
+packetLen(0x029e, 11)
+
+// Packet: 0x029f
+packetLen(0x029f, 3)
+
+// Packet: 0x02a2
+packetLen(0x02a2, 8)
+
+// Packet: 0x02a5
+packetLen(0x02a5, 8)
+
+// Packet: 0x02a6
+packetLen(0x02a6, -1)
+
+// Packet: 0x02a7
+packetLen(0x02a7, -1)
+
+// Packet: 0x02aa
+packetLen(0x02aa, 4)
+
+// Packet: 0x02ab
+packetLen(0x02ab, 36)
+
+// Packet: 0x02ac
+packetLen(0x02ac, 6)
+
+// Packet: 0x02ad
+packetLen(0x02ad, 8)
+
+// Packet: 0x02b0
+packetLen(0x02b0, 85)
+
+// Packet: 0x02b1
+packetLen(0x02b1, -1)
+
+// Packet: 0x02b2
+packetLen(0x02b2, -1)
+
+// Packet: 0x02b3
+packetLen(0x02b3, 107)
+
+// Packet: 0x02b4
+packetLen(0x02b4, 6)
+
+// Packet: 0x02b5
+packetLen(0x02b5, -1)
+
+// Packet: 0x02b6
+packetLen(0x02b6, 7)
+
+// Packet: 0x02b7
+packetLen(0x02b7, 7)
+
+// Packet: 0x02b8
+packetLen(0x02b8, 32)
+
+// Packet: 0x02b9
+packetLen(0x02b9, 191)
+
+// Packet: 0x02ba
+packetLen(0x02ba, 11)
+
+// Packet: 0x02bb
+packetLen(0x02bb, 8)
+
+// Packet: 0x02bc
+packetLen(0x02bc, 6)
+
+// Packet: 0x02c1
+packetLen(0x02c1, -1)
+
+// Packet: 0x02c2
+packetLen(0x02c2, -1)
+
+// Packet: 0x02c4
+packetLen(0x02c4, 26)
+
+// Packet: 0x02c5
+packetLen(0x02c5, 30)
+
+// Packet: 0x02c6
+packetLen(0x02c6, 30)
+
+// Packet: 0x02c7
+packetLen(0x02c7, 7)
+
+// Packet: 0x02c8
+packetLen(0x02c8, 3)
+
+// Packet: 0x02c9
+packetLen(0x02c9, 3)
+
+// Packet: 0x02ca
+packetLen(0x02ca, 3)
+
+// Packet: 0x02cb
+packetLen(0x02cb, 65)
+
+// Packet: 0x02cc
+packetLen(0x02cc, 4)
+
+// Packet: 0x02cd
+packetLen(0x02cd, 71)
+
+// Packet: 0x02ce
+packetLen(0x02ce, 10)
+
+// Packet: 0x02cf
+packetLen(0x02cf, 6)
+
+// Packet: 0x02d0
+packetLen(0x02d0, -1)
+
+// Packet: 0x02d1
+packetLen(0x02d1, -1)
+
+// Packet: 0x02d2
+packetLen(0x02d2, -1)
+
+// Packet: 0x02d3
+packetLen(0x02d3, 4)
+
+// Packet: 0x02d4
+packetLen(0x02d4, 39)
+
+// Packet: 0x02d5
+packetLen(0x02d5, 2)
+
+// Packet: 0x02d6
+packetLen(0x02d6, 6)
+
+// Packet: 0x02d7
+packetLen(0x02d7, -1)
+
+// Packet: 0x02d8
+packetLen(0x02d8, 10)
+
+// Packet: 0x02d9
+packetLen(0x02d9, 10)
+
+// Packet: 0x02da
+packetLen(0x02da, 3)
+
+// Packet: 0x02db
+packetLen(0x02db, -1)
+
+// Packet: 0x02dc
+packetLen(0x02dc, -1)
+
+// Packet: 0x02dd
+packetLen(0x02dd, 32)
+
+// Packet: 0x02de
+packetLen(0x02de, 6)
+
+// Packet: 0x02df
+packetLen(0x02df, 36)
+
+// Packet: 0x02e0
+packetLen(0x02e0, 34)
+
+// Packet: 0x02e1
+packetLen(0x02e1, 33)
+
+// Packet: 0x02e2
+packetLen(0x02e2, 20)
+
+// Packet: 0x02e3
+packetLen(0x02e3, 22)
+
+// Packet: 0x02e4
+packetLen(0x02e4, 11)
+
+// Packet: 0x02e5
+packetLen(0x02e5, 9)
+
+// Packet: 0x02e6
+packetLen(0x02e6, 6)
+
+// Packet: 0x02e7
+packetLen(0x02e7, -1)
+
+// Packet: 0x02e8
+packetLen(0x02e8, -1)
+
+// Packet: 0x02e9
+packetLen(0x02e9, -1)
+
+// Packet: 0x02ea
+packetLen(0x02ea, -1)
+
+// Packet: 0x02eb
+packetLen(0x02eb, 13)
+
+// Packet: 0x02ec
+packetLen(0x02ec, 71)
+
+// Packet: 0x02ed
+packetLen(0x02ed, 63)
+
+// Packet: 0x02ee
+packetLen(0x02ee, 64)
+
+// Packet: 0x02ef
+packetLen(0x02ef, 8)
+
+// Packet: 0x02f0
+packetLen(0x02f0, 10)
+
+// Packet: 0x02f1
+packetLen(0x02f1, 2)
+
+// Packet: 0x02f2
+packetLen(0x02f2, 2)
+
+// Packet: 0x02f3
+packetLen(0x02f3, -1)
+
+// Packet: 0x02f4
+packetLen(0x02f4, 3)
+
+// Packet: 0x02f5
+packetLen(0x02f5, 7)
+
+// Packet: 0x02f6
+packetLen(0x02f6, 7)
+
+// Packet: 0x035c
+packetLen(0x035c, 2)
+
+// Packet: 0x035d
+packetLen(0x035d, -1)
+
+// Packet: 0x035e
+packetLen(0x035e, 2)
+
+// Packet: 0x035f
+packetLen(0x035f, 5)
+
+// Packet: 0x0360
+packetLen(0x0360, 6)
+
+// Packet: 0x0361
+packetLen(0x0361, 5)
+
+// Packet: 0x0362
+packetLen(0x0362, 6)
+
+// Packet: 0x0363
+packetLen(0x0363, 6)
+
+// Packet: 0x0364
+packetLen(0x0364, 8)
+
+// Packet: 0x0365
+packetLen(0x0365, 8)
+
+// Packet: 0x0366
+packetLen(0x0366, 10)
+
+// Packet: 0x0367
+packetLen(0x0367, 31)
+
+// Packet: 0x0368
+packetLen(0x0368, 6)
+
+// Packet: 0x0369
+packetLen(0x0369, 6)
+
+// Packet: 0x03dd
+packetLen(0x03dd, 18)
+
+// Packet: 0x03de
+packetLen(0x03de, 18)
+
+// Packet: 0x0436
+packetLen(0x0436, 19)
+
+// Packet: 0x0437
+packetLen(0x0437, 7)
+
+// Packet: 0x0438
+packetLen(0x0438, 10)
+
+// Packet: 0x0439
+packetLen(0x0439, 8)
+
+// Packet: 0x043d
+packetLen(0x043d, 8)
+
+// Packet: 0x043e
+packetLen(0x043e, -1)
+
+// Packet: 0x043f
+packetLen(0x043f, 25)
+
+// Packet: 0x0440
+packetLen(0x0440, 10)
+
+// Packet: 0x0441
+packetLen(0x0441, 4)
+
+// Packet: 0x0442
+packetLen(0x0442, -1)
+
+// Packet: 0x0443
+packetLen(0x0443, 8)
+
+// Packet: 0x0444
+packetLen(0x0444, -1)
+
+// Packet: 0x0445
+packetLen(0x0445, 12)
+
+// Packet: 0x0446
+packetLen(0x0446, 14)
+
+// Packet: 0x0447
+packetLen(0x0447, 2)
+
+// Packet: 0x0448
+packetLen(0x0448, -1)
+
+// Packet: 0x0449
+packetLen(0x0449, 4)
+
+// Packet: 0x044a
+packetLen(0x044a, 6)
+
+// Packet: 0x044b
+packetLen(0x044b, 2)
+
+// Packet: 0x07d7
+packetLen(0x07d7, 8)
+
+// Packet: 0x07d8
+packetLen(0x07d8, 8)
+
+// Packet: 0x07d9
+packetLen(0x07d9, 268)
+
+// Packet: 0x07da
+packetLen(0x07da, 6)
+
+// Packet: 0x07db
+packetLen(0x07db, 8)
+
+// Packet: 0x07dc
+packetLen(0x07dc, 6)
+
+// Packet: 0x07dd
+packetLen(0x07dd, 54)
+
+// Packet: 0x07de
+packetLen(0x07de, 30)
+
+// Packet: 0x07df
+packetLen(0x07df, 54)
+
+// Packet: 0x07e0
+packetLen(0x07e0, 58)
+
+// Packet: 0x07e1
+packetLen(0x07e1, 15)
+
+// Packet: 0x07e2
+packetLen(0x07e2, 8)
+
+// Packet: 0x07e3
+packetLen(0x07e3, 6)
+
+// Packet: 0x07e4
+packetLen(0x07e4, -1)
+
+// Packet: 0x07e5
+packetLen(0x07e5, 4)
+
+// Packet: 0x07e6
+packetLen(0x07e6, 8)
+
+// Packet: 0x07e7
+packetLen(0x07e7, 32)
+
+// Packet: 0x07e8
+packetLen(0x07e8, -1)
+
+// Packet: 0x07e9
+packetLen(0x07e9, 5)
+
+// Packet: 0x07ea
+packetLen(0x07ea, 2)
+
+// Packet: 0x07eb
+packetLen(0x07eb, -1)
+
+// Packet: 0x07ec
+packetLen(0x07ec, 8)
+
+// Packet: 0x07ed
+packetLen(0x07ed, 10)
+
+// Packet: 0x07ee
+packetLen(0x07ee, 6)
+
+// Packet: 0x07ef
+packetLen(0x07ef, 8)
+
+// Packet: 0x07f0
+packetLen(0x07f0, 6)
+
+// Packet: 0x07f1
+packetLen(0x07f1, 18)
+
+// Packet: 0x07f2
+packetLen(0x07f2, 8)
+
+// Packet: 0x07f3
+packetLen(0x07f3, 6)
+
+// Packet: 0x07f4
+packetLen(0x07f4, 3)
+
+// Packet: 0x07f5
+packetLen(0x07f5, 6)
+
+// Packet: 0x07f6
+packetLen(0x07f6, 14)
+
+// Packet: 0x07f7
+packetLen(0x07f7, -1)
+
+// Packet: 0x07f8
+packetLen(0x07f8, -1)
+
+// Packet: 0x07f9
+packetLen(0x07f9, -1)
+
+// Packet: 0x07fa
+packetLen(0x07fa, 8)
+
+// Packet: 0x07fb
+packetLen(0x07fb, 25)
+
+// Packet: 0x07fc
+packetLen(0x07fc, 10)
+
+// Packet: 0x07fd
+packetLen(0x07fd, -1)
+
+// Packet: 0x07fe
+packetLen(0x07fe, 26)
+
+// Packet: 0x0800
+packetLen(0x0800, -1)
+
+// Packet: 0x0801
+packetLen(0x0801, -1)
+
+// Packet: 0x0802
+packetLen(0x0802, 18)
+
+// Packet: 0x0803
+packetLen(0x0803, 4)
+
+// Packet: 0x0804
+packetLen(0x0804, 14)
+
+// Packet: 0x0805
+packetLen(0x0805, -1)
+
+// Packet: 0x0806
+packetLen(0x0806, 2)
+
+// Packet: 0x0807
+packetLen(0x0807, 4)
+
+// Packet: 0x0808
+packetLen(0x0808, 14)
+
+// Packet: 0x0809
+packetLen(0x0809, 50)
+
+// Packet: 0x080a
+packetLen(0x080a, 18)
+
+// Packet: 0x080b
+packetLen(0x080b, 6)
+
+// Packet: 0x080c
+packetLen(0x080c, 2)
+
+// Packet: 0x080d
+packetLen(0x080d, 3)
+
+// Packet: 0x080e
+packetLen(0x080e, 14)
+
+// Packet: 0x080f
+packetLen(0x080f, 30)
+
+// Packet: 0x0810
+packetLen(0x0810, 3)
+
+// Packet: 0x0811
+packetLen(0x0811, -1)
+
+// Packet: 0x0812
+packetLen(0x0812, 8)
+
+// Packet: 0x0813
+packetLen(0x0813, -1)
+
+// Packet: 0x0814
+packetLen(0x0814, 86)
+
+// Packet: 0x0815
+packetLen(0x0815, 2)
+
+// Packet: 0x0816
+packetLen(0x0816, 6)
+
+// Packet: 0x0817
+packetLen(0x0817, 6)
+
+// Packet: 0x0818
+packetLen(0x0818, -1)
+
+// Packet: 0x0819
+packetLen(0x0819, -1)
+
+// Packet: 0x081a
+packetLen(0x081a, 4)
+
+// Packet: 0x081b
+packetLen(0x081b, 12)
+
+// Packet: 0x081c
+packetLen(0x081c, 10)
+
+// Packet: 0x081d
+packetLen(0x081d, 22)
+
+// Packet: 0x081e
+packetLen(0x081e, 8)
+
+// Packet: 0x081f
+packetLen(0x081f, -1)
+
+// Packet: 0x0820
+packetLen(0x0820, 11)
+
+// Packet: 0x0821
+packetLen(0x0821, 2)
+
+// Packet: 0x0822
+packetLen(0x0822, 9)
+
+// Packet: 0x0823
+packetLen(0x0823, -1)
+
+// Packet: 0x0824
+packetLen(0x0824, 8)
+
+// Packet: 0x0825
+packetLen(0x0825, -1)
+
+// Packet: 0x0827
+packetLen(0x0827, 6)
+
+// Packet: 0x0828
+packetLen(0x0828, 14)
+
+// Packet: 0x0829
+packetLen(0x0829, 12)
+
+// Packet: 0x082a
+packetLen(0x082a, 10)
+
+// Packet: 0x082b
+packetLen(0x082b, 6)
+
+// Packet: 0x082c
+packetLen(0x082c, 10)
+
+// Packet: 0x082d
+packetLen(0x082d, -1)
+
+// Packet: 0x0835
+packetLen(0x0835, -1)
+
+// Packet: 0x0836
+packetLen(0x0836, -1)
+
+// Packet: 0x0837
+packetLen(0x0837, 3)
+
+// Packet: 0x0838
+packetLen(0x0838, 2)
+
+// Packet: 0x0839
+packetLen(0x0839, 66)
+
+// Packet: 0x083a
+packetLen(0x083a, 5)
+
+// Packet: 0x083b
+packetLen(0x083b, 2)
+
+// Packet: 0x083c
+packetLen(0x083c, 14)
+
+// Packet: 0x083d
+packetLen(0x083d, 6)
+
+// Packet: 0x083e
+packetLen(0x083e, 26)
+
+// Packet: 0x0840
+packetLen(0x0840, -1)
+
+// Packet: 0x0841
+packetLen(0x0841, 4)
+
+// Packet: 0x0842
+packetLen(0x0842, 6)
+
+// Packet: 0x0843
+packetLen(0x0843, 6)
+
+// Packet: 0x0844
+packetLen(0x0844, 2)
+
+// Packet: 0x0845
+packetLen(0x0845, 10)
+
+// Packet: 0x0846
+packetLen(0x0846, 4)
+
+// Packet: 0x0847
+packetLen(0x0847, -1)
+
+// Packet: 0x0848
+packetLen(0x0848, -1)
+
+// Packet: 0x0849
+packetLen(0x0849, 16)
+
+// Packet: 0x084a
+packetLen(0x084a, 2)
+
+// Packet: 0x084b
+packetLen(0x084b, 21)
+
+// Packet: 0x084c
+packetLen(0x084c, 10)
+
+// Packet: 0x084d
+packetLen(0x084d, 10)
+
+// Packet: 0x084e
+packetLen(0x084e, 5)
+
+// Packet: 0x084f
+packetLen(0x084f, 6)
+
+// Packet: 0x0850
+packetLen(0x0850, 7)
+
+// Packet: 0x0851
+packetLen(0x0851, -1)
+
+// Packet: 0x0852
+packetLen(0x0852, 2)
+
+// Packet: 0x0853
+packetLen(0x0853, -1)
+
+// Packet: 0x0854
+packetLen(0x0854, -1)
+
+// Packet: 0x0855
+packetLen(0x0855, 6)
+
+// Packet: 0x0856
+packetLen(0x0856, -1)
+
+// Packet: 0x0857
+packetLen(0x0857, -1)
+
+// Packet: 0x0858
+packetLen(0x0858, -1)
+
+// Packet: 0x0859
+packetLen(0x0859, -1)
+
+// Packet: 0x085a
+packetLen(0x085a, 2)
+
+// Packet: 0x085b
+packetLen(0x085b, 2)
+
+// Packet: 0x085c
+packetLen(0x085c, 2)
+
+// Packet: 0x085d
+packetLen(0x085d, 2)
+
+// Packet: 0x085e
+packetLen(0x085e, 2)
+
+// Packet: 0x085f
+packetLen(0x085f, 2)
+
+// Packet: 0x0860
+packetLen(0x0860, 2)
+
+// Packet: 0x0861
+packetLen(0x0861, 2)
+
+// Packet: 0x0862
+packetLen(0x0862, 2)
+
+// Packet: 0x0863
+packetLen(0x0863, 2)
+
+// Packet: 0x0864
+packetLen(0x0864, 2)
+
+// Packet: 0x0865
+packetLen(0x0865, 2)
+
+// Packet: 0x0866
+packetLen(0x0866, 2)
+
+// Packet: 0x0867
+packetLen(0x0867, 2)
+
+// Packet: 0x0868
+packetLen(0x0868, 2)
+
+// Packet: 0x0869
+packetLen(0x0869, 2)
+
+// Packet: 0x086a
+packetLen(0x086a, 2)
+
+// Packet: 0x086b
+packetLen(0x086b, 2)
+
+// Packet: 0x086c
+packetLen(0x086c, 2)
+
+// Packet: 0x086d
+packetLen(0x086d, 2)
+
+// Packet: 0x086e
+packetLen(0x086e, 2)
+
+// Packet: 0x086f
+packetLen(0x086f, 2)
+
+// Packet: 0x0870
+packetLen(0x0870, 2)
+
+// Packet: 0x0871
+packetLen(0x0871, 2)
+
+// Packet: 0x0872
+packetLen(0x0872, 2)
+
+// Packet: 0x0873
+packetLen(0x0873, 2)
+
+// Packet: 0x0874
+packetLen(0x0874, 2)
+
+// Packet: 0x0875
+packetLen(0x0875, 2)
+
+// Packet: 0x0876
+packetLen(0x0876, 2)
+
+// Packet: 0x0877
+packetLen(0x0877, 2)
+
+// Packet: 0x0878
+packetLen(0x0878, 2)
+
+// Packet: 0x0879
+packetLen(0x0879, 2)
+
+// Packet: 0x087a
+packetLen(0x087a, 2)
+
+// Packet: 0x087b
+packetLen(0x087b, 2)
+
+// Packet: 0x087c
+packetLen(0x087c, 2)
+
+// Packet: 0x087d
+packetLen(0x087d, 2)
+
+// Packet: 0x087e
+packetLen(0x087e, 2)
+
+// Packet: 0x087f
+packetLen(0x087f, 2)
+
+// Packet: 0x0880
+packetLen(0x0880, 2)
+
+// Packet: 0x0881
+packetLen(0x0881, 2)
+
+// Packet: 0x0882
+packetLen(0x0882, 2)
+
+// Packet: 0x0883
+packetLen(0x0883, 2)
+
+// Packet: 0x0884
+packetLen(0x0884, 2)
+
+// Packet: 0x0885
+packetLen(0x0885, 2)
+
+// Packet: 0x0886
+packetLen(0x0886, 2)
+
+// Packet: 0x0887
+packetLen(0x0887, 2)
+
+// Packet: 0x0888
+packetLen(0x0888, 2)
+
+// Packet: 0x0889
+packetLen(0x0889, 2)
+
+// Packet: 0x088a
+packetLen(0x088a, 2)
+
+// Packet: 0x088b
+packetLen(0x088b, 2)
+
+// Packet: 0x088c
+packetLen(0x088c, 2)
+
+// Packet: 0x088d
+packetLen(0x088d, 2)
+
+// Packet: 0x088e
+packetLen(0x088e, 2)
+
+// Packet: 0x088f
+packetLen(0x088f, 2)
+
+// Packet: 0x0890
+packetLen(0x0890, 2)
+
+// Packet: 0x0891
+packetLen(0x0891, 2)
+
+// Packet: 0x0892
+packetLen(0x0892, 2)
+
+// Packet: 0x0893
+packetLen(0x0893, 2)
+
+// Packet: 0x0894
+packetLen(0x0894, 2)
+
+// Packet: 0x0895
+packetLen(0x0895, 2)
+
+// Packet: 0x0896
+packetLen(0x0896, 2)
+
+// Packet: 0x0897
+packetLen(0x0897, 2)
+
+// Packet: 0x0898
+packetLen(0x0898, 2)
+
+// Packet: 0x0899
+packetLen(0x0899, 2)
+
+// Packet: 0x089a
+packetLen(0x089a, 2)
+
+// Packet: 0x089b
+packetLen(0x089b, 2)
+
+// Packet: 0x089c
+packetLen(0x089c, 2)
+
+// Packet: 0x089d
+packetLen(0x089d, 2)
+
+// Packet: 0x089e
+packetLen(0x089e, 2)
+
+// Packet: 0x089f
+packetLen(0x089f, 2)
+
+// Packet: 0x08a0
+packetLen(0x08a0, 2)
+
+// Packet: 0x08a1
+packetLen(0x08a1, 2)
+
+// Packet: 0x08a2
+packetLen(0x08a2, 2)
+
+// Packet: 0x08a3
+packetLen(0x08a3, 2)
+
+// Packet: 0x08a4
+packetLen(0x08a4, 2)
+
+// Packet: 0x08a5
+packetLen(0x08a5, 2)
+
+// Packet: 0x08a6
+packetLen(0x08a6, 2)
+
+// Packet: 0x08a7
+packetLen(0x08a7, 2)
+
+// Packet: 0x08a8
+packetLen(0x08a8, 2)
+
+// Packet: 0x08a9
+packetLen(0x08a9, 2)
+
+// Packet: 0x08aa
+packetLen(0x08aa, 2)
+
+// Packet: 0x08ab
+packetLen(0x08ab, 2)
+
+// Packet: 0x08ac
+packetLen(0x08ac, 2)
+
+// Packet: 0x08ad
+packetLen(0x08ad, 2)
+
+// Packet: 0x08af
+packetLen(0x08af, 10)
+
+// Packet: 0x08b0
+packetLen(0x08b0, 17)
+
+// Packet: 0x08b1
+packetLen(0x08b1, -1)
+
+// Packet: 0x08b2
+packetLen(0x08b2, -1)
+
+// Packet: 0x08b3
+packetLen(0x08b3, -1)
+
+// Packet: 0x08b4
+packetLen(0x08b4, 2)
+
+// Packet: 0x08b5
+packetLen(0x08b5, 6)
+
+// Packet: 0x08b6
+packetLen(0x08b6, 3)
+
+// Packet: 0x08b8
+packetLen(0x08b8, 10)
+
+// Packet: 0x08b9
+packetLen(0x08b9, 12)
+
+// Packet: 0x08ba
+packetLen(0x08ba, 10)
+
+// Packet: 0x08bb
+packetLen(0x08bb, 8)
+
+// Packet: 0x08bc
+packetLen(0x08bc, 10)
+
+// Packet: 0x08bd
+packetLen(0x08bd, 8)
+
+// Packet: 0x08be
+packetLen(0x08be, 14)
+
+// Packet: 0x08bf
+packetLen(0x08bf, 8)
+
+// Packet: 0x08c0
+packetLen(0x08c0, -1)
+
+// Packet: 0x08c1
+packetLen(0x08c1, 2)
+
+// Packet: 0x08c2
+packetLen(0x08c2, 2)
+
+// Packet: 0x08c3
+packetLen(0x08c3, 10)
+
+// Packet: 0x08c4
+packetLen(0x08c4, 8)
+
+// Packet: 0x08c5
+packetLen(0x08c5, 6)
+
+// Packet: 0x08c6
+packetLen(0x08c6, 4)
+
+// Packet: 0x08c7
+packetLen(0x08c7, -1)
+
+// Packet: 0x08c8
+packetLen(0x08c8, 34)
+
+// Packet: 0x08c9
+packetLen(0x08c9, 2)
+
+// Packet: 0x08ca
+packetLen(0x08ca, -1)
+
+// Packet: 0x08cb
+packetLen(0x08cb, -1)
+
+// Packet: 0x08cc
+packetLen(0x08cc, 109)
+
+// Packet: 0x08cd
+packetLen(0x08cd, 10)
+
+// Packet: 0x08ce
+packetLen(0x08ce, 2)
+
+// Packet: 0x08cf
+packetLen(0x08cf, 10)
+
+// Packet: 0x08d0
+packetLen(0x08d0, 9)
+
+// Packet: 0x08d1
+packetLen(0x08d1, 7)
+
+// Packet: 0x08d2
+packetLen(0x08d2, 10)
+
+// Packet: 0x08d3
+packetLen(0x08d3, 10)
+
+// Packet: 0x08d4
+packetLen(0x08d4, 8)
+
+// Packet: 0x08d5
+packetLen(0x08d5, -1)
+
+// Packet: 0x08d6
+packetLen(0x08d6, 6)
+
+// Packet: 0x08d7
+packetLen(0x08d7, 28)
+
+// Packet: 0x08d8
+packetLen(0x08d8, 27)
+
+// Packet: 0x08d9
+packetLen(0x08d9, 30)
+
+// Packet: 0x08da
+packetLen(0x08da, 26)
+
+// Packet: 0x08db
+packetLen(0x08db, 27)
+
+// Packet: 0x08dc
+packetLen(0x08dc, 26)
+
+// Packet: 0x08dd
+packetLen(0x08dd, 27)
+
+// Packet: 0x08de
+packetLen(0x08de, 27)
+
+// Packet: 0x08df
+packetLen(0x08df, 50)
+
+// Packet: 0x08e0
+packetLen(0x08e0, 51)
+
+// Packet: 0x08e1
+packetLen(0x08e1, 51)
+
+// Packet: 0x08e2
+packetLen(0x08e2, 27)
+
+// Packet: 0x08e3
+packetLen(0x08e3, 157)
+
+// Packet: 0x08e4
+packetLen(0x08e4, 6)
+
+// Packet: 0x08fc
+packetLen(0x08fc, 30)
+
+// Packet: 0x08fd
+packetLen(0x08fd, 6)
+
+// Packet: 0x08fe
+packetLen(0x08fe, -1)
+
+// Packet: 0x08ff
+packetLen(0x08ff, 24)
+
+// Packet: 0x0900
+packetLen(0x0900, -1)
+
+// Packet: 0x0901
+packetLen(0x0901, -1)
+
+// Packet: 0x0902
+packetLen(0x0902, -1)
+
+// Packet: 0x0903
+packetLen(0x0903, -1)
+
+// Packet: 0x0904
+packetLen(0x0904, -1)
+
+// Packet: 0x0905
+packetLen(0x0905, -1)
+
+// Packet: 0x0906
+packetLen(0x0906, -1)
+
+// Packet: 0x0907
+packetLen(0x0907, 5)
+
+// Packet: 0x0908
+packetLen(0x0908, 5)
+
+// Packet: 0x090a
+packetLen(0x090a, 26)
+
+// Packet: 0x090d
+packetLen(0x090d, -1)
+
+// Packet: 0x090e
+packetLen(0x090e, 2)
+
+// Packet: 0x090f
+packetLen(0x090f, -1)
+
+// Packet: 0x0910
+packetLen(0x0910, 10)
+
+// Packet: 0x0911
+packetLen(0x0911, 30)
+
+// Packet: 0x0912
+packetLen(0x0912, 10)
+
+// Packet: 0x0913
+packetLen(0x0913, 30)
+
+// Packet: 0x0914
+packetLen(0x0914, -1)
+
+// Packet: 0x0915
+packetLen(0x0915, -1)
+
+// Packet: 0x0916
+packetLen(0x0916, 26)
+
+// Packet: 0x0917
+packetLen(0x0917, 2)
+
+// Packet: 0x0918
+packetLen(0x0918, 2)
+
+// Packet: 0x0919
+packetLen(0x0919, 2)
+
+// Packet: 0x091a
+packetLen(0x091a, 2)
+
+// Packet: 0x091b
+packetLen(0x091b, 2)
+
+// Packet: 0x091c
+packetLen(0x091c, 2)
+
+// Packet: 0x091d
+packetLen(0x091d, 2)
+
+// Packet: 0x091e
+packetLen(0x091e, 2)
+
+// Packet: 0x091f
+packetLen(0x091f, 2)
+
+// Packet: 0x0920
+packetLen(0x0920, 2)
+
+// Packet: 0x0921
+packetLen(0x0921, 2)
+
+// Packet: 0x0922
+packetLen(0x0922, 2)
+
+// Packet: 0x0923
+packetLen(0x0923, 2)
+
+// Packet: 0x0924
+packetLen(0x0924, 2)
+
+// Packet: 0x0925
+packetLen(0x0925, 2)
+
+// Packet: 0x0926
+packetLen(0x0926, 2)
+
+// Packet: 0x0927
+packetLen(0x0927, 2)
+
+// Packet: 0x0928
+packetLen(0x0928, 2)
+
+// Packet: 0x0929
+packetLen(0x0929, 2)
+
+// Packet: 0x092a
+packetLen(0x092a, 2)
+
+// Packet: 0x092b
+packetLen(0x092b, 2)
+
+// Packet: 0x092c
+packetLen(0x092c, 2)
+
+// Packet: 0x092d
+packetLen(0x092d, 2)
+
+// Packet: 0x092e
+packetLen(0x092e, 2)
+
+// Packet: 0x092f
+packetLen(0x092f, 2)
+
+// Packet: 0x0930
+packetLen(0x0930, 2)
+
+// Packet: 0x0931
+packetLen(0x0931, 2)
+
+// Packet: 0x0932
+packetLen(0x0932, 2)
+
+// Packet: 0x0933
+packetLen(0x0933, 2)
+
+// Packet: 0x0934
+packetLen(0x0934, 2)
+
+// Packet: 0x0935
+packetLen(0x0935, 2)
+
+// Packet: 0x0936
+packetLen(0x0936, 2)
+
+// Packet: 0x0937
+packetLen(0x0937, 2)
+
+// Packet: 0x0938
+packetLen(0x0938, 2)
+
+// Packet: 0x0939
+packetLen(0x0939, 2)
+
+// Packet: 0x093a
+packetLen(0x093a, 2)
+
+// Packet: 0x093b
+packetLen(0x093b, 2)
+
+// Packet: 0x093c
+packetLen(0x093c, 2)
+
+// Packet: 0x093d
+packetLen(0x093d, 2)
+
+// Packet: 0x093e
+packetLen(0x093e, 2)
+
+// Packet: 0x093f
+packetLen(0x093f, 2)
+
+// Packet: 0x0940
+packetLen(0x0940, 2)
+
+// Packet: 0x0941
+packetLen(0x0941, 2)
+
+// Packet: 0x0942
+packetLen(0x0942, 2)
+
+// Packet: 0x0943
+packetLen(0x0943, 2)
+
+// Packet: 0x0944
+packetLen(0x0944, 2)
+
+// Packet: 0x0945
+packetLen(0x0945, 2)
+
+// Packet: 0x0946
+packetLen(0x0946, 2)
+
+// Packet: 0x0947
+packetLen(0x0947, 2)
+
+// Packet: 0x0948
+packetLen(0x0948, 2)
+
+// Packet: 0x0949
+packetLen(0x0949, 2)
+
+// Packet: 0x094a
+packetLen(0x094a, 2)
+
+// Packet: 0x094b
+packetLen(0x094b, 2)
+
+// Packet: 0x094c
+packetLen(0x094c, 2)
+
+// Packet: 0x094d
+packetLen(0x094d, 2)
+
+// Packet: 0x094e
+packetLen(0x094e, 2)
+
+// Packet: 0x094f
+packetLen(0x094f, 2)
+
+// Packet: 0x0950
+packetLen(0x0950, 2)
+
+// Packet: 0x0951
+packetLen(0x0951, 2)
+
+// Packet: 0x0952
+packetLen(0x0952, 2)
+
+// Packet: 0x0953
+packetLen(0x0953, 2)
+
+// Packet: 0x0954
+packetLen(0x0954, 2)
+
+// Packet: 0x0955
+packetLen(0x0955, 2)
+
+// Packet: 0x0956
+packetLen(0x0956, 2)
+
+// Packet: 0x0957
+packetLen(0x0957, 2)
+
+// Packet: 0x0958
+packetLen(0x0958, 2)
+
+// Packet: 0x0959
+packetLen(0x0959, 2)
+
+// Packet: 0x095a
+packetLen(0x095a, 2)
+
+// Packet: 0x095b
+packetLen(0x095b, 2)
+
+// Packet: 0x095c
+packetLen(0x095c, 2)
+
+// Packet: 0x095d
+packetLen(0x095d, 2)
+
+// Packet: 0x095e
+packetLen(0x095e, 2)
+
+// Packet: 0x095f
+packetLen(0x095f, 2)
+
+// Packet: 0x0960
+packetLen(0x0960, 2)
+
+// Packet: 0x0961
+packetLen(0x0961, 2)
+
+// Packet: 0x0962
+packetLen(0x0962, 2)
+
+// Packet: 0x0963
+packetLen(0x0963, 2)
+
+// Packet: 0x0964
+packetLen(0x0964, 2)
+
+// Packet: 0x0965
+packetLen(0x0965, 2)
+
+// Packet: 0x0966
+packetLen(0x0966, 2)
+
+// Packet: 0x0967
+packetLen(0x0967, 2)
+
+// Packet: 0x0968
+packetLen(0x0968, 2)
+
+// Packet: 0x0969
+packetLen(0x0969, 2)
+
+// Packet: 0x096a
+packetLen(0x096a, 2)
+
+// Packet: 0x096b
+packetLen(0x096b, 4)
+
+// Packet: 0x096c
+packetLen(0x096c, 6)
+
+// Packet: 0x096d
+packetLen(0x096d, -1)
+
+// Packet: 0x096e
+packetLen(0x096e, -1)
+
+// Packet: 0x096f
+packetLen(0x096f, 7)
+
+// Packet: 0x0970
+packetLen(0x0970, 31)
+
+// Packet: 0x0971
+packetLen(0x0971, 6)
+
+// Packet: 0x0972
+packetLen(0x0972, -1)
+
+// Packet: 0x0973
+packetLen(0x0973, 7)
+
+// Packet: 0x0974
+packetLen(0x0974, 2)
+
+// Packet: 0x0975
+packetLen(0x0975, -1)
+
+// Packet: 0x0976
+packetLen(0x0976, -1)
+
+// Packet: 0x0977
+packetLen(0x0977, 14)
+
+// Packet: 0x0978
+packetLen(0x0978, 6)
+
+// Packet: 0x0979
+packetLen(0x0979, 50)
+
+// Packet: 0x097a
+packetLen(0x097a, -1)
+
+// Packet: 0x097b
+packetLen(0x097b, -1)
+
+// Packet: 0x097c
+packetLen(0x097c, 4)
+
+// Packet: 0x097d
+packetLen(0x097d, 288)
+
+// Packet: 0x097e
+packetLen(0x097e, 12)
+
+// Packet: 0x097f
+packetLen(0x097f, -1)
+
+// Packet: 0x0980
+packetLen(0x0980, 7)
+
+// Packet: 0x0981
+packetLen(0x0981, -1)
+
+// Packet: 0x0982
+packetLen(0x0982, 7)
+
+// Packet: 0x0983
+packetLen(0x0983, 29)
+
+// Packet: 0x0984
+packetLen(0x0984, 28)
+
+// Packet: 0x0985
+packetLen(0x0985, -1)
+
+// Packet: 0x0986
+packetLen(0x0986, 10)
+
+// Packet: 0x0987
+packetLen(0x0987, -1)
+
+// Packet: 0x0988
+packetLen(0x0988, 6)
+
+// Packet: 0x0989
+packetLen(0x0989, 2)
+
+// Packet: 0x098a
+packetLen(0x098a, -1)
+
+// Packet: 0x098b
+packetLen(0x098b, 2)
+
+// Packet: 0x098c
+packetLen(0x098c, 4)
+
+// Packet: 0x098d
+packetLen(0x098d, -1)
+
+// Packet: 0x098e
+packetLen(0x098e, -1)
+
+// Packet: 0x098f
+packetLen(0x098f, -1)
+
+// Packet: 0x0990
+packetLen(0x0990, 41)
+
+// Packet: 0x0991
+packetLen(0x0991, -1)
+
+// Packet: 0x0992
+packetLen(0x0992, -1)
+
+// Packet: 0x0993
+packetLen(0x0993, -1)
+
+// Packet: 0x0994
+packetLen(0x0994, -1)
+
+// Packet: 0x0995
+packetLen(0x0995, -1)
+
+// Packet: 0x0996
+packetLen(0x0996, -1)
+
+// Packet: 0x0997
+packetLen(0x0997, -1)
+
+// Packet: 0x0998
+packetLen(0x0998, 8)
+
+// Packet: 0x0999
+packetLen(0x0999, 11)
+
+// Packet: 0x099a
+packetLen(0x099a, 9)
+
+// Packet: 0x099b
+packetLen(0x099b, 8)
+
+// Packet: 0x099c
+packetLen(0x099c, 6)
+
+// Packet: 0x099d
+packetLen(0x099d, -1)
+
+// Packet: 0x099e
+packetLen(0x099e, 12)
+
+// Packet: 0x099f
+packetLen(0x099f, -1)
+
+// Packet: 0x09a0
+packetLen(0x09a0, 6)
+
+// Packet: 0x09a1
+packetLen(0x09a1, 2)
+
+// Packet: 0x09a2
+packetLen(0x09a2, 6)
+
+// Packet: 0x09a3
+packetLen(0x09a3, -1)
+
+// Packet: 0x09a4
+packetLen(0x09a4, 18)
+
+// Packet: 0x09a5
+packetLen(0x09a5, 7)
+
+// Packet: 0x09a6
+packetLen(0x09a6, 12)
+
+// Packet: 0x09a7
+packetLen(0x09a7, 10)
+
+// Packet: 0x09a8
+packetLen(0x09a8, 16)
+
+// Packet: 0x09a9
+packetLen(0x09a9, 10)
+
+// Packet: 0x09aa
+packetLen(0x09aa, 16)
+
+// Packet: 0x09ab
+packetLen(0x09ab, 6)
+
+// Packet: 0x09ac
+packetLen(0x09ac, -1)
+
+// Packet: 0x09ad
+packetLen(0x09ad, 12)
+
+// Packet: 0x09ae
+packetLen(0x09ae, 19)
+
+// Packet: 0x09af
+packetLen(0x09af, 4)
+
+// Packet: 0x09b0
+packetLen(0x09b0, 10)
+
+// Packet: 0x09b1
+packetLen(0x09b1, 4)
+
+// Packet: 0x09b2
+packetLen(0x09b2, 10)
+
+// Packet: 0x09b3
+packetLen(0x09b3, 6)
+
+// Packet: 0x09b4
+packetLen(0x09b4, 6)
+
+// Packet: 0x09b5
+packetLen(0x09b5, 2)
+
+// Packet: 0x09b6
+packetLen(0x09b6, 6)
+
+// Packet: 0x09b7
+packetLen(0x09b7, 4)
+
+// Packet: 0x09b8
+packetLen(0x09b8, 6)
+
+// Packet: 0x09b9
+packetLen(0x09b9, 4)
+
+// Packet: 0x09ba
+packetLen(0x09ba, 2)
+
+// Packet: 0x09bb
+packetLen(0x09bb, 6)
+
+// Packet: 0x09bc
+packetLen(0x09bc, 6)
+
+// Packet: 0x09bd
+packetLen(0x09bd, 2)
+
+// Packet: 0x09be
+packetLen(0x09be, 2)
+
+// Packet: 0x09bf
+packetLen(0x09bf, 4)
+
+// Packet: 0x09c1
+packetLen(0x09c1, 10)
+
+// Packet: 0x09c2
+packetLen(0x09c2, -1)
+
+// Packet: 0x09c3
+packetLen(0x09c3, 10)
+
+// Packet: 0x09c4
+packetLen(0x09c4, 10)
+
+// Packet: 0x09c5
+packetLen(0x09c5, 1042)
+
+// Packet: 0x09c6
+packetLen(0x09c6, -1)
+
+// Packet: 0x09c7
+packetLen(0x09c7, 18)
+
+// Packet: 0x09c8
+packetLen(0x09c8, -1)
+
+// Packet: 0x09c9
+packetLen(0x09c9, -1)
+
+// Packet: 0x09ca
+packetLen(0x09ca, -1)
+
+// Packet: 0x09cb
+packetLen(0x09cb, 17)
+
+// Packet: 0x09cc
+packetLen(0x09cc, -1)
+
+// Packet: 0x09cd
+packetLen(0x09cd, 8)
+
+// Packet: 0x09ce
+packetLen(0x09ce, 102)
+
+// Packet: 0x09cf
+packetLen(0x09cf, -1)
+
+// Packet: 0x09d0
+packetLen(0x09d0, -1)
+
+// Packet: 0x09d1
+packetLen(0x09d1, 14)
+
+// Packet: 0x09d2
+packetLen(0x09d2, -1)
+
+// Packet: 0x09d3
+packetLen(0x09d3, -1)
+
+// Packet: 0x09d4
+packetLen(0x09d4, 2)
+
+// Packet: 0x09d5
+packetLen(0x09d5, -1)
+
+// Packet: 0x09d6
+packetLen(0x09d6, -1)
+
+// Packet: 0x09d7
+packetLen(0x09d7, -1)
+
+// Packet: 0x09d8
+packetLen(0x09d8, 2)
+
+// Packet: 0x09d9
+packetLen(0x09d9, 4)
+
+// Packet: 0x09da
+packetLen(0x09da, -1)
+
+// Packet: 0x09db
+packetLen(0x09db, -1)
+
+// Packet: 0x09dc
+packetLen(0x09dc, -1)
+
+// Packet: 0x09dd
+packetLen(0x09dd, -1)
+
+// Packet: 0x09de
+packetLen(0x09de, -1)
+
+// Packet: 0x09df
+packetLen(0x09df, 7)
+
+// Packet: 0x09e0
+packetLen(0x09e0, -1)
+
+// Packet: 0x09e1
+packetLen(0x09e1, 8)
+
+// Packet: 0x09e2
+packetLen(0x09e2, 8)
+
+// Packet: 0x09e3
+packetLen(0x09e3, 8)
+
+// Packet: 0x09e4
+packetLen(0x09e4, 8)
+
+// Packet: 0x09e5
+packetLen(0x09e5, 18)
+
+// Packet: 0x09e6
+packetLen(0x09e6, 24)
+
+// Packet: 0x09e7
+packetLen(0x09e7, 3)
+
+// Packet: 0x09e8
+packetLen(0x09e8, 11)
+
+// Packet: 0x09e9
+packetLen(0x09e9, 2)
+
+// Packet: 0x09ea
+packetLen(0x09ea, 11)
+
+// Packet: 0x09eb
+packetLen(0x09eb, -1)
+
+// Packet: 0x09ec
+packetLen(0x09ec, -1)
+
+// Packet: 0x09ed
+packetLen(0x09ed, 3)
+
+// Packet: 0x09ee
+packetLen(0x09ee, 11)
+
+// Packet: 0x09ef
+packetLen(0x09ef, 11)
+
+// Packet: 0x09f0
+packetLen(0x09f0, -1)
+
+// Packet: 0x09f1
+packetLen(0x09f1, 11)
+
+// Packet: 0x09f2
+packetLen(0x09f2, 12)
+
+// Packet: 0x09f3
+packetLen(0x09f3, 11)
+
+// Packet: 0x09f4
+packetLen(0x09f4, 12)
+
+// Packet: 0x09f5
+packetLen(0x09f5, 11)
+
+// Packet: 0x09f6
+packetLen(0x09f6, 11)
+
+// Packet: 0x09f7
+packetLen(0x09f7, 77)
+
+// Packet: 0x09f8
+packetLen(0x09f8, -1)
+
+// Packet: 0x09f9
+packetLen(0x09f9, 143)
+
+// Packet: 0x09fa
+packetLen(0x09fa, -1)
+
+// Packet: 0x09fb
+packetLen(0x09fb, -1)
+
+// Packet: 0x09fc
+packetLen(0x09fc, 6)
+
+// Packet: 0x09fd
+packetLen(0x09fd, -1)
+
+// Packet: 0x09fe
+packetLen(0x09fe, -1)
+
+// Packet: 0x09ff
+packetLen(0x09ff, -1)
+
+// Packet: 0x0a00
+packetLen(0x0a00, 269)
+
+// Packet: 0x0a01
+packetLen(0x0a01, 3)
+
+// Packet: 0x0a02
+packetLen(0x0a02, 4)
+
+// Packet: 0x0a03
+packetLen(0x0a03, 2)
+
+// Packet: 0x0a04
+packetLen(0x0a04, 6)
+
+// Packet: 0x0a05
+packetLen(0x0a05, 63)
+
+// Packet: 0x0a06
+packetLen(0x0a06, 6)
+
+// Packet: 0x0a07
+packetLen(0x0a07, 9)
+
+// Packet: 0x0a08
+packetLen(0x0a08, 26)
+
+// Packet: 0x0a09
+packetLen(0x0a09, 55)
+
+// Packet: 0x0a0a
+packetLen(0x0a0a, 57)
+
+// Packet: 0x0a0b
+packetLen(0x0a0b, 57)
+
+// Packet: 0x0a0c
+packetLen(0x0a0c, 66)
+
+// Packet: 0x0a0d
+packetLen(0x0a0d, -1)
+
+// Packet: 0x0a0e
+packetLen(0x0a0e, 14)
+
+// Packet: 0x0a0f
+packetLen(0x0a0f, -1)
+
+// Packet: 0x0a10
+packetLen(0x0a10, -1)
+
+// Packet: 0x0a11
+packetLen(0x0a11, -1)
+
+// Packet: 0x0a12
+packetLen(0x0a12, 27)
+
+// Packet: 0x0a13
+packetLen(0x0a13, 26)
+
+// Packet: 0x0a14
+packetLen(0x0a14, 10)
+
+// Packet: 0x0a15
+packetLen(0x0a15, 12)
+
+// Packet: 0x0a16
+packetLen(0x0a16, 26)
+
+// Packet: 0x0a17
+packetLen(0x0a17, 6)
+
+// Packet: 0x0a18
+packetLen(0x0a18, 14)
+
+// Packet: 0x0a19
+packetLen(0x0a19, 2)
+
+// Packet: 0x0a1a
+packetLen(0x0a1a, 25)
+
+// Packet: 0x0a1b
+packetLen(0x0a1b, 2)
+
+// Packet: 0x0a1c
+packetLen(0x0a1c, -1)
+
+// Packet: 0x0a1d
+packetLen(0x0a1d, 2)
+
+// Packet: 0x0a1e
+packetLen(0x0a1e, 3)
+
+// Packet: 0x0a1f
+packetLen(0x0a1f, 2)
+
+// Packet: 0x0a20
+packetLen(0x0a20, 23)
+
+// Packet: 0x0a21
+packetLen(0x0a21, 3)
+
+// Packet: 0x0a22
+packetLen(0x0a22, 7)
+
+// Packet: 0x0a23
+packetLen(0x0a23, -1)
+
+// Packet: 0x0a24
+packetLen(0x0a24, 66)
+
+// Packet: 0x0a25
+packetLen(0x0a25, 6)
+
+// Packet: 0x0a26
+packetLen(0x0a26, 7)
+
+// Packet: 0x0a27
+packetLen(0x0a27, 8)
+
+// Packet: 0x0a28
+packetLen(0x0a28, 3)
+
+// Packet: 0x0a29
+packetLen(0x0a29, 6)
+
+// Packet: 0x0a2a
+packetLen(0x0a2a, 6)
+
+// Packet: 0x0a2b
+packetLen(0x0a2b, 14)
+
+// Packet: 0x0a2c
+packetLen(0x0a2c, 12)
+
+// Packet: 0x0a2d
+packetLen(0x0a2d, -1)
+
+// Packet: 0x0a2e
+packetLen(0x0a2e, 6)
+
+// Packet: 0x0a2f
+packetLen(0x0a2f, 7)
+
+// Packet: 0x0a30
+packetLen(0x0a30, 106)
+
+// Packet: 0x0a31
+packetLen(0x0a31, -1)
+
+// Packet: 0x0a32
+packetLen(0x0a32, 2)
+
+// Packet: 0x0a33
+packetLen(0x0a33, 7)
+
+// Packet: 0x0a34
+packetLen(0x0a34, 6)
+
+// Packet: 0x0a35
+packetLen(0x0a35, 4)
+
+// Packet: 0x0a36
+packetLen(0x0a36, 7)
+
+// Packet: 0x0a37
+packetLen(0x0a37, 69)
+
+// Packet: 0x0a38
+packetLen(0x0a38, 3)
+
+// Packet: 0x0a39
+packetLen(0x0a39, 36)
+
+// Packet: 0x0a3a
+packetLen(0x0a3a, 12)
+
+// Packet: 0x0a3b
+packetLen(0x0a3b, -1)
+
+// Packet: 0x0a3c
+packetLen(0x0a3c, -1)
+
+// Packet: 0x0a3d
+packetLen(0x0a3d, 20)
+
+// Packet: 0x0a3e
+packetLen(0x0a3e, -1)
+
+// Packet: 0x0a3f
+packetLen(0x0a3f, 11)
+
+// Packet: 0x0a40
+packetLen(0x0a40, 11)
+
+// Packet: 0x0a41
+packetLen(0x0a41, 18)
+
+// Packet: 0x0a42
+packetLen(0x0a42, 43)
+
+// Packet: 0x0a43
+packetLen(0x0a43, 85)
+
+// Packet: 0x0a44
+packetLen(0x0a44, -1)
+
+// Packet: 0x0a46
+packetLen(0x0a46, 14)
+
+// Packet: 0x0a47
+packetLen(0x0a47, 3)
+
+// Packet: 0x0a48
+packetLen(0x0a48, 2)
+
+// Packet: 0x0a49
+packetLen(0x0a49, 22)
+
+// Packet: 0x0a4a
+packetLen(0x0a4a, 6)
+
+// Packet: 0x0a4b
+packetLen(0x0a4b, 22)
+
+// Packet: 0x0a4c
+packetLen(0x0a4c, 28)
+
+// Packet: 0x0a4d
+packetLen(0x0a4d, -1)
+
+// Packet: 0x0a4e
+packetLen(0x0a4e, 6)
+
+// Packet: 0x0a4f
+packetLen(0x0a4f, -1)
+
+// Packet: 0x0a50
+packetLen(0x0a50, 4)
+
+// Packet: 0x0a51
+packetLen(0x0a51, 34)
+
+// Packet: 0x0a52
+packetLen(0x0a52, 20)
+
+// Packet: 0x0a53
+packetLen(0x0a53, 10)
+
+// Packet: 0x0a54
+packetLen(0x0a54, -1)
+
+// Packet: 0x0a55
+packetLen(0x0a55, 2)
+
+// Packet: 0x0a56
+packetLen(0x0a56, 6)
+
+// Packet: 0x0a57
+packetLen(0x0a57, 6)
+
+// Packet: 0x0a58
+packetLen(0x0a58, 8)
+
+// Packet: 0x0a59
+packetLen(0x0a59, -1)
+
+// Packet: 0x0a5a
+packetLen(0x0a5a, 2)
+
+// Packet: 0x0a5b
+packetLen(0x0a5b, 7)
+
+// Packet: 0x0a5c
+packetLen(0x0a5c, 18)
+
+// Packet: 0x0a5d
+packetLen(0x0a5d, 6)
+
+// Packet: 0x0a68
+packetLen(0x0a68, 3)
+
+// Packet: 0x0a69
+packetLen(0x0a69, 6)
+
+// Packet: 0x0a6a
+packetLen(0x0a6a, 12)
+
+// Packet: 0x0a6b
+packetLen(0x0a6b, -1)
+
+// Packet: 0x0a6c
+packetLen(0x0a6c, 7)
+
+// Packet: 0x0a6d
+packetLen(0x0a6d, -1)
+
+// Packet: 0x0a6e
+packetLen(0x0a6e, -1)
+
+// Packet: 0x0a6f
+packetLen(0x0a6f, -1)
+
+// Packet: 0x0a70
+packetLen(0x0a70, 2)
+
+// Packet: 0x0a71
+packetLen(0x0a71, -1)
+
+// Packet: 0x0a72
+packetLen(0x0a72, 61)
+
+// Packet: 0x0a73
+packetLen(0x0a73, 2)
+
+// Packet: 0x0a74
+packetLen(0x0a74, 8)
+
+// Packet: 0x0a76
+packetLen(0x0a76, 80)
+
+// Packet: 0x0a77
+packetLen(0x0a77, 15)
+
+// Packet: 0x0a78
+packetLen(0x0a78, 15)
+
+// Packet: 0x0a79
+packetLen(0x0a79, -1)
+
+// Packet: 0x0a7b
+packetLen(0x0a7b, -1)
+
+// Packet: 0x0a7c
+packetLen(0x0a7c, -1)
+
+// Packet: 0x0a7d
+packetLen(0x0a7d, -1)
+
+// Packet: 0x0a7e
+packetLen(0x0a7e, -1)
+
+// Packet: 0x0a7f
+packetLen(0x0a7f, -1)
+
+// Packet: 0x0a80
+packetLen(0x0a80, 6)
+
+// Packet: 0x0a81
+packetLen(0x0a81, 4)
+
+// Packet: 0x0a82
+packetLen(0x0a82, 46)
+
+// Packet: 0x0a83
+packetLen(0x0a83, 46)
+
+// Packet: 0x0a84
+packetLen(0x0a84, 94)
+
+// Packet: 0x0a85
+packetLen(0x0a85, 82)
+
+// Packet: 0x0a86
+packetLen(0x0a86, -1)
+
+// Packet: 0x0a87
+packetLen(0x0a87, -1)
+
+// Packet: 0x0a88
+packetLen(0x0a88, 2)
+
+// Packet: 0x0a89
+packetLen(0x0a89, 61)
+
+// Packet: 0x0a8a
+packetLen(0x0a8a, 6)
+
+// Packet: 0x0a8b
+packetLen(0x0a8b, 2)
+
+// Packet: 0x0a8c
+packetLen(0x0a8c, 2)
+
+// Packet: 0x0a8d
+packetLen(0x0a8d, -1)
+
+// Packet: 0x0a8e
+packetLen(0x0a8e, 2)
+
+// Packet: 0x0a8f
+packetLen(0x0a8f, 2)
+
+// Packet: 0x0a90
+packetLen(0x0a90, 3)
+
+// Packet: 0x0a91
+packetLen(0x0a91, -1)
+
+// Packet: 0x0a92
+packetLen(0x0a92, -1)
+
+// Packet: 0x0a93
+packetLen(0x0a93, 3)
+
+// Packet: 0x0a94
+packetLen(0x0a94, 2)
+
+// Packet: 0x0a95
+packetLen(0x0a95, 4)
+
+// Packet: 0x0a96
+packetLen(0x0a96, 61)
+
+// Packet: 0x0a97
+packetLen(0x0a97, 8)
+
+// Packet: 0x0a98
+packetLen(0x0a98, 10)
+
+// Packet: 0x0a99
+packetLen(0x0a99, 4)
+
+// Packet: 0x0a9a
+packetLen(0x0a9a, 10)
+
+// Packet: 0x0a9b
+packetLen(0x0a9b, -1)
+
+// Packet: 0x0a9c
+packetLen(0x0a9c, 2)
+
+// Packet: 0x0a9d
+packetLen(0x0a9d, 4)
+
+// Packet: 0x0a9e
+packetLen(0x0a9e, 2)
+
+// Packet: 0x0a9f
+packetLen(0x0a9f, 2)
+
+// Packet: 0x0aa0
+packetLen(0x0aa0, 2)
+
+// Packet: 0x0aa1
+packetLen(0x0aa1, 4)
+
+// Packet: 0x0aa2
+packetLen(0x0aa2, -1)
+
+// Packet: 0x0aa3
+packetLen(0x0aa3, 9)
+
+// Packet: 0x0aa4
+packetLen(0x0aa4, 2)
+
+// Packet: 0x0aa5
+packetLen(0x0aa5, -1)
+
+// Packet: 0x0aa6
+packetLen(0x0aa6, 36)
+
+// Packet: 0x0aa7
+packetLen(0x0aa7, 6)
+
+// Packet: 0x0aa8
+packetLen(0x0aa8, 5)
+
+// Packet: 0x0aa9
+packetLen(0x0aa9, -1)
+
+// Packet: 0x0aaa
+packetLen(0x0aaa, -1)
+
+// Packet: 0x0aab
+packetLen(0x0aab, -1)
+
+// Packet: 0x0aac
+packetLen(0x0aac, 69)
+
+// Packet: 0x0aad
+packetLen(0x0aad, 51)
+
+// Packet: 0x0aae
+packetLen(0x0aae, 2)
+
+// Packet: 0x0aaf
+packetLen(0x0aaf, 6)
+
+// Packet: 0x0ab0
+packetLen(0x0ab0, 6)
+
+// Packet: 0x0ab1
+packetLen(0x0ab1, 14)
+
+// Packet: 0x0ab2
+packetLen(0x0ab2, 7)
+
+// Packet: 0x0ab3
+packetLen(0x0ab3, 19)
+
+// Packet: 0x0ab4
+packetLen(0x0ab4, 6)
+
+// Packet: 0x0ab5
+packetLen(0x0ab5, 2)
+
+// Packet: 0x0ab6
+packetLen(0x0ab6, 8)
+
+// Packet: 0x0ab7
+packetLen(0x0ab7, 4)
+
+// Packet: 0x0ab8
+packetLen(0x0ab8, 2)
+
+// Packet: 0x0ab9
+packetLen(0x0ab9, 47)
+
+// Packet: 0x0aba
+packetLen(0x0aba, 2)
+
+// Packet: 0x0abb
+packetLen(0x0abb, 2)
+
+// Packet: 0x0abc
+packetLen(0x0abc, -1)
+
+// Packet: 0x0abd
+packetLen(0x0abd, 10)
+
+// Packet: 0x0abe
+packetLen(0x0abe, -1)
+
+// Packet: 0x0abf
+packetLen(0x0abf, -1)
+
+// Packet: 0x0ac0
+packetLen(0x0ac0, 26)
+
+// Packet: 0x0ac1
+packetLen(0x0ac1, 26)
+
+// Packet: 0x0ac2
+packetLen(0x0ac2, -1)
+
+// Packet: 0x0ac3
+packetLen(0x0ac3, 2)
+
+// Packet: 0x0ac4
+packetLen(0x0ac4, -1)
+
+// Packet: 0x0ac5
+packetLen(0x0ac5, 156)
+
+// Packet: 0x0ac6
+packetLen(0x0ac6, 156)
+
+// Packet: 0x0ac7
+packetLen(0x0ac7, 156)
+
+// Packet: 0x0ac8
+packetLen(0x0ac8, 2)
+
+// Packet: 0x0ac9
+packetLen(0x0ac9, -1)
+
+// Packet: 0x0aca
+packetLen(0x0aca, 3)
+
+// Packet: 0x0acb
+packetLen(0x0acb, 12)
+
+// Packet: 0x0acc
+packetLen(0x0acc, 18)
+
+// Packet: 0x0acd
+packetLen(0x0acd, 23)
+
+// Packet: 0x0ace
+packetLen(0x0ace, 4)
+
+// Packet: 0x0acf
+packetLen(0x0acf, 68)
+
+// Packet: 0x0ad0
+packetLen(0x0ad0, 11)
+
+// Packet: 0x0ad1
+packetLen(0x0ad1, -1)
+
+// Packet: 0x0ad2
+packetLen(0x0ad2, 30)
+
+// Packet: 0x0ad3
+packetLen(0x0ad3, -1)
+
+// Packet: 0x0ad4
+packetLen(0x0ad4, -1)
+
+// Packet: 0x0ad5
+packetLen(0x0ad5, 2)
+
+// Packet: 0x0ad6
+packetLen(0x0ad6, 2)
+
+// Packet: 0x0ad7
+packetLen(0x0ad7, 8)
+
+// Packet: 0x0ad8
+packetLen(0x0ad8, 8)
+
+// Packet: 0x0ad9
+packetLen(0x0ad9, -1)
+
+// Packet: 0x0ada
+packetLen(0x0ada, 32)
+
+// Packet: 0x0adb
+packetLen(0x0adb, -1)
+
+// Packet: 0x0adc
+packetLen(0x0adc, 6)
+
+// Packet: 0x0add
+packetLen(0x0add, 24)
+
+// Packet: 0x0ade
+packetLen(0x0ade, 6)
+
+// Packet: 0x0adf
+packetLen(0x0adf, 58)
+
+// Packet: 0x0ae0
+packetLen(0x0ae0, 30)
+
+// Packet: 0x0ae1
+packetLen(0x0ae1, 28)
+
+// Packet: 0x0ae2
+packetLen(0x0ae2, 7)
+
+// Packet: 0x0ae3
+packetLen(0x0ae3, -1)
+
+// Packet: 0x0ae4
+packetLen(0x0ae4, 89)
+
+// Packet: 0x0ae5
+packetLen(0x0ae5, -1)
+
+// Packet: 0x0ae6
+packetLen(0x0ae6, 10)
+
+// Packet: 0x0ae7
+packetLen(0x0ae7, 38)
+
+// Packet: 0x0ae8
+packetLen(0x0ae8, 2)
+
+// Packet: 0x0ae9
+packetLen(0x0ae9, 13)
+
+// Packet: 0x0aec
+packetLen(0x0aec, 2)
+
+// Packet: 0x0aed
+packetLen(0x0aed, 2)
+
+// Packet: 0x0aee
+packetLen(0x0aee, 2)
+
+// Packet: 0x0aef
+packetLen(0x0aef, 2)
+
+// Packet: 0x0af0
+packetLen(0x0af0, 10)
+
+// Packet: 0x0af2
+packetLen(0x0af2, 40)
+
+// Packet: 0x0af3
+packetLen(0x0af3, -1)
+
+// Packet: 0x0af4
+packetLen(0x0af4, 11)
+
+// Packet: 0x0af5
+packetLen(0x0af5, 3)
+
+// Packet: 0x0af6
+packetLen(0x0af6, 88)
+
+// Packet: 0x0af7
+packetLen(0x0af7, 32)
+
+// Packet: 0x0af8
+packetLen(0x0af8, 11)
+
+// Packet: 0x0af9
+packetLen(0x0af9, 6)
+
+// Packet: 0x0afa
+packetLen(0x0afa, 58)
+
+// Packet: 0x0afb
+packetLen(0x0afb, -1)
+
+// Packet: 0x0afc
+packetLen(0x0afc, 16)
+
+// Packet: 0x0afd
+packetLen(0x0afd, -1)
+
+// Packet: 0x0afe
+packetLen(0x0afe, -1)
+
+// Packet: 0x0aff
+packetLen(0x0aff, -1)
+
+// Packet: 0x0b00
+packetLen(0x0b00, 8)
+
+// Packet: 0x0b01
+packetLen(0x0b01, 56)
+
+// Packet: 0x0b02
+packetLen(0x0b02, 26)
+
+// Packet: 0x0b03
+packetLen(0x0b03, -1)
+
+// Packet: 0x0b04
+packetLen(0x0b04, 90)
+
+// Packet: 0x0b05
+packetLen(0x0b05, 63)
+
+// Packet: 0x0b07
+packetLen(0x0b07, -1)
+
+// Packet: 0x0b08
+packetLen(0x0b08, -1)
+
+// Packet: 0x0b09
+packetLen(0x0b09, -1)
+
+// Packet: 0x0b0a
+packetLen(0x0b0a, -1)
+
+// Packet: 0x0b0b
+packetLen(0x0b0b, 4)
+
+// Packet: 0x0b0c
+packetLen(0x0b0c, 155)
+
+// Packet: 0x0b0d
+packetLen(0x0b0d, 10)
+
+// Packet: 0x0b0e
+packetLen(0x0b0e, -1)
+
+// Packet: 0x0b0f
+packetLen(0x0b0f, -1)
+
+// Packet: 0x0b10
+packetLen(0x0b10, 10)
+
+// Packet: 0x0b11
+packetLen(0x0b11, 4)
+
+// Packet: 0x0b12
+packetLen(0x0b12, 2)
+
+// Packet: 0x0b13
+packetLen(0x0b13, 48)
+
+// Packet: 0x0b14
+packetLen(0x0b14, 2)
+
+// Packet: 0x0b15
+packetLen(0x0b15, 7)
+
+// Packet: 0x0b16
+packetLen(0x0b16, 2)
+
+// Packet: 0x0b17
+packetLen(0x0b17, 3)
+
+// Packet: 0x0b18
+packetLen(0x0b18, 4)
+
+// Packet: 0x0b19
+packetLen(0x0b19, 2)
+
+// Packet: 0x0b1a
+packetLen(0x0b1a, 29)
+
+// Packet: 0x0b1b
+packetLen(0x0b1b, 2)
+
+// Packet: 0x0b1c
+packetLen(0x0b1c, 2)
+
+// Packet: 0x0b1d
+packetLen(0x0b1d, 2)
+
+// Packet: 0x0b1e
+packetLen(0x0b1e, 14)
+
+// Packet: 0x0b1f
+packetLen(0x0b1f, 14)
+
+// Packet: 0x0b20
+packetLen(0x0b20, 271)
+
+// Packet: 0x0b21
+packetLen(0x0b21, 13)
+
+// Packet: 0x0b22
+packetLen(0x0b22, 5)
+
+// Packet: 0x0b23
+packetLen(0x0b23, 6)
+
+// Packet: 0x0b24
+packetLen(0x0b24, 6)
+
+// Packet: 0x0b25
+packetLen(0x0b25, 6)
+
+// Packet: 0x0b27
+packetLen(0x0b27, -1)
+
+// Packet: 0x0b28
+packetLen(0x0b28, 3)
+
+// Packet: 0x0b2b
+packetLen(0x0b2b, 11)
+
+// Packet: 0x0b2c
+packetLen(0x0b2c, 3)
+
+// Packet: 0x0b2d
+packetLen(0x0b2d, 11)
+
+// Packet: 0x0b2e
+packetLen(0x0b2e, 4)
+
+// Packet: 0x0b2f
+packetLen(0x0b2f, 73)
+
+// Packet: 0x0b30
+packetLen(0x0b30, -1)
+
+// Packet: 0x0b31
+packetLen(0x0b31, 17)
+
+// Packet: 0x0b32
+packetLen(0x0b32, -1)
+
+// Packet: 0x0b33
+packetLen(0x0b33, 17)
+
+// Packet: 0x0b34
+packetLen(0x0b34, 50)
+
+// Packet: 0x0b35
+packetLen(0x0b35, 3)
+
+// Packet: 0x0b36
+packetLen(0x0b36, -1)
+
+// Packet: 0x0b37
+packetLen(0x0b37, -1)
+
+// Packet: 0x0b39
+packetLen(0x0b39, -1)
+
+// Packet: 0x0b3c
+packetLen(0x0b3c, 4)
+
+// Packet: 0x0b3d
+packetLen(0x0b3d, -1)
+
+// Packet: 0x0b3e
+packetLen(0x0b3e, -1)
+
+// Packet: 0x0b3f
+packetLen(0x0b3f, 64)
+
+// Packet: 0x0b40
+packetLen(0x0b40, -1)
+
+// Packet: 0x0b41
+packetLen(0x0b41, 70)
+
+// Packet: 0x0b42
+packetLen(0x0b42, 62)
+
+// Packet: 0x0b43
+packetLen(0x0b43, 48)
+
+// Packet: 0x0b44
+packetLen(0x0b44, 58)
+
+// Packet: 0x0b45
+packetLen(0x0b45, 58)
+
+// Packet: 0x0b46
+packetLen(0x0b46, 10)
+
+// Packet: 0x0b47
+packetLen(0x0b47, 14)
+
+// Packet: 0x0b48
+packetLen(0x0b48, 18)
+
+// Packet: 0x0b49
+packetLen(0x0b49, 4)
+
+// Packet: 0x0b4a
+packetLen(0x0b4a, 6)
+
+// Packet: 0x0b4b
+packetLen(0x0b4b, 4)
+
+// Packet: 0x0b4c
+packetLen(0x0b4c, 2)
+
+// Packet: 0x0b4d
+packetLen(0x0b4d, -1)
+
+// Packet: 0x0b4e
+packetLen(0x0b4e, -1)
+
+// Packet: 0x0b4f
+packetLen(0x0b4f, 2)
+
+// Packet: 0x0b50
+packetLen(0x0b50, 2)
+
+// Packet: 0x0b51
+packetLen(0x0b51, 2)
+
+// Packet: 0x0b52
+packetLen(0x0b52, 2)
+
+// Packet: 0x0b53
+packetLen(0x0b53, 52)
+
+// Packet: 0x0b54
+packetLen(0x0b54, 8)
+
+// Packet: 0x0b55
+packetLen(0x0b55, -1)
+
+// Packet: 0x0b56
+packetLen(0x0b56, -1)
+
+// Packet: 0x0b57
+packetLen(0x0b57, -1)
+
+// Packet: 0x0b58
+packetLen(0x0b58, 2)
+
+// Packet: 0x0b59
+packetLen(0x0b59, 4)
+
+// Packet: 0x0b5a
+packetLen(0x0b5a, -1)
+
+// Packet: 0x0b5b
+packetLen(0x0b5b, 14)
+
+// Packet: 0x0b5c
+packetLen(0x0b5c, 2)
+
+// Packet: 0x0b5d
+packetLen(0x0b5d, 10)
+
+// Packet: 0x0b5e
+packetLen(0x0b5e, 33)
+
+// Packet: 0x0b5f
+packetLen(0x0b5f, -1)
+
+// Packet: 0x0b60
+packetLen(0x0b60, -1)
+
+// Packet: 0x0b61
+packetLen(0x0b61, -1)
+
+// Packet: 0x0b62
+packetLen(0x0b62, -1)
+
+// Packet: 0x0b63
+packetLen(0x0b63, -1)
+
+// Packet: 0x0b64
+packetLen(0x0b64, -1)
+
+// Packet: 0x0b65
+packetLen(0x0b65, -1)
+
+// Packet: 0x0b66
+packetLen(0x0b66, 26)
+
+// Packet: 0x0b67
+packetLen(0x0b67, 33)
+
+// Packet: 0x0b68
+packetLen(0x0b68, 12)
+
+// Packet: 0x0b69
+packetLen(0x0b69, 18)
+
+// Packet: 0x0b6a
+packetLen(0x0b6a, -1)
+
+// Packet: 0x0b6b
+packetLen(0x0b6b, 14)
+
+// Packet: 0x0b6c
+packetLen(0x0b6c, 12)
+
+// Packet: 0x0b6d
+packetLen(0x0b6d, 6)
+
+// Packet: 0x0b6e
+packetLen(0x0b6e, 14)
+
+// Packet: 0x0b6f
+#if PACKETVER >= 20200129
+packetLen(0x0b6f, 177)
+#endif
+
+// Packet: 0x0b70
+#if PACKETVER >= 20200129
+packetLen(0x0b70, 8)
+#endif
+
+// Packet: 0x0b71
+#if PACKETVER >= 20200129
+packetLen(0x0b71, 177)
+#endif
+
+// Packet: 0x0b72
+#if PACKETVER >= 20200129
+packetLen(0x0b72, 4)
+#endif
+
+
+#endif /* COMMON_PACKETS2020_LEN_ZERO_H */
diff --git a/src/common/packets/packets_len_main.h b/src/common/packets/packets_len_main.h
index 365b0af6f..7b93b35b0 100644
--- a/src/common/packets/packets_len_main.h
+++ b/src/common/packets/packets_len_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets_len_re.h b/src/common/packets/packets_len_re.h
index 302381722..23a507886 100644
--- a/src/common/packets/packets_len_re.h
+++ b/src/common/packets/packets_len_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/common/packets/packets_len_zero.h b/src/common/packets/packets_len_zero.h
index 1385c80ee..9f1595459 100644
--- a/src/common/packets/packets_len_zero.h
+++ b/src/common/packets/packets_len_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2018-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2018-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,9 @@
/* This file is autogenerated, please do not commit manual changes */
-#if PACKETVER >= 20190000
+#if PACKETVER >= 20200000
+#include "common/packets/packets2020_len_zero.h"
+#elif PACKETVER >= 20190000
#include "common/packets/packets2019_len_zero.h"
#elif PACKETVER >= 20180000
#include "common/packets/packets2018_len_zero.h"
diff --git a/src/map/clif.c b/src/map/clif.c
index 3dff01523..942e492c2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -20028,7 +20028,7 @@ static void clif_cashShopOpen(int fd, struct map_session_data *sd, int tab)
p->packetType = HEADER_ZC_SE_CASHSHOP_OPEN;
p->cashPoints = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values
p->kafraPoints = sd->kafraPoints;
-#if PACKETVER_ZERO_NUM >= 20191224
+#if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224
p->tab = tab;
#endif
WFIFOSET(fd, sizeof(struct PACKET_ZC_SE_CASHSHOP_OPEN));
@@ -23209,6 +23209,116 @@ static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd)
#endif
}
+static void clif_parse_npc_expanded_barter_closed(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_npc_expanded_barter_closed(int fd, struct map_session_data *sd)
+{
+}
+
+#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
+#define NEXT_EXPANDED_BARTER_ITEM(var, count) \
+ var = (struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub *)((char*)item + \
+ sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub) + \
+ count * sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2))
+#endif
+
+static void clif_npc_expanded_barter_open(struct map_session_data *sd, struct npc_data *nd)
+{
+#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
+ nullpo_retv(sd);
+ nullpo_retv(nd);
+ struct npc_item_list *shop = nd->u.scr.shop->item;
+ const int shop_size = nd->u.scr.shop->items;
+
+ int items_count = 0;
+ int currencies_count = 0;
+ struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN *packet = (struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN*)&packet_buf[0];
+ STATIC_ASSERT(sizeof(packet_buf) > sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN), "packet_buf size too small");
+ int buf_left = sizeof(packet_buf) - sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN);
+ packet->packetType = HEADER_ZC_NPC_EXPANDED_BARTER_OPEN;
+ struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub *item = &packet->items[0];
+
+ for (int i = 0; i < shop_size && buf_left >= sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub); i++) {
+ if (shop[i].nameid) {
+ struct item_data *id = itemdb->exists(shop[i].nameid);
+ if (id == NULL)
+ continue;
+
+ item->nameid = shop[i].nameid;
+ item->type = itemtype(id->type);
+ item->amount = shop[i].qty;
+ item->weight = id->weight * 10;
+ item->index = i;
+ item->zeny = shop[i].value;
+ item->currency_count = 0;
+ buf_left -= sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub);
+ items_count ++;
+ int count = shop[i].value2;
+ if (buf_left < sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2) * count) {
+ NEXT_EXPANDED_BARTER_ITEM(item, 0);
+ break;
+ }
+ for (int j = 0; j < count; j ++) {
+ struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 *packet_currency = &item->currencies[j];
+ struct npc_barter_currency *currency = &shop[i].currency[j];
+ struct item_data *id2 = itemdb->exists(currency->nameid);
+ if (id2 == NULL)
+ continue;
+ packet_currency->nameid = currency->nameid;
+ if (currency->refine == -1)
+ packet_currency->refine_level = 0;
+ else
+ packet_currency->refine_level = currency->refine;
+ packet_currency->amount = currency->amount;
+ packet_currency->type = itemtype(id2->type);
+ currencies_count ++;
+ item->currency_count ++;
+ }
+ NEXT_EXPANDED_BARTER_ITEM(item, item->currency_count);
+ }
+ }
+
+ packet->items_count = items_count;
+ packet->packetLength = sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN) +
+ sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub) * items_count +
+ sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2) * currencies_count;
+ clif->send(packet, packet->packetLength, &sd->bl, SELF);
+#endif
+}
+
+#undef NEXT_EXPANDED_BARTER_ITEM
+
+static void clif_parse_npc_expanded_barter_purchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+static void clif_parse_npc_expanded_barter_purchase(int fd, struct map_session_data *sd)
+{
+#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
+ if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd))
+ return;
+
+ const struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE *const p = RP2PTR(fd);
+ int count = (p->packetLength - sizeof(struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE)) / sizeof p->list[0];
+ struct barteritemlist item_list;
+
+ Assert_retv(count >= 0 && count <= sd->status.inventorySize);
+
+ VECTOR_INIT(item_list);
+ VECTOR_ENSURE(item_list, count, 1);
+
+ for (int i = 0; i < count; i++) {
+ struct barter_itemlist_entry entry = { 0 };
+ entry.addId = p->list[i].itemId;
+ entry.addAmount = p->list[i].amount;
+ entry.removeIndex = -1;
+ entry.shopIndex = p->list[i].shopIndex;
+ VECTOR_PUSH(item_list, entry);
+ }
+
+ int response = npc->expanded_barter_buylist(sd, &item_list);
+ clif->npc_buy_result(sd, response);
+
+ VECTOR_CLEAR(item_list);
+#endif
+}
+
static void clif_parse_clientVersion(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_clientVersion(int fd, struct map_session_data *sd)
{
@@ -24766,6 +24876,9 @@ void clif_defaults(void)
clif->npc_barter_open = clif_npc_barter_open;
clif->pNPCBarterClosed = clif_parse_NPCBarterClosed;
clif->pNPCBarterPurchase = clif_parse_NPCBarterPurchase;
+ clif->npc_expanded_barter_open = clif_npc_expanded_barter_open;
+ clif->pNPCExpandedBarterPurchase = clif_parse_npc_expanded_barter_purchase;
+ clif->pNPCExpandedBarterClosed = clif_parse_npc_expanded_barter_closed;
clif->pClientVersion = clif_parse_clientVersion;
clif->pPing = clif_parse_ping;
clif->ping = clif_ping;
diff --git a/src/map/clif.h b/src/map/clif.h
index b61772bba..252dfefe1 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1663,6 +1663,9 @@ struct clif_interface {
void (*npc_barter_open) (struct map_session_data *sd, struct npc_data *nd);
void (*pNPCBarterClosed) (int fd, struct map_session_data *sd);
void (*pNPCBarterPurchase) (int fd, struct map_session_data *sd);
+ void (*pNPCExpandedBarterClosed) (int fd, struct map_session_data *sd);
+ void (*pNPCExpandedBarterPurchase) (int fd, struct map_session_data *sd);
+ void (*npc_expanded_barter_open) (struct map_session_data *sd, struct npc_data *nd);
void (*pClientVersion) (int fd, struct map_session_data *sd);
void (*pPing) (int fd, struct map_session_data *sd);
void (*ping) (struct map_session_data *sd);
diff --git a/src/map/map.c b/src/map/map.c
index afdc2ed41..9a45c4d21 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -4452,6 +4452,7 @@ static bool inter_config_read_database_names(const char *filename, const struct
libconfig->setting_lookup_mutable_string(setting, "autotrade_data_db", map->autotrade_data_db, sizeof(map->autotrade_data_db));
libconfig->setting_lookup_mutable_string(setting, "npc_market_data_db", map->npc_market_data_db, sizeof(map->npc_market_data_db));
libconfig->setting_lookup_mutable_string(setting, "npc_barter_data_db", map->npc_barter_data_db, sizeof(map->npc_barter_data_db));
+ libconfig->setting_lookup_mutable_string(setting, "npc_expanded_barter_data_db", map->npc_expanded_barter_data_db, sizeof(map->npc_expanded_barter_data_db));
if (!mapreg->config_read(filename, setting, imported))
retval = false;
@@ -6749,6 +6750,7 @@ int do_init(int argc, char *argv[])
npc->event_do_oninit( false ); // Init npcs (OnInit)
npc->market_fromsql(); /* after OnInit */
npc->barter_fromsql(); /* after OnInit */
+ npc->expanded_barter_fromsql(); /* after OnInit */
if (battle_config.pk_mode)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
diff --git a/src/map/map.h b/src/map/map.h
index 78f1a3c89..dbd9c0fba 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1056,6 +1056,7 @@ struct map_interface {
char autotrade_data_db[32];
char npc_market_data_db[32];
char npc_barter_data_db[32];
+ char npc_expanded_barter_data_db[32];
char default_codepage[32];
char default_lang_str[64];
diff --git a/src/map/messages_main.h b/src/map/messages_main.h
index b2b67f08c..6fc0310e7 100644
--- a/src/map/messages_main.h
+++ b/src/map/messages_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20200108
+Latest version: 20200129
*/
enum clif_messages {
@@ -22464,6 +22464,63 @@ Search
*/
MSG_ID_EC1 = 0xec1,
#endif
+#if PACKETVER >= 20200122
+/*20200122 to latest
+리서치 리포트 상태가 됩니다.
+*/
+ MSG_ID_EC2 = 0xec2,
+/*20200122 to latest
+리서치 리포트 상태가 해제됩니다.
+*/
+ MSG_ID_EC3 = 0xec3,
+/*20200122 to latest
+제조에 성공 했습니다.
+*/
+ MSG_ID_EC4 = 0xec4,
+/*20200122 to latest
+제조에 실패 했습니다.
+*/
+ MSG_ID_EC5 = 0xec5,
+/*20200122 to latest
+쉐도우 장비가 파괴 및 해제에서 보호됩니다.
+*/
+ MSG_ID_EC6 = 0xec6,
+/*20200122 to latest
+풀 쉐도우 프로텍션이 해제됩니다.
+*/
+ MSG_ID_EC7 = 0xec7,
+/*20200122 to latest
+식물형, 무형 몬스터에게 주는 데미지가 증가합니다.
+*/
+ MSG_ID_EC8 = 0xec8,
+/*20200122 to latest
+지옥 나무의 가루효과가 사라집니다.
+*/
+ MSG_ID_EC9 = 0xec9,
+#endif
+#if PACKETVER >= 20200129
+/*20200129 to latest
+공격 장치가 활성화되었습니다.
+*/
+ MSG_ID_ECA = 0xeca,
+/*20200129 to latest
+공격 장치가 해제되었습니다.
+*/
+ MSG_ID_ECB = 0xecb,
+/*20200129 to latest
+물리 방어력 및 물리 저항력이 증가되었습니다.
+*/
+ MSG_ID_ECC = 0xecc,
+/*20200129 to latest
+방어 장치가 해제되었습니다.
+*/
+ MSG_ID_ECD = 0xecd,
+/*20200129 to latest
+검색
+Search
+*/
+ MSG_ID_ECE = 0xece,
+#endif
};
#endif /* MAP_MESSAGES_MAIN_H */
diff --git a/src/map/messages_re.h b/src/map/messages_re.h
index 8cb3b6624..f4cc62d68 100644
--- a/src/map/messages_re.h
+++ b/src/map/messages_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20200108
+Latest version: 20200205
*/
enum clif_messages {
@@ -21941,6 +21941,63 @@ Search
*/
MSG_ID_EC1 = 0xec1,
#endif
+#if PACKETVER >= 20200122
+/*20200122 to latest
+리서치 리포트 상태가 됩니다.
+*/
+ MSG_ID_EC2 = 0xec2,
+/*20200122 to latest
+리서치 리포트 상태가 해제됩니다.
+*/
+ MSG_ID_EC3 = 0xec3,
+/*20200122 to latest
+제조에 성공 했습니다.
+*/
+ MSG_ID_EC4 = 0xec4,
+/*20200122 to latest
+제조에 실패 했습니다.
+*/
+ MSG_ID_EC5 = 0xec5,
+/*20200122 to latest
+쉐도우 장비가 파괴 및 해제에서 보호됩니다.
+*/
+ MSG_ID_EC6 = 0xec6,
+/*20200122 to latest
+풀 쉐도우 프로텍션이 해제됩니다.
+*/
+ MSG_ID_EC7 = 0xec7,
+/*20200122 to latest
+식물형, 무형 몬스터에게 주는 데미지가 증가합니다.
+*/
+ MSG_ID_EC8 = 0xec8,
+/*20200122 to latest
+지옥 나무의 가루효과가 사라집니다.
+*/
+ MSG_ID_EC9 = 0xec9,
+#endif
+#if PACKETVER >= 20200205
+/*20200205 to latest
+공격 장치가 활성화되었습니다.
+*/
+ MSG_ID_ECA = 0xeca,
+/*20200205 to latest
+공격 장치가 해제되었습니다.
+*/
+ MSG_ID_ECB = 0xecb,
+/*20200205 to latest
+물리 방어력 및 물리 저항력이 증가되었습니다.
+*/
+ MSG_ID_ECC = 0xecc,
+/*20200205 to latest
+방어 장치가 해제되었습니다.
+*/
+ MSG_ID_ECD = 0xecd,
+/*20200205 to latest
+검색
+Search
+*/
+ MSG_ID_ECE = 0xece,
+#endif
};
#endif /* MAP_MESSAGES_RE_H */
diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h
index 18aed7d5b..55c0329ee 100644
--- a/src/map/messages_zero.h
+++ b/src/map/messages_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* This file is autogenerated, please do not commit manual changes
-Latest version: 20191224
+Latest version: 20200129
*/
enum clif_messages {
@@ -6734,9 +6734,11 @@ The Memorial Dungeon's entry time limit expired; it has been destroyed.
The Memorial Dungeon has been removed.
*/
MSG_MEMORIAL_DUN_DESTROY_REQUEST = 0x544,
-/*20171018 to latest
+/*20171018 to 20191224
메모리얼 던전에 시스템 오류가 발생하였습니다. 정상적인 게임 진행을 위해 재접속을 해주십시오.
A system error has occurred in the Memorial Dungeon. Please relog in to the game to continue playing.
+20200115 to latest
+메모리얼 던전에 통신 장애가 발생하였습니다. 정상적인 게임 진행을 위해 잠시 후, 재접속을 해주십시오.
*/
MSG_MEMORIAL_DUN_ERROR = 0x545,
/*20171018 to latest
@@ -18319,8 +18321,10 @@ VTC 인증에 실패하였습니다.
가나다 정렬
*/
MSG_ID_E8A = 0xe8a,
-/*20191113 to latest
+/*20191113 to 20191224
기본 결과물은 %s %d개 이나, 낮은 확률로 최대 %d개까지 생성될 수 있습니다.
+20200115 to latest
+※[%s] %d~%d개 제작
*/
MSG_ID_E8B = 0xe8b,
/*20191113 to latest
@@ -18536,6 +18540,71 @@ https://member.gnjoy.com.tw/billing.aspx
*/
MSG_ID_EBE = 0xebe,
#endif
+#if PACKETVER >= 20200115
+/*20200115 to latest
+역순 정렬
+*/
+ MSG_ID_EBF = 0xebf,
+/*20200115 to latest
+검색 내용 입력
+*/
+ MSG_ID_EC0 = 0xec0,
+/*20200115 to latest
+검색
+Search
+*/
+ MSG_ID_EC1 = 0xec1,
+/*20200115 to latest
+리서치 리포트 상태가 됩니다.
+*/
+ MSG_ID_EC2 = 0xec2,
+/*20200115 to latest
+리서치 리포트 상태가 해제됩니다.
+*/
+ MSG_ID_EC3 = 0xec3,
+/*20200115 to latest
+제조에 성공 했습니다.
+*/
+ MSG_ID_EC4 = 0xec4,
+/*20200115 to latest
+제조에 실패 했습니다.
+*/
+ MSG_ID_EC5 = 0xec5,
+/*20200115 to latest
+쉐도우 장비가 파괴 및 해제에서 보호됩니다.
+*/
+ MSG_ID_EC6 = 0xec6,
+/*20200115 to latest
+풀 쉐도우 프로텍션이 해제됩니다.
+*/
+ MSG_ID_EC7 = 0xec7,
+/*20200115 to latest
+식물형, 무형 몬스터에게 주는 데미지가 증가합니다.
+*/
+ MSG_ID_EC8 = 0xec8,
+/*20200115 to latest
+지옥 나무의 가루효과가 사라집니다.
+*/
+ MSG_ID_EC9 = 0xec9,
+#endif
+#if PACKETVER >= 20200129
+/*20200129 to latest
+공격 장치가 활성화되었습니다.
+*/
+ MSG_ID_ECA = 0xeca,
+/*20200129 to latest
+공격 장치가 해제되었습니다.
+*/
+ MSG_ID_ECB = 0xecb,
+/*20200129 to latest
+물리 방어력 및 물리 저항력이 증가되었습니다.
+*/
+ MSG_ID_ECC = 0xecc,
+/*20200129 to latest
+방어 장치가 해제되었습니다.
+*/
+ MSG_ID_ECD = 0xecd,
+#endif
};
#endif /* MAP_MESSAGES_ZERO_H */
diff --git a/src/map/npc.c b/src/map/npc.c
index cc588e52c..657fb987e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1457,7 +1457,11 @@ static int npc_cashshop_buylist(struct map_session_data *sd, int points, struct
return ERROR_TYPE_NPC;
if( nd->subtype != CASHSHOP ) {
- if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
+ if (nd->subtype == SCRIPT && nd->u.scr.shop &&
+ nd->u.scr.shop->type != NST_ZENY &&
+ nd->u.scr.shop->type != NST_MARKET &&
+ nd->u.scr.shop->type != NST_BARTER &&
+ nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
} else {
@@ -1623,7 +1627,7 @@ static void npc_market_tosql(struct npc_data *nd, int index)
{
nullpo_retv(nd);
Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
- if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%u')",
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%d')",
map->npc_market_data_db, nd->exname, nd->u.scr.shop->item[index].nameid, nd->u.scr.shop->item[index].qty))
Sql_ShowDebug(map->mysql_handle);
}
@@ -1716,7 +1720,9 @@ static void npc_barter_tosql(struct npc_data *nd, int index)
nullpo_retv(nd);
Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
const struct npc_item_list *const item = &nd->u.scr.shop->item[index];
- if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s', '%d', '%u', '%u', '%d')",
+ if (item->qty == -1)
+ return;
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s', '%d', '%d', '%u', '%d')",
map->npc_barter_data_db, nd->exname, item->nameid, item->qty, item->value, item->value2)) {
Sql_ShowDebug(map->mysql_handle);
}
@@ -1753,6 +1759,178 @@ static void npc_barter_delfromsql(struct npc_data *nd, int index)
}
}
+
+/**
+ * Loads persistent NPC Expanded Barter Data from SQL
+ **/
+static void npc_expanded_barter_fromsql(void)
+{
+ struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
+ char name[NAME_LENGTH + 1];
+ int itemid;
+ int amount;
+ int zeny;
+ StringBuf buf;
+
+ StrBuf->Init(&buf);
+ StrBuf->AppendStr(&buf, "SELECT `name`, `itemId`, `amount`, `zeny`");
+ for (int k = 1; k < 11; k ++) {
+ StrBuf->Printf(&buf, ", `currencyId%d`, `currencyAmount%d`, `currencyRefine%d`", k, k, k);
+ }
+ StrBuf->Printf(&buf, " FROM `%s`", map->npc_expanded_barter_data_db);
+
+ if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
+ || SQL_ERROR == SQL->StmtExecute(stmt)
+ ) {
+ SqlStmt_ShowDebug(stmt);
+ SQL->StmtFree(stmt);
+ return;
+ }
+
+ struct npc_barter_currency tempCurrency[10];
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name, sizeof name, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, sizeof itemid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_UINT32, &amount, sizeof amount, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 3, SQLDT_UINT32, &zeny, sizeof zeny, NULL, NULL);
+ for (int k = 0; k < 10; k ++) {
+ SQL->StmtBindColumn(stmt, k * 3 + 4, SQLDT_INT, &tempCurrency[k].nameid, sizeof tempCurrency[k].nameid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, k * 3 + 5, SQLDT_INT, &tempCurrency[k].amount, sizeof tempCurrency[k].amount, NULL, NULL);
+ SQL->StmtBindColumn(stmt, k * 3 + 6, SQLDT_INT, &tempCurrency[k].refine, sizeof tempCurrency[k].refine, NULL, NULL);
+ }
+
+ while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) {
+ struct npc_data *nd = NULL;
+ unsigned short i;
+
+ if ((nd = npc->name2id(name)) == NULL) {
+ ShowError("npc_expanded_barter_fromsql: NPC '%s' not found! skipping...\n",name);
+ npc->expanded_barter_delfromsql_sub(name, INT_MAX, 0, 0, NULL);
+ continue;
+ } else if (nd->subtype != SCRIPT || nd->u.scr.shop == NULL || nd->u.scr.shop->items == 0 || nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ ShowError("npc_expanded_barter_fromsql: NPC '%s' is not proper for barter, skipping...\n",name);
+ npc->expanded_barter_delfromsql_sub(name, INT_MAX, 0, 0, NULL);
+ continue;
+ }
+
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid == itemid && item->value == zeny) {
+ int count = nd->u.scr.shop->item[i].value2;
+ if (count > 10)
+ count = 10;
+ int curIndex;
+ for (curIndex = 0; curIndex < count; curIndex ++) {
+ struct npc_barter_currency *currency = &nd->u.scr.shop->item[i].currency[curIndex];
+ struct npc_barter_currency *currency2 = &tempCurrency[curIndex];
+ if (currency->nameid != currency2->nameid ||
+ currency->amount != currency2->amount ||
+ currency->refine != currency2->refine) {
+ break;
+ }
+ }
+ if (curIndex == count) {
+ item->qty = amount;
+ break;
+ }
+ }
+ }
+
+ if (i == nd->u.scr.shop->items) {
+ ShowError("npc_expanded_barter_fromsql: NPC '%s' does not sell item %d (qty %d), deleting...\n", name, itemid, amount);
+ npc->expanded_barter_delfromsql_sub(name, itemid, zeny, 10, &tempCurrency[0]);
+ continue;
+ }
+ }
+ SQL->StmtFree(stmt);
+ StrBuf->Destroy(&buf);
+}
+
+/**
+ * Saves persistent NPC Expanded Barter Data into SQL
+ **/
+static void npc_expanded_barter_tosql(struct npc_data *nd, int index)
+{
+ nullpo_retv(nd);
+ Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[index];
+ if (item->qty == -1)
+ return;
+
+ npc->expanded_barter_delfromsql(nd, index);
+
+ StringBuf buf;
+ StrBuf->Init(&buf);
+ StrBuf->Printf(&buf, "INSERT INTO `%s` VALUES ('%s', '%d', '%d', '%u'", map->npc_expanded_barter_data_db, nd->exname, item->nameid, item->qty, item->value);
+ int currencyCount = item->value2;
+ if (currencyCount > 10)
+ currencyCount = 10;
+ int k;
+ for (k = 0; k < currencyCount; k++) {
+ struct npc_barter_currency *currency = &item->currency[k];
+ StrBuf->Printf(&buf, ", '%d', '%d', '%d'", currency->nameid, currency->amount, currency->refine);
+ }
+ for (; k < 10; k ++) {
+ StrBuf->Printf(&buf, ", '0', '0', '0'");
+ }
+ StrBuf->AppendStr(&buf, ")");
+
+ if (SQL_ERROR == SQL->QueryStr(map->mysql_handle, StrBuf->Value(&buf))) {
+ Sql_ShowDebug(map->mysql_handle);
+ }
+ StrBuf->Destroy(&buf);
+}
+
+/**
+ * Removes persistent NPC Expanded Barter Data from SQL
+ */
+static void npc_expanded_barter_delfromsql_sub(const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency* currency)
+{
+ if (itemId == INT_MAX) {
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s'", map->npc_expanded_barter_data_db, npcname))
+ Sql_ShowDebug(map->mysql_handle);
+ } else {
+ StringBuf buf;
+
+ StrBuf->Init(&buf);
+ StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE `name`='%s' AND `itemId`='%d' AND `zeny`='%d'",
+ map->npc_expanded_barter_data_db, npcname, itemId, zeny);
+ int k = 0;
+ if (currencyCount > 10)
+ currencyCount = 10;
+ for (k = 0; k < currencyCount; k++) {
+ struct npc_barter_currency *currency1 = &currency[k];
+ StrBuf->Printf(&buf, " AND currencyId%d='%d' and currencyAmount%d='%d' and currencyRefine%d='%d'",
+ k + 1, currency1->nameid, k + 1, currency1->amount, k + 1, currency1->refine);
+ }
+ for (; k < 10; k ++) {
+ StrBuf->Printf(&buf, " AND currencyId%d='0' and currencyAmount%d='0' and currencyRefine%d='0'",
+ k + 1, k + 1, k + 1);
+ }
+ StrBuf->AppendStr(&buf, " LIMIT 1");
+
+ if (SQL_ERROR == SQL->QueryStr(map->mysql_handle, StrBuf->Value(&buf))) {
+ Sql_ShowDebug(map->mysql_handle);
+ }
+ StrBuf->Destroy(&buf);
+ }
+}
+
+
+/**
+ * Removes persistent NPC Expanded Barter Data from SQL
+ **/
+static void npc_expanded_barter_delfromsql(struct npc_data *nd, int index)
+{
+ nullpo_retv(nd);
+ if (index == INT_MAX) {
+ npc->expanded_barter_delfromsql_sub(nd->exname, INT_MAX, 0, 0, NULL);
+ } else {
+ Assert_retv(index >= 0 && index < nd->u.scr.shop->items);
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[index];
+ npc->expanded_barter_delfromsql_sub(nd->exname, item->nameid, item->value, item->value2, &item->currency[0]);
+ }
+}
+
/**
* Judges whether to allow and spawn a trader's window.
**/
@@ -1788,6 +1966,9 @@ static bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd)
case NST_BARTER:
clif->npc_barter_open(sd, nd);
break;
+ case NST_EXPANDED_BARTER:
+ clif->npc_expanded_barter_open(sd, nd);
+ break;
default:
clif->cashshop_show(sd,nd);
break;
@@ -1914,7 +2095,11 @@ static int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount,
return ERROR_TYPE_ITEM_ID; // Invalid Item
if( nd->subtype != CASHSHOP ) {
- if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
+ if (nd->subtype == SCRIPT && nd->u.scr.shop &&
+ nd->u.scr.shop->type != NST_ZENY &&
+ nd->u.scr.shop->type != NST_MARKET &&
+ nd->u.scr.shop->type != NST_BARTER &&
+ nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
shop = nd->u.scr.shop->item;
shop_size = nd->u.scr.shop->items;
} else {
@@ -2262,6 +2447,9 @@ static int npc_barter_buylist(struct map_session_data *sd, struct barteritemlist
if (n < 0 || n >= sd->status.inventorySize)
return 11; // wrong inventory index
+ if (entry->addAmount <= 0)
+ return 14; // not enough item amount in inventory
+
int removeId = sd->status.inventory[n].nameid;
const int j = entry->shopIndex;
if (j < 0 || j >= shop_size)
@@ -2355,6 +2543,152 @@ static int npc_barter_buylist(struct map_session_data *sd, struct barteritemlist
return 12;
}
+
+/**
+ * Processes incoming npc expanded barter purchase list
+ **/
+static int npc_expanded_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list)
+{
+ nullpo_retr(1, sd);
+ nullpo_retr(1, item_list);
+
+ struct npc_data* nd = npc->checknear(sd, map->id2bl(sd->npc_shopid));
+
+ if (nd == NULL || nd->subtype != SCRIPT || VECTOR_LENGTH(*item_list) == 0 ||
+ !nd->u.scr.shop || nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ return 11;
+ }
+
+ struct npc_item_list *shop = nd->u.scr.shop->item;
+ unsigned short shop_size = nd->u.scr.shop->items;
+ int w = 0;
+ int new_ = 0;
+ int64 z = 0;
+ int items[MAX_INVENTORY] = { 0 };
+
+ // process entries in buy list, one by one
+ for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) {
+ struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
+
+ if (entry->addAmount <= 0)
+ return 14; // not enough item amount in inventory
+
+ const int j = entry->shopIndex;
+ if (j < 0 || j >= shop_size)
+ return 13; // no such item in shop
+ if (entry->addId != shop[j].nameid && entry->addId != itemdb_viewid(shop[j].nameid))
+ return 13; // no such item in shop
+ entry->addId = shop[j].nameid; // item_avail replacement
+ if (!itemdb->exists(entry->addId))
+ return 13; // item no longer in itemdb
+
+ if ((int)shop[j].qty != -1 && entry->addAmount > (int)shop[j].qty)
+ return 14; // not enough item amount in shop
+
+ int currencyCount = shop[j].value2;
+ for (int currencyIndex = 0; currencyIndex < currencyCount; currencyIndex ++) {
+ struct npc_barter_currency *currency = &shop[j].currency[currencyIndex];
+ const int currencyItemId = currency->nameid;
+ const int currencyRefine = currency->refine;
+ int removeAmount = currency->amount * entry->addAmount;
+ if (removeAmount <= 0)
+ continue;
+ for (int n = 0; n < sd->status.inventorySize && removeAmount > 0; ++n) {
+ // check item id and existing amount
+ if (sd->status.inventory[n].nameid == currencyItemId && sd->status.inventory[n].amount > 0) {
+ // check item refine level
+ if (currencyRefine != -1 && sd->status.inventory[n].refine != currencyRefine)
+ continue;
+ if (sd->status.inventory[n].amount >= removeAmount) {
+ items[n] += removeAmount;
+ removeAmount = 0;
+ w -= itemdb_weight(currencyItemId) * removeAmount;
+ break;
+ } else {
+ items[n] += sd->status.inventory[n].amount;
+ removeAmount -= sd->status.inventory[n].amount;
+ w -= itemdb_weight(currencyItemId) * sd->status.inventory[n].amount;
+ }
+ }
+ if (items[n] > sd->status.inventory[n].amount)
+ return 14; // not enough item amount in inventory
+ }
+ if (removeAmount != 0) {
+ return 14; // not enough item amount in inventory
+ }
+ }
+
+ entry->addId = shop[j].nameid; //item_avail replacement
+
+ npc_market_qty[i] = j;
+
+ if (!itemdb->isstackable(entry->addId) && entry->addAmount > 1) {
+ //Exploit? You can't buy more than 1 of equipment types o.O
+ ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n",
+ sd->status.name, sd->status.account_id, sd->status.char_id, entry->addAmount, entry->addId);
+ entry->addAmount = 1;
+ }
+
+ switch (pc->checkadditem(sd, entry->addId, entry->addAmount)) {
+ case ADDITEM_EXIST:
+ break;
+ case ADDITEM_NEW:
+ new_++;
+ break;
+ case ADDITEM_OVERAMOUNT: /* TODO find official response for this */
+ return 1;
+ }
+
+ z += (int64)shop[j].value * entry->addAmount;
+ w += itemdb_weight(entry->addId) * entry->addAmount;
+ }
+
+ if (z > sd->status.zeny)
+ return 3; // Not enough Zeny
+
+ if ((int64)w + sd->weight > sd->max_weight)
+ return 2; // Too heavy
+
+ if (pc->inventoryblank(sd) < new_)
+ return 3; // Not enough space to store items
+
+ for (int i = 0; i < sd->status.inventorySize; ++i) {
+ const int removeAmountTotal = items[i];
+ if (removeAmountTotal == 0)
+ continue;
+ if (pc->delitem(sd, i, removeAmountTotal, 0, DELITEM_SOLD, LOG_TYPE_NPC) != 0) {
+ return 11; // unknown exploit
+ }
+ }
+
+ pc->payzeny(sd, (int)z, LOG_TYPE_NPC, NULL);
+
+ for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) {
+ struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);
+ const int shopIdx = npc_market_qty[i];
+
+ if ((int)shop[shopIdx].qty != -1) {
+ if (entry->addAmount > (int)shop[shopIdx].qty) /* wohoo someone tampered with the packet. */
+ return 14;
+ shop[shopIdx].qty -= entry->addAmount;
+ }
+
+ npc->expanded_barter_tosql(nd, shopIdx);
+
+ if (itemdb_type(entry->addId) == IT_PETEGG) {
+ pet->create_egg(sd, entry->addId);
+ } else {
+ struct item item_tmp;
+ memset(&item_tmp, 0, sizeof(item_tmp));
+ item_tmp.nameid = entry->addId;
+ item_tmp.identify = 1;
+ pc->additem(sd, &item_tmp, entry->addAmount, LOG_TYPE_NPC);
+ }
+ }
+
+ return 12;
+}
+
/// npc_selllist for script-controlled shops
static int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd)
{
@@ -2698,8 +3032,13 @@ static int npc_unload(struct npc_data *nd, bool single)
nd->u.scr.label_list_num = 0;
}
if(nd->u.scr.shop) {
- if(nd->u.scr.shop->item)
+ if(nd->u.scr.shop->item) {
+ for (int i = 0; i < nd->u.scr.shop->items; i ++) {
+ if (nd->u.scr.shop->item[i].currency)
+ aFree(nd->u.scr.shop->item[i].currency);
+ }
aFree(nd->u.scr.shop->item);
+ }
aFree(nd->u.scr.shop);
}
}
@@ -5248,6 +5587,7 @@ static int npc_reload(void)
npc->event_do_oninit( true );
npc->market_fromsql();
npc->barter_fromsql();
+ npc->expanded_barter_fromsql();
// Execute rest of the startup events if connected to char-server. [Lance]
// Executed when connection is established with char-server in chrif_connectack
if( !intif->CheckForCharServer() ) {
@@ -5567,6 +5907,7 @@ void npc_defaults(void)
npc->trader_update = npc_trader_update;
npc->market_buylist = npc_market_buylist;
npc->barter_buylist = npc_barter_buylist;
+ npc->expanded_barter_buylist = npc_expanded_barter_buylist;
npc->trader_open = npc_trader_open;
npc->market_fromsql = npc_market_fromsql;
npc->market_tosql = npc_market_tosql;
@@ -5576,6 +5917,10 @@ void npc_defaults(void)
npc->barter_tosql = npc_barter_tosql;
npc->barter_delfromsql = npc_barter_delfromsql;
npc->barter_delfromsql_sub = npc_barter_delfromsql_sub;
+ npc->expanded_barter_fromsql = npc_expanded_barter_fromsql;
+ npc->expanded_barter_tosql = npc_expanded_barter_tosql;
+ npc->expanded_barter_delfromsql = npc_expanded_barter_delfromsql;
+ npc->expanded_barter_delfromsql_sub = npc_expanded_barter_delfromsql_sub;
npc->db_checkid = npc_db_checkid;
npc->refresh = npc_refresh;
npc->questinfo_clear = npc_questinfo_clear;
diff --git a/src/map/npc.h b/src/map/npc.h
index c5f44f0e0..392911046 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -48,6 +48,7 @@ enum npc_shop_types {
NST_MARKET, /* official npc market type */
NST_CUSTOM,
NST_BARTER, /* official npc barter type */
+ NST_EXPANDED_BARTER, /* official npc expanded barter type */
/* */
NST_MAX,
};
@@ -60,17 +61,25 @@ struct npc_label_list {
int pos;
};
+struct npc_barter_currency {
+ int nameid;
+ int refine;
+ int amount;
+};
+
struct npc_item_list {
int nameid;
unsigned int value; // price or barter currency item id
- int value2; // barter currency item amount
- unsigned int qty;
+ int value2; // barter currency item amount / expanded barter currency size
+ int qty;
+ struct npc_barter_currency *currency;
};
struct npc_shop_data {
unsigned char type;/* what am i */
struct npc_item_list *item;/* list */
unsigned int items;/* total */
+ int shop_last_index; // only for NST_EXPANDED_BARTER
};
struct npc_parse;
struct npc_data {
@@ -314,6 +323,7 @@ struct npc_interface {
void (*trader_update) (int master);
enum market_buy_result (*market_buylist) (struct map_session_data *sd, struct itemlist *item_list);
int (*barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list);
+ int (*expanded_barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list);
bool (*trader_open) (struct map_session_data *sd, struct npc_data *nd);
void (*market_fromsql) (void);
void (*market_tosql) (struct npc_data *nd, int index);
@@ -323,6 +333,10 @@ struct npc_interface {
void (*barter_tosql) (struct npc_data *nd, int index);
void (*barter_delfromsql) (struct npc_data *nd, int index);
void (*barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2);
+ void (*expanded_barter_fromsql) (void);
+ void (*expanded_barter_tosql) (struct npc_data *nd, int index);
+ void (*expanded_barter_delfromsql) (struct npc_data *nd, int index);
+ void (*expanded_barter_delfromsql_sub) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency* currency);
bool (*db_checkid) (const int id);
void (*refresh) (struct npc_data* nd);
void (*questinfo_clear) (struct npc_data *nd);
diff --git a/src/map/packets.h b/src/map/packets.h
index 90b9beeb7..1e6dc71bc 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1983,6 +1983,11 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0b4c,clif->pCashShopLimitedReq);
#endif
+#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
+ packet(0x0b57,clif->pNPCExpandedBarterPurchase);
+ packet(0x0b58,clif->pNPCExpandedBarterClosed);
+#endif
+
#if PACKETVER >= 20191224
packet(0x0b6d,clif->pCashShopOpen2);
#endif
diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h
index 1d5f96ee9..a72d9bf5f 100644
--- a/src/map/packets_keys_main.h
+++ b/src/map/packets_keys_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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, 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, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE, 2019-12-18bRagexe, 2019-12-18bRagexeRE, 2019-12-24aRagexe, 2019-12-24aRagexeRE, 2019-12-24bRagexe, 2019-12-24bRagexeRE, 2020-01-08aRagexe, 2020-01-08bRagexeRE
+// 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, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE, 2019-12-18bRagexe, 2019-12-18bRagexeRE, 2019-12-24aRagexe, 2019-12-24aRagexeRE, 2019-12-24bRagexe, 2019-12-24bRagexeRE, 2020-01-08aRagexe, 2020-01-08bRagexeRE, 2020-01-22cRagexe, 2020-01-22cRagexeRE, 2020-01-29bRagexe, 2020-01-30aRagexe, 2020-02-05aRagexe, 2020-02-05aRagexeRE, 2020-02-06aRagexe
#if PACKETVER == 20101123 || \
PACKETVER == 20101124 || \
PACKETVER == 20101125 || \
@@ -181,7 +181,12 @@
PACKETVER == 20191211 || \
PACKETVER == 20191218 || \
PACKETVER == 20191224 || \
- PACKETVER >= 20200108
+ PACKETVER == 20200108 || \
+ PACKETVER == 20200122 || \
+ PACKETVER == 20200129 || \
+ PACKETVER == 20200130 || \
+ PACKETVER == 20200205 || \
+ PACKETVER >= 20200206
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h
index d4c96beca..90d226c92 100644
--- a/src/map/packets_keys_zero.h
+++ b/src/map/packets_keys_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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, 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, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_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, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero, 2020-01-15_2aRagexe_zero, 2020-01-15aRagexe_zero, 2020-01-29_2aRagexe_zero, 2020-01-29aRagexe_zero
#if PACKETVER == 20171018 || \
PACKETVER == 20171019 || \
PACKETVER == 20171023 || \
@@ -103,7 +103,9 @@
PACKETVER == 20191127 || \
PACKETVER == 20191204 || \
PACKETVER == 20191211 || \
- PACKETVER >= 20191224
+ PACKETVER == 20191224 || \
+ PACKETVER == 20200115 || \
+ PACKETVER >= 20200129
packetKeys(0x00000000,0x00000000,0x00000000);
#endif
diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h
index 83a9107f2..2d7f1d6ec 100644
--- a/src/map/packets_shuffle_main.h
+++ b/src/map/packets_shuffle_main.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -9794,7 +9794,7 @@
packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14
#endif
-// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe, 2019-12-18bRagexe, 2019-12-24aRagexe, 2019-12-24bRagexe, 2020-01-08aRagexe
+// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe, 2019-12-18bRagexe, 2019-12-24aRagexe, 2019-12-24bRagexe, 2020-01-08aRagexe, 2020-01-22cRagexe, 2020-01-29bRagexe, 2020-01-30aRagexe, 2020-02-05aRagexe, 2020-02-06aRagexe
#if PACKETVER == 20190904 || \
PACKETVER == 20190918 || \
PACKETVER == 20190925 || \
@@ -9812,7 +9812,12 @@
PACKETVER == 20191211 || \
PACKETVER == 20191218 || \
PACKETVER == 20191224 || \
- PACKETVER == 20200108
+ PACKETVER == 20200108 || \
+ PACKETVER == 20200122 || \
+ PACKETVER == 20200129 || \
+ PACKETVER == 20200130 || \
+ PACKETVER == 20200205 || \
+ PACKETVER == 20200206
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 9c9df85ed..757cfee55 100644
--- a/src/map/packets_shuffle_re.h
+++ b/src/map/packets_shuffle_re.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -9744,7 +9744,7 @@
packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14
#endif
-// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE, 2019-12-18bRagexeRE, 2019-12-24aRagexeRE, 2019-12-24bRagexeRE, 2020-01-08bRagexeRE
+// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE, 2019-12-18bRagexeRE, 2019-12-24aRagexeRE, 2019-12-24bRagexeRE, 2020-01-08bRagexeRE, 2020-01-22cRagexeRE, 2020-02-05aRagexeRE
#if PACKETVER == 20190904 || \
PACKETVER == 20190918 || \
PACKETVER == 20190925 || \
@@ -9761,7 +9761,9 @@
PACKETVER == 20191211 || \
PACKETVER == 20191218 || \
PACKETVER == 20191224 || \
- PACKETVER == 20200108
+ PACKETVER == 20200108 || \
+ PACKETVER == 20200122 || \
+ PACKETVER == 20200205
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 91b0c1e89..602264a8f 100644
--- a/src/map/packets_shuffle_zero.h
+++ b/src/map/packets_shuffle_zero.h
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2020 Hercules Dev Team
- * Copyright (C) 2018-2020 Andrei Karas (4144)
+ * Copyright (C) 2013-2020 Hercules Dev Team
+ * Copyright (C) 2018-2020 Andrei Karas (4144)
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -803,7 +803,7 @@
packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14
#endif
-// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero
+// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero, 2020-01-15_2aRagexe_zero, 2020-01-15aRagexe_zero, 2020-01-29_2aRagexe_zero, 2020-01-29aRagexe_zero
#if PACKETVER == 20190828 || \
PACKETVER == 20190911 || \
PACKETVER == 20190918 || \
@@ -815,7 +815,9 @@
PACKETVER == 20191127 || \
PACKETVER == 20191204 || \
PACKETVER == 20191211 || \
- PACKETVER == 20191224
+ PACKETVER == 20191224 || \
+ PACKETVER == 20200115 || \
+ PACKETVER == 20200129
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 0fa602ba5..c2c99629a 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3770,7 +3770,7 @@ struct PACKET_CZ_SE_CASHSHOP_LIMITED_REQ {
DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_LIMITED_REQ, 0x0b4c);
#endif
-#if PACKETVER_ZERO_NUM >= 20191224
+#if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224
struct PACKET_ZC_SE_CASHSHOP_OPEN {
int16 packetType;
uint32 cashPoints;
@@ -3788,6 +3788,70 @@ struct PACKET_ZC_SE_CASHSHOP_OPEN {
DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845);
#endif
+#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
+struct PACKET_CZ_NPC_EXPANDED_BARTER_CLOSE {
+ int16 packetType;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_CLOSE, 0x0b58);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127
+struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
+#else
+ uint16 nameid;
+#endif
+ uint16 refine_level;
+ uint32 amount;
+ uint16 type;
+} __attribute__((packed));
+
+struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 nameid;
+#else
+ uint16 nameid;
+#endif
+ uint16 type;
+ uint32 amount;
+ uint32 weight;
+ uint32 index;
+ uint32 zeny;
+ uint32 currency_count;
+ struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 currencies[];
+} __attribute__((packed));
+
+struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN {
+ int16 packetType;
+ int16 packetLength;
+ int32 items_count;
+ struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub items[];
+} __attribute__((packed));
+
+DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_OPEN, 0x0b56);
+#endif
+
+#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828
+struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub {
+#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+ uint32 itemId;
+#else
+ uint16 itemId;
+#endif
+ uint32 shopIndex;
+ uint32 amount;
+} __attribute__((packed));
+
+struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE {
+ int16 packetType;
+ int16 packetLength;
+ struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub list[];
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_PURCHASE, 0x0b57);
+#endif
+
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
diff --git a/src/map/script.c b/src/map/script.c
index 26bd678fe..1d5919d3b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24677,6 +24677,133 @@ static BUILDIN(openshop)
return true;
}
+static bool script_sellitemcurrency_add(struct npc_data *nd, struct script_state* st, int argIndex)
+{
+ nullpo_retr(false, nd);
+ nullpo_retr(false, st);
+
+ if (!script_hasdata(st, argIndex + 1))
+ return false;
+
+ int id = script_getnum(st, argIndex);
+ struct item_data *it;
+ if (!(it = itemdb->exists(id))) {
+ ShowWarning("buildin_sellitemcurrency: unknown item id '%d'!\n", id);
+ return false;
+ }
+ int qty = 0;
+ if ((qty = script_getnum(st, argIndex + 1)) <= 0) {
+ ShowError("buildin_sellitemcurrency: invalid 'qty'!\n");
+ return false;
+ }
+ int refine_level = -1;
+ if (script_hasdata(st, argIndex + 2)) {
+ refine_level = script_getnum(st, argIndex + 2);
+ }
+ int items = nd->u.scr.shop->items;
+ if (nd->u.scr.shop == NULL || items == 0) {
+ ShowWarning("buildin_sellitemcurrency: shop not have items!\n");
+ return false;
+ }
+ if (nd->u.scr.shop->shop_last_index >= items || nd->u.scr.shop->shop_last_index < 0) {
+ ShowWarning("buildin_sellitemcurrency: wrong selected shop index!\n");
+ return false;
+ }
+
+ struct npc_item_list *item_list = &nd->u.scr.shop->item[nd->u.scr.shop->shop_last_index];
+ int index = item_list->value2;
+ if (item_list->currency == NULL) {
+ CREATE(item_list->currency, struct npc_barter_currency, 1);
+ item_list->value2 ++;
+ } else {
+ RECREATE(item_list->currency, struct npc_barter_currency, ++item_list->value2);
+ }
+ struct npc_barter_currency *currency = &item_list->currency[index];
+ currency->nameid = id;
+ currency->refine = refine_level;
+ currency->amount = qty;
+ return true;
+}
+
+/**
+ * @call sellitemcurrency <Item_ID>,qty{,refine}};
+ *
+ * adds <Item_ID> to last item in expanded barter shop
+ **/
+static BUILDIN(sellitemcurrency)
+{
+ struct npc_data *nd;
+ if ((nd = map->id2nd(st->oid)) == NULL) {
+ ShowWarning("buildin_sellitemcurrency: trying to run without a proper NPC!\n");
+ return false;
+ }
+ if (nd->u.scr.shop == NULL || nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ ShowWarning("buildin_sellitemcurrency: this command can be used only with expanded barter shops!\n");
+ return false;
+ }
+
+ script->sellitemcurrency_add(nd, st, 2);
+ return true;
+}
+
+/**
+ * @call endsellitem;
+ *
+ * complete sell item in expanded barter shop (NST_EXPANDED_BARTER)
+ **/
+static BUILDIN(endsellitem)
+{
+ struct npc_data *nd;
+ if ((nd = map->id2nd(st->oid)) == NULL) {
+ ShowWarning("buildin_endsellitem: trying to run without a proper NPC!\n");
+ return false;
+ }
+ if (nd->u.scr.shop == NULL || nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ ShowWarning("buildin_endsellitem: this command can be used only with expanded barter shops!\n");
+ return false;
+ }
+
+ int newIndex = nd->u.scr.shop->shop_last_index;
+ const struct npc_item_list *const newItem = &nd->u.scr.shop->item[newIndex];
+ int i = 0;
+ for (i = 0; i < nd->u.scr.shop->items - 1; i++) {
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid != newItem->nameid || item->value != newItem->value)
+ continue;
+ if (item->value2 != newItem->value2)
+ continue;
+ bool found = true;
+ for (int k = 0; k < item->value2; k ++) {
+ struct npc_barter_currency *currency = &item->currency[k];
+ struct npc_barter_currency *newCurrency = &newItem->currency[k];
+ if (currency->nameid != newCurrency->nameid ||
+ currency->amount != newCurrency->amount ||
+ currency->refine != newCurrency->refine) {
+ found = false;
+ break;
+ }
+ }
+ if (!found)
+ continue;
+ break;
+ }
+
+ if (i != nd->u.scr.shop->items - 1) {
+ if (nd->u.scr.shop->item[i].qty != -1) {
+ nd->u.scr.shop->item[i].qty += nd->u.scr.shop->item[newIndex].qty;
+ npc->expanded_barter_tosql(nd, i);
+ }
+ nd->u.scr.shop->shop_last_index --;
+ nd->u.scr.shop->items--;
+ if (nd->u.scr.shop->item[newIndex].currency != NULL) {
+ aFree(nd->u.scr.shop->item[newIndex].currency);
+ nd->u.scr.shop->item[newIndex].currency = NULL;
+ }
+ }
+
+ return true;
+}
+
/**
* @call sellitem <Item_ID>,{,price{,qty}};
*
@@ -24700,30 +24827,65 @@ static BUILDIN(sellitem)
return false;
}
- if (!nd->u.scr.shop) {
+ const bool have_shop = (nd->u.scr.shop != NULL);
+ if (!have_shop) {
npc->trader_update(nd->src_id ? nd->src_id : nd->bl.id);
- if (nd->u.scr.shop->type == NST_BARTER) {
- if (!script_hasdata(st, 5)) {
- ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n");
- return false;
- }
- value = script_getnum(st, 4);
- value2 = script_getnum(st, 5);
+ }
+
+ if (nd->u.scr.shop->type != NST_BARTER) {
+ value = script_hasdata(st, 3) ? script_getnum(st, 3) : it->value_buy;
+ if (value == -1)
+ value = it->value_buy;
+ }
+
+ if (nd->u.scr.shop->type == NST_BARTER) {
+ if (!script_hasdata(st, 5)) {
+ ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n");
+ return false;
}
- } else {/* no need to run this if its empty */
+ value = script_getnum(st, 4);
+ value2 = script_getnum(st, 5);
+ } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) {
+ if (!script_hasdata(st, 4)) {
+ ShowError("buildin_sellitem: invalid number of parameters for expanded barter type shop!\n");
+ return false;
+ }
+ if ((qty = script_getnum(st, 4)) <= 0 && qty != -1) {
+ ShowError("buildin_sellitem: invalid 'qty' for expanded barter type shop!\n");
+ return false;
+ }
+ }
+
+ if (have_shop) {
if (nd->u.scr.shop->type == NST_BARTER) {
- if (!script_hasdata(st, 5)) {
- ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n");
- return false;
- }
- value = script_getnum(st, 4);
- value2 = script_getnum(st, 5);
for (i = 0; i < nd->u.scr.shop->items; i++) {
const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
if (item->nameid == id && item->value == value && item->value2 == value2) {
break;
}
}
+ } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) {
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid != id || item->value != value)
+ continue;
+ if (item->value2 != (script_lastdata(st) - 4) / 3)
+ continue;
+ bool found = true;
+ for (int k = 0; k < item->value2; k ++) {
+ const int scriptOffset = k * 3 + 5;
+ struct npc_barter_currency *currency = &item->currency[k];
+ if (currency->nameid != script_getnum(st, scriptOffset) ||
+ currency->amount != script_getnum(st, scriptOffset + 1) ||
+ currency->refine != script_getnum(st, scriptOffset + 2)) {
+ found = false;
+ break;
+ }
+ }
+ if (!found)
+ continue;
+ break;
+ }
} else {
for (i = 0; i < nd->u.scr.shop->items; i++) {
if (nd->u.scr.shop->item[i].nameid == id) {
@@ -24733,12 +24895,6 @@ static BUILDIN(sellitem)
}
}
- if (nd->u.scr.shop->type != NST_BARTER) {
- value = script_hasdata(st,3) ? script_getnum(st, 3) : it->value_buy;
- if( value == -1 )
- value = it->value_buy;
- }
-
if( nd->u.scr.shop->type == NST_MARKET ) {
if( !script_hasdata(st,4) || ( qty = script_getnum(st, 4) ) <= 0 ) {
ShowError("buildin_sellitem: invalid 'qty' for market-type shop!\n");
@@ -24759,7 +24915,8 @@ static BUILDIN(sellitem)
}
}
- if (i != nd->u.scr.shop->items) {
+ bool foundInShop = (i != nd->u.scr.shop->items);
+ if (foundInShop) {
nd->u.scr.shop->item[i].value = value;
nd->u.scr.shop->item[i].qty = qty;
if (nd->u.scr.shop->type == NST_MARKET) /* has been manually updated, make it reflect on sql */
@@ -24785,8 +24942,84 @@ static BUILDIN(sellitem)
nd->u.scr.shop->item[i].value = value;
nd->u.scr.shop->item[i].value2 = value2;
nd->u.scr.shop->item[i].qty = qty;
+ nd->u.scr.shop->item[i].currency = NULL;
}
+ nd->u.scr.shop->shop_last_index = i;
+ if (!foundInShop) {
+ for (int k = 5; k <= script_lastdata(st); k += 3) {
+ script->sellitemcurrency_add(nd, st, k);
+ }
+ }
+
+ if (foundInShop) {
+ if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) { /* has been manually updated, make it reflect on sql */
+ npc->expanded_barter_tosql(nd, i);
+ }
+ }
+ return true;
+}
+
+/**
+ * @call startsellitem <Item_ID>,{,price{,qty}};
+ *
+ * Starts adding item into expanded barter shop (NST_EXPANDED_BARTER)
+ **/
+static BUILDIN(startsellitem)
+{
+ struct npc_data *nd;
+ struct item_data *it;
+ int i = 0, id = script_getnum(st,2);
+ int value2 = 0;
+ int qty = 0;
+
+ if (!(nd = map->id2nd(st->oid))) {
+ ShowWarning("buildin_startsellitem: trying to run without a proper NPC!\n");
+ return false;
+ } else if (!(it = itemdb->exists(id))) {
+ ShowWarning("buildin_startsellitem: unknown item id '%d'!\n", id);
+ return false;
+ }
+
+ const bool have_shop = (nd->u.scr.shop != NULL);
+ if (!have_shop) {
+ npc->trader_update(nd->src_id ? nd->src_id : nd->bl.id);
+ }
+
+ if (nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ ShowWarning("script_startsellitem: can works only for NST_EXPANDED_BARTER shops");
+ return false;
+ }
+
+ int value = script_hasdata(st, 3) ? script_getnum(st, 3) : it->value_buy;
+ if (value == -1)
+ value = it->value_buy;
+
+ if ((qty = script_getnum(st, 4)) <= 0 && qty != -1) {
+ ShowError("buildin_startsellitem: invalid 'qty' for expanded barter type shop!\n");
+ return false;
+ }
+
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ if (nd->u.scr.shop->item[i].nameid == 0)
+ break;
+ }
+
+ if (i == nd->u.scr.shop->items) {
+ if (nd->u.scr.shop->items == USHRT_MAX) {
+ ShowWarning("buildin_startsellitem: Can't add %s (%s/%s), shop list is full!\n", it->name, nd->exname, nd->path);
+ return false;
+ }
+ i = nd->u.scr.shop->items;
+ RECREATE(nd->u.scr.shop->item, struct npc_item_list, ++nd->u.scr.shop->items);
+ }
+
+ nd->u.scr.shop->item[i].nameid = it->nameid;
+ nd->u.scr.shop->item[i].value = value;
+ nd->u.scr.shop->item[i].value2 = value2;
+ nd->u.scr.shop->item[i].qty = qty;
+ nd->u.scr.shop->item[i].currency = NULL;
+ nd->u.scr.shop->shop_last_index = i;
return true;
}
@@ -24820,6 +25053,18 @@ static BUILDIN(stopselling)
break;
}
}
+ } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) {
+ if (!script_hasdata(st, 3)) {
+ ShowError("buildin_stopselling: called with wrong number of arguments\n");
+ return false;
+ }
+ const int price = script_getnum(st, 3);
+ for (i = 0; i < nd->u.scr.shop->items; i++) {
+ const struct npc_item_list *const item = &nd->u.scr.shop->item[i];
+ if (item->nameid == id && item->value == price) {
+ break;
+ }
+ }
} else {
for (i = 0; i < nd->u.scr.shop->items; i++) {
if (nd->u.scr.shop->item[i].nameid == id) {
@@ -24833,13 +25078,19 @@ static BUILDIN(stopselling)
if (nd->u.scr.shop->type == NST_MARKET)
npc->market_delfromsql(nd, i);
- if (nd->u.scr.shop->type == NST_BARTER)
+ else if (nd->u.scr.shop->type == NST_BARTER)
npc->barter_delfromsql(nd, i);
+ else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER)
+ npc->expanded_barter_delfromsql(nd, i);
nd->u.scr.shop->item[i].nameid = 0;
nd->u.scr.shop->item[i].value = 0;
nd->u.scr.shop->item[i].value2 = 0;
nd->u.scr.shop->item[i].qty = 0;
+ if (nd->u.scr.shop->item[i].currency != NULL) {
+ aFree(nd->u.scr.shop->item[i].currency);
+ nd->u.scr.shop->item[i].currency = NULL;
+ }
for (i = 0, cursor = 0; i < nd->u.scr.shop->items; i++) {
if (nd->u.scr.shop->item[i].nameid == 0)
@@ -24850,14 +25101,18 @@ static BUILDIN(stopselling)
nd->u.scr.shop->item[cursor].value = nd->u.scr.shop->item[i].value;
nd->u.scr.shop->item[cursor].value2 = nd->u.scr.shop->item[i].value2;
nd->u.scr.shop->item[cursor].qty = nd->u.scr.shop->item[i].qty;
+ nd->u.scr.shop->item[cursor].currency = nd->u.scr.shop->item[i].currency;
}
cursor++;
}
+ nd->u.scr.shop->items--;
+ nd->u.scr.shop->item[nd->u.scr.shop->items].currency = NULL;
script_pushint(st, 1);
- } else
+ } else {
script_pushint(st, 0);
+ }
return true;
}
@@ -24916,6 +25171,7 @@ static BUILDIN(tradertype)
}
npc->market_delfromsql(nd, INT_MAX);
npc->barter_delfromsql(nd, INT_MAX);
+ npc->expanded_barter_delfromsql(nd, INT_MAX);
}
#if PACKETVER < 20131223
@@ -24930,6 +25186,12 @@ static BUILDIN(tradertype)
script->reportsrc(st);
}
#endif
+#if PACKETVER_MAIN_NUM < 20191120 && PACKETVER_RE_NUM < 20191106 && PACKETVER_ZERO_NUM < 20191127
+ if (type == NST_EXPANDED_BARTER) {
+ ShowWarning("buildin_tradertype: NST_EXPANDED_BARTER is only available with PACKETVER_ZERO_NUM 20191127 or PACKETVER_MAIN_NUM 20191120 or PACKETVER_RE_NUM 20191106 or newer!\n");
+ script->reportsrc(st);
+ }
+#endif
if( nd->u.scr.shop )
nd->u.scr.shop->type = type;
@@ -24973,8 +25235,8 @@ static BUILDIN(shopcount)
} else if ( !nd->u.scr.shop || !nd->u.scr.shop->items ) {
ShowWarning("buildin_shopcount(%d): trying to use without any items!\n",id);
return false;
- } else if (nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) {
- ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET and non-NST_BARTER shop!\n",id);
+ } else if (nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER && nd->u.scr.shop->type != NST_EXPANDED_BARTER) {
+ ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET and non-NST_BARTER and non-NST_EXPANDED_BARTER shop!\n",id);
return false;
}
@@ -26803,7 +27065,10 @@ static void script_parse_builtin(void)
/* New Shop Support */
BUILDIN_DEF(openshop,"?"),
- BUILDIN_DEF(sellitem,"i???"),
+ BUILDIN_DEF(sellitem, "i???*"),
+ BUILDIN_DEF(sellitemcurrency, "ii?"),
+ BUILDIN_DEF(startsellitem, "iii"),
+ BUILDIN_DEF(endsellitem, ""),
BUILDIN_DEF(stopselling,"i??"),
BUILDIN_DEF(setcurrency,"i?"),
BUILDIN_DEF(tradertype,"i"),
@@ -27364,6 +27629,7 @@ static void script_hardcoded_constants(void)
script->set_constant("NST_MARKET", NST_MARKET, false, false);
script->set_constant("NST_CUSTOM", NST_CUSTOM, false, false);
script->set_constant("NST_BARTER", NST_BARTER, false, false);
+ script->set_constant("NST_EXPANDED_BARTER", NST_EXPANDED_BARTER, false, false);
script->constdb_comment("script unit data types");
script->set_constant("UDT_TYPE", UDT_TYPE, false, false);
@@ -27812,4 +28078,6 @@ void script_defaults(void)
script->run_item_rental_start_script = script_run_item_rental_start_script;
script->run_item_rental_end_script = script_run_item_rental_end_script;
script->run_item_lapineddukddak_script = script_run_item_lapineddukddak_script;
+
+ script->sellitemcurrency_add = script_sellitemcurrency_add;
}
diff --git a/src/map/script.h b/src/map/script.h
index d652f2155..00a206ce3 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -1054,6 +1054,7 @@ struct script_interface {
void (*run_item_rental_end_script) (struct map_session_data *sd, struct item_data *data, int oid);
void (*run_item_rental_start_script) (struct map_session_data *sd, struct item_data *data, int oid);
void (*run_item_lapineddukddak_script) (struct map_session_data *sd, struct item_data *data, int oid);
+ bool (*sellitemcurrency_add) (struct npc_data *nd, struct script_state* st, int argIndex);
};
#ifdef HERCULES_CORE