summaryrefslogtreecommitdiff
path: root/src/net/eathena/buyingstorehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-06 22:57:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-06 22:57:38 +0300
commit4cb9439d01c50141ce14e24180b50e20d17895d6 (patch)
tree03aea812492e94cb12dc50b1dd2f564905e1bf6b /src/net/eathena/buyingstorehandler.cpp
parent77f95ae5238aad4dbbdc88772929ca78fbfe0577 (diff)
downloadmanaplus-4cb9439d01c50141ce14e24180b50e20d17895d6.tar.gz
manaplus-4cb9439d01c50141ce14e24180b50e20d17895d6.tar.bz2
manaplus-4cb9439d01c50141ce14e24180b50e20d17895d6.tar.xz
manaplus-4cb9439d01c50141ce14e24180b50e20d17895d6.zip
eathena: add packet SMSG_BUYINGSTORE_SELLER_SELL_FAILED 0x0824.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r--src/net/eathena/buyingstorehandler.cpp29
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");