diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-01-26 01:31:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-01-26 01:31:04 +0300 |
commit | 364d79286b557ef65a26885e8c6dff9d0f176d30 (patch) | |
tree | eeb027fb1af58b14e09b12eb3aa3dd212dfb312a | |
parent | 02e860e7924d8a2fbccbf5e017625194c9744487 (diff) | |
download | manaverse-364d79286b557ef65a26885e8c6dff9d0f176d30.tar.gz manaverse-364d79286b557ef65a26885e8c6dff9d0f176d30.tar.bz2 manaverse-364d79286b557ef65a26885e8c6dff9d0f176d30.tar.xz manaverse-364d79286b557ef65a26885e8c6dff9d0f176d30.zip |
Add packet SMSG_NPC_BARTER_OPEN 0x0b0e
-rw-r--r-- | src/net/eathena/barterrecv.cpp | 15 | ||||
-rw-r--r-- | src/net/eathena/barterrecv.h | 2 | ||||
-rw-r--r-- | src/net/eathena/network.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 18 |
4 files changed, 36 insertions, 0 deletions
diff --git a/src/net/eathena/barterrecv.cpp b/src/net/eathena/barterrecv.cpp index b1b46f528..254bf9d85 100644 --- a/src/net/eathena/barterrecv.cpp +++ b/src/net/eathena/barterrecv.cpp @@ -37,4 +37,19 @@ namespace BarterRecv } // namespace BarterRecv +void BarterRecv::processOpenShop(Net::MessageIn &msg) +{ + const int count = (msg.readInt16("len") - 4) / (itemIdLen * 2 + 17); + for (int f = 0; f < count; f ++) + { + msg.readItemId("item id"); + msg.readUInt8("item type"); + msg.readInt32("amount"); + msg.readItemId("currency item id"); + msg.readInt32("currency amount"); + msg.readInt32("weight"); + msg.readInt32("shop index"); + } +} + } // namespace EAthena diff --git a/src/net/eathena/barterrecv.h b/src/net/eathena/barterrecv.h index 0de70be5f..34e5f4023 100644 --- a/src/net/eathena/barterrecv.h +++ b/src/net/eathena/barterrecv.h @@ -33,6 +33,8 @@ namespace EAthena namespace BarterRecv { extern BuyDialog *mBuyDialog; + + void processOpenShop(Net::MessageIn &msg); } // namespace BarterRecv } // namespace EAthena diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index daabdd129..4686190ff 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -45,6 +45,7 @@ #include "net/eathena/auctionrecv.h" #include "net/eathena/attendancerecv.h" #include "net/eathena/bankrecv.h" +#include "net/eathena/barterrecv.h" #include "net/eathena/battlegroundrecv.h" #include "net/eathena/beingrecv.h" #include "net/eathena/buyingstorerecv.h" diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 275f29c10..938049fa6 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1557,6 +1557,24 @@ if (packetVersionRe >= 20181219) packet(SMSG_INVENTORY_EXPANSION_RESULT, 0x0b17, 3, &InventoryRecv::processInventoryExpansionResult, 20181212); } +// 20181226 zero +if (packetVersionZero >= 20181226) +{ + packet(SMSG_NPC_BARTER_OPEN, 0x0b0e, -1, &BarterRecv::processOpenShop, 20181226); +} + +// 20190116 main +if (packetVersionMain >= 20190116) +{ + packet(SMSG_NPC_BARTER_OPEN, 0x0b0e, -1, &BarterRecv::processOpenShop, 20190116); +} + +// 20190116 re +if (packetVersionRe >= 20190116) +{ + packet(SMSG_NPC_BARTER_OPEN, 0x0b0e, -1, &BarterRecv::processOpenShop, 20190116); +} + // 0 // evol always packets packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); |