From 4cb9439d01c50141ce14e24180b50e20d17895d6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 6 Feb 2015 22:57:38 +0300 Subject: eathena: add packet SMSG_BUYINGSTORE_SELLER_SELL_FAILED 0x0824. --- src/net/eathena/buyingstorehandler.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/net/eathena/buyingstorehandler.cpp') diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 68fe18f2a..e7730c1ca 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -53,6 +53,7 @@ BuyingStoreHandler::BuyingStoreHandler() : SMSG_BUYINGSTORE_SELL_FAILED, SMSG_BUYINGSTORE_REPORT, SMSG_BUYINGSTORE_DELETE_ITEM, + SMSG_BUYINGSTORE_SELLER_SELL_FAILED, 0 }; handledMessages = _messages; @@ -99,6 +100,10 @@ void BuyingStoreHandler::handleMessage(Net::MessageIn &msg) processBuyingStoreDeleteItem(msg); break; + case SMSG_BUYINGSTORE_SELLER_SELL_FAILED: + processBuyingStoreSellerSellFailed(msg); + break; + default: break; } @@ -189,6 +194,30 @@ void BuyingStoreHandler::processBuyingStoreSellFailed(Net::MessageIn &msg) } } +void BuyingStoreHandler::processBuyingStoreSellerSellFailed(Net::MessageIn &msg) +{ + const int16_t result = msg.readInt16("result"); + msg.readInt16("item id"); + switch (result) + { + case 5: + NotifyManager::notify( + NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED_DEAL); + break; + case 6: + NotifyManager::notify( + NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED_AMOUNT); + break; + case 7: + NotifyManager::notify( + NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED_BALANCE); + break; + default: + NotifyManager::notify(NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED); + break; + } +} + void BuyingStoreHandler::processBuyingStoreReport(Net::MessageIn &msg) { msg.readInt16("item id"); -- cgit v1.2.3-60-g2f50