summaryrefslogtreecommitdiff
path: root/src/net/eathena/buyingstorehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-05 21:37:22 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-05 21:37:22 +0300
commit037a653c92fca6e34f6f27c05efe70b8d4d95178 (patch)
tree9ba89841f7672e77a871bb2265f691f9f3910628 /src/net/eathena/buyingstorehandler.cpp
parent6998289cd1f4650ad686731c6925e05b4c9fb82a (diff)
downloadmanaplus-037a653c92fca6e34f6f27c05efe70b8d4d95178.tar.gz
manaplus-037a653c92fca6e34f6f27c05efe70b8d4d95178.tar.bz2
manaplus-037a653c92fca6e34f6f27c05efe70b8d4d95178.tar.xz
manaplus-037a653c92fca6e34f6f27c05efe70b8d4d95178.zip
eathena: add partial support for packet SMSG_BUYINGSTORE_ITEMS_LIST 0x0818
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r--src/net/eathena/buyingstorehandler.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index 44a8a7d4b..42bd41c7b 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -49,6 +49,7 @@ BuyingStoreHandler::BuyingStoreHandler() :
SMSG_BUYINGSTORE_OWN_ITEMS,
SMSG_BUYINGSTORE_SHOW_BOARD,
SMSG_BUYINGSTORE_HIDE_BOARD,
+ SMSG_BUYINGSTORE_ITEMS_LIST,
0
};
handledMessages = _messages;
@@ -79,6 +80,10 @@ void BuyingStoreHandler::handleMessage(Net::MessageIn &msg)
processBuyingStoreHideBoard(msg);
break;
+ case SMSG_BUYINGSTORE_ITEMS_LIST:
+ processBuyingStoreItemsList(msg);
+ break;
+
default:
break;
}
@@ -136,6 +141,21 @@ void BuyingStoreHandler::processBuyingStoreHideBoard(Net::MessageIn &msg)
msg.readInt32("account id");
}
+void BuyingStoreHandler::processBuyingStoreItemsList(Net::MessageIn &msg)
+{
+ const int count = (msg.readInt16("len") - 16) / 9;
+ msg.readInt32("account id");
+ msg.readInt32("store id");
+ msg.readInt32("money limit");
+ for (int f = 0; f < count; f ++)
+ {
+ msg.readInt32("price");
+ msg.readInt16("amount");
+ msg.readUInt8("item type");
+ msg.readInt16("item id");
+ }
+}
+
void BuyingStoreHandler::create(const std::string &name,
const int maxMoney,
const bool flag,