diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-05 17:32:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-05 17:32:49 +0300 |
commit | d6c8bf2539488c986c8857263e379ee35b8b75a4 (patch) | |
tree | 03779354805ec894123ca4ba372b3973a2423f57 /src/net/eathena/buyingstorehandler.cpp | |
parent | b70f77df7ef4bd06b35511e17aa74fc3493dfcd9 (diff) | |
download | manaverse-d6c8bf2539488c986c8857263e379ee35b8b75a4.tar.gz manaverse-d6c8bf2539488c986c8857263e379ee35b8b75a4.tar.bz2 manaverse-d6c8bf2539488c986c8857263e379ee35b8b75a4.tar.xz manaverse-d6c8bf2539488c986c8857263e379ee35b8b75a4.zip |
eathena: add packet SMSG_BUYINGSTORE_OWN_ITEMS 0x0813.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 135a866b4..29d6c86c5 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -44,6 +44,7 @@ BuyingStoreHandler::BuyingStoreHandler() : { SMSG_BUYINGSTORE_OPEN, SMSG_BUYINGSTORE_CREATE_FAILED, + SMSG_BUYINGSTORE_OWN_ITEMS, 0 }; handledMessages = _messages; @@ -62,6 +63,10 @@ void BuyingStoreHandler::handleMessage(Net::MessageIn &msg) processBuyingStoreCreateFailed(msg); break; + case SMSG_BUYINGSTORE_OWN_ITEMS: + processBuyingStoreOwnItems(msg); + break; + default: break; } @@ -94,6 +99,20 @@ void BuyingStoreHandler::processBuyingStoreCreateFailed(Net::MessageIn &msg) } } +void BuyingStoreHandler::processBuyingStoreOwnItems(Net::MessageIn &msg) +{ + const int count = (msg.readInt16("len") - 12) / 9; + msg.readInt32("account id"); + msg.readInt32("money limit"); + for (int f = 0; f < count; f ++) + { + msg.readInt32("price"); + msg.readInt16("amount"); + msg.readUInt8("item type"); + msg.readInt16("item id"); + } +} + void BuyingStoreHandler::create(const std::string &name, const int maxMoney, const bool flag, |