diff options
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
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"); |