summaryrefslogtreecommitdiff
path: root/src/net/eathena/buyingstorehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-06 19:59:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-06 19:59:04 +0300
commit97a8156a1252806f8789fb6d4ae333b0e4cf88f6 (patch)
tree81c686cb02a23b038318c6c131ee0162344b4ae7 /src/net/eathena/buyingstorehandler.cpp
parente5a57674e9cd7502e13218d20d7067f2fb4d96f5 (diff)
downloadmanaverse-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.cpp23
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,