summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-12 21:04:32 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 21:04:32 +0300
commit74bdd9957e405979ca34828caa91cec55f4a932d (patch)
treedee82979a5bcc38f2686c5275feaf5bd78a82ec9
parent8b8efe383c502456a36d0f0faf5a2079b816243d (diff)
downloadmv-74bdd9957e405979ca34828caa91cec55f4a932d.tar.gz
mv-74bdd9957e405979ca34828caa91cec55f4a932d.tar.bz2
mv-74bdd9957e405979ca34828caa91cec55f4a932d.tar.xz
mv-74bdd9957e405979ca34828caa91cec55f4a932d.zip
Fix version to bank packets.
-rw-r--r--src/net/eathena/bankhandler.cpp11
-rw-r--r--src/net/eathena/packetsout.inc21
2 files changed, 26 insertions, 6 deletions
diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp
index 542215848..f40f7ef9f 100644
--- a/src/net/eathena/bankhandler.cpp
+++ b/src/net/eathena/bankhandler.cpp
@@ -26,6 +26,7 @@
#include "debug.h"
extern Net::BankHandler *bankHandler;
+extern int packetVersion;
namespace EAthena
{
@@ -37,6 +38,8 @@ BankHandler::BankHandler()
void BankHandler::deposit(const int money) const
{
+ if (packetVersion < 20130724)
+ return;
createOutPacket(CMSG_BANK_DEPOSIT);
outMsg.writeInt32(0, "account id");
outMsg.writeInt32(money, "money");
@@ -44,6 +47,8 @@ void BankHandler::deposit(const int money) const
void BankHandler::withdraw(const int money) const
{
+ if (packetVersion < 20130724)
+ return;
createOutPacket(CMSG_BANK_WITHDRAW);
outMsg.writeInt32(0, "account id");
outMsg.writeInt32(money, "money");
@@ -51,18 +56,24 @@ void BankHandler::withdraw(const int money) const
void BankHandler::check() const
{
+ if (packetVersion < 20130724)
+ return;
createOutPacket(CMSG_BANK_CHECK);
outMsg.writeInt32(0, "account id");
}
void BankHandler::open() const
{
+ if (packetVersion < 20130724)
+ return;
createOutPacket(CMSG_BANK_OPEN);
outMsg.writeInt32(0, "unused");
}
void BankHandler::close() const
{
+ if (packetVersion < 20130724)
+ return;
createOutPacket(CMSG_BANK_CLOSE);
outMsg.writeInt32(0, "unused");
}
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index acb1ae227..fd44935c9 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -233,12 +233,6 @@ packet(CMSG_MAIL_SEND, 0x0248, -1, clif->pMail_send);
packet(CMSG_FAMILY_ASK_FOR_CHILD, 0x01f9, 6, clif->pAdopt_request);
packet(CMSG_FAMILY_ASK_FOR_CHILD_REPLY, 0x01f7, 14, clif->pAdopt_reply);
-packet(CMSG_BANK_DEPOSIT, 0x09a7, 10, clif->pBankDeposit);
-packet(CMSG_BANK_WITHDRAW, 0x09a9, 10, clif->pBankWithdraw);
-packet(CMSG_BANK_CHECK, 0x09ab, 6, clif->pBankCheck);
-packet(CMSG_BANK_OPEN, 0x09b6, 6, clif->pBankOpen);
-packet(CMSG_BANK_CLOSE, 0x09b8, 6, clif->pBankClose);
-
packet(CMSG_FRIENDS_ADD_PLAYER, 0x0202, 26, clif->pFriendsListAdd);
packet(CMSG_FRIENDS_REQUEST_ACK, 0x0208, 14, clif->pFriendsListReply);
packet(CMSG_FRIENDS_DELETE_PLAYER, 0x0203, 10, clif->pFriendsListRemove);
@@ -292,6 +286,11 @@ packet(CMSG_SHORTCUTS_ROW_SHIFT, 0x0000, 0, nullptr);
packet(CMSG_NPC_SHOP_CLOSE, 0x0000, 0, nullptr);
packet(CMSG_NPC_MARKET_BUY, 0x0000, 0, nullptr);
packet(CMSG_NPC_MARKET_CLOSE, 0x0000, 0, nullptr);
+packet(CMSG_BANK_DEPOSIT, 0x0000, 0, nullptr);
+packet(CMSG_BANK_WITHDRAW, 0x0000, 0, nullptr);
+packet(CMSG_BANK_CHECK, 0x0000, 0, nullptr);
+packet(CMSG_BANK_OPEN, 0x0000, 0, nullptr);
+packet(CMSG_BANK_CLOSE, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -924,6 +923,16 @@ if (packetVersion >= 20130703)
packet(CMSG_PLAYER_INVENTORY_DROP, 0x0362, 6, clif->pDropItem);
}
+// 20130724
+if (packetVersion >= 20130724)
+{
+ packet(CMSG_BANK_DEPOSIT, 0x09a7, 10, clif->pBankDeposit);
+ packet(CMSG_BANK_WITHDRAW, 0x09a9, 10, clif->pBankWithdraw);
+ packet(CMSG_BANK_CHECK, 0x09ab, 6, clif->pBankCheck);
+ packet(CMSG_BANK_OPEN, 0x09b6, 6, clif->pBankOpen);
+ packet(CMSG_BANK_CLOSE, 0x09b8, 6, clif->pBankClose);
+}
+
// 20130807
if (packetVersion >= 20130807)
{