diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-06 19:59:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-06 19:59:04 +0300 |
commit | 97a8156a1252806f8789fb6d4ae333b0e4cf88f6 (patch) | |
tree | 81c686cb02a23b038318c6c131ee0162344b4ae7 /src/net/eathena/buyingstorehandler.cpp | |
parent | e5a57674e9cd7502e13218d20d7067f2fb4d96f5 (diff) | |
download | manaverse-97a8156a1252806f8789fb6d4ae333b0e4cf88f6.tar.gz manaverse-97a8156a1252806f8789fb6d4ae333b0e4cf88f6.tar.bz2 manaverse-97a8156a1252806f8789fb6d4ae333b0e4cf88f6.tar.xz manaverse-97a8156a1252806f8789fb6d4ae333b0e4cf88f6.zip |
eathena: add packet SMSG_BUYINGSTORE_SELL_FAILED 0x081a.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 3e3451db2..4ce4378bc 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -50,6 +50,7 @@ BuyingStoreHandler::BuyingStoreHandler() : SMSG_BUYINGSTORE_SHOW_BOARD, SMSG_BUYINGSTORE_HIDE_BOARD, SMSG_BUYINGSTORE_ITEMS_LIST, + SMSG_BUYINGSTORE_SELL_FAILED, 0 }; handledMessages = _messages; @@ -84,6 +85,10 @@ void BuyingStoreHandler::handleMessage(Net::MessageIn &msg) processBuyingStoreItemsList(msg); break; + case SMSG_BUYINGSTORE_SELL_FAILED: + processBuyingStoreSellFailed(msg); + break; + default: break; } @@ -156,6 +161,24 @@ void BuyingStoreHandler::processBuyingStoreItemsList(Net::MessageIn &msg) } } +void BuyingStoreHandler::processBuyingStoreSellFailed(Net::MessageIn &msg) +{ + const int16_t result = msg.readInt16("result"); + switch (result) + { + case 3: + NotifyManager::notify( + NotifyTypes::BUYING_STORE_SELL_FAILED_MONEY_LIMIT); + break; + case 4: + NotifyManager::notify(NotifyTypes::BUYING_STORE_SELL_FAILED_EMPTY); + break; + default: + NotifyManager::notify(NotifyTypes::BUYING_STORE_SELL_FAILED); + break; + } +} + void BuyingStoreHandler::create(const std::string &name, const int maxMoney, const bool flag, |