summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-06 22:13:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-06 22:13:01 +0300
commit77f95ae5238aad4dbbdc88772929ca78fbfe0577 (patch)
treed15c235af2071b3efcd6558488e77be7846c1836 /src/net/eathena
parent23a6cfe6fd8af082d2bb296f3a5efae9d1f834c9 (diff)
downloadmv-77f95ae5238aad4dbbdc88772929ca78fbfe0577.tar.gz
mv-77f95ae5238aad4dbbdc88772929ca78fbfe0577.tar.bz2
mv-77f95ae5238aad4dbbdc88772929ca78fbfe0577.tar.xz
mv-77f95ae5238aad4dbbdc88772929ca78fbfe0577.zip
eathena: add partial support for packet SMSG_BUYINGSTORE_DELETE_ITEM 0x081c.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/buyingstorehandler.cpp12
-rw-r--r--src/net/eathena/buyingstorehandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 16 insertions, 1 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index 2356f6546..68fe18f2a 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -52,6 +52,7 @@ BuyingStoreHandler::BuyingStoreHandler() :
SMSG_BUYINGSTORE_ITEMS_LIST,
SMSG_BUYINGSTORE_SELL_FAILED,
SMSG_BUYINGSTORE_REPORT,
+ SMSG_BUYINGSTORE_DELETE_ITEM,
0
};
handledMessages = _messages;
@@ -94,6 +95,10 @@ void BuyingStoreHandler::handleMessage(Net::MessageIn &msg)
processBuyingStoreReport(msg);
break;
+ case SMSG_BUYINGSTORE_DELETE_ITEM:
+ processBuyingStoreDeleteItem(msg);
+ break;
+
default:
break;
}
@@ -191,6 +196,13 @@ void BuyingStoreHandler::processBuyingStoreReport(Net::MessageIn &msg)
msg.readInt32("money limit");
}
+void BuyingStoreHandler::processBuyingStoreDeleteItem(Net::MessageIn &msg)
+{
+ msg.readInt16("item index");
+ msg.readInt16("amount");
+ msg.readInt32("price");
+}
+
void BuyingStoreHandler::create(const std::string &name,
const int maxMoney,
const bool flag,
diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h
index 7dc516736..f66b097e8 100644
--- a/src/net/eathena/buyingstorehandler.h
+++ b/src/net/eathena/buyingstorehandler.h
@@ -68,6 +68,8 @@ class BuyingStoreHandler final : public MessageHandler,
static void processBuyingStoreSellFailed(Net::MessageIn &msg);
static void processBuyingStoreReport(Net::MessageIn &msg);
+
+ static void processBuyingStoreDeleteItem(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index b4b80d279..ab33a3241 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -216,7 +216,7 @@ int16_t packet_lengths[] =
//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// #0x0800
-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 20,
- 3, 0, 8, -1, 86, -1, 0, 0, -1, 0, 4, 10, 0, 22, 8, 0,
+ 3, 0, 8, -1, 86, -1, 0, 0, -1, 0, 4, 10, 10, 22, 8, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 26, 0,
// #0x0840
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 399b034cb..6a5860d0e 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -175,6 +175,7 @@
#define SMSG_BUYINGSTORE_ITEMS_LIST 0x0818
#define SMSG_BUYINGSTORE_SELL_FAILED 0x081a
#define SMSG_BUYINGSTORE_REPORT 0x081b
+#define SMSG_BUYINGSTORE_DELETE_ITEM 0x081c
// Receiving a request to trade
#define SMSG_TRADE_REQUEST 0x01f4