summaryrefslogtreecommitdiff
path: root/src/net/eathena/buyingstorehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-11-04 20:19:53 +0300
committerAndrei Karas <akaras@inbox.ru>2016-11-04 21:16:31 +0300
commitc5a5274c86201b74325a8b84ab4543c73959c5d5 (patch)
treedfc3e7a8e584a2f42e1dcd70a8ce9837ac448549 /src/net/eathena/buyingstorehandler.cpp
parentcb6572ebd60ecc525c5a236a26eefc673841f056 (diff)
downloadmv-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.gz
mv-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.bz2
mv-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.xz
mv-c5a5274c86201b74325a8b84ab4543c73959c5d5.zip
Dont send some packets with unsupported server versions.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r--src/net/eathena/buyingstorehandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index 010a4a969..0540f8eec 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -48,6 +48,8 @@ void BuyingStoreHandler::create(const std::string &name,
const bool flag,
const std::vector<ShopItem*> &items) const
{
+ if (packetVersion < 20100303)
+ return;
createOutPacket(CMSG_BUYINGSTORE_CREATE);
outMsg.writeInt16(CAST_S16(89 + items.size() * 8), "len");
outMsg.writeInt32(maxMoney, "limit money");
@@ -74,6 +76,8 @@ void BuyingStoreHandler::open(const Being *const being) const
{
if (!being)
return;
+ if (packetVersion < 20100420)
+ return;
createOutPacket(CMSG_BUYINGSTORE_OPEN);
outMsg.writeBeingId(being->getId(), "account id");
}
@@ -83,7 +87,9 @@ void BuyingStoreHandler::sell(const Being *const being,
const Item *const item,
const int amount) const
{
- if (!being || !item || packetVersion < 20100420)
+ if (!being || !item)
+ return;
+ if (packetVersion < 20100420)
return;
createOutPacket(CMSG_BUYINGSTORE_SELL);