diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/net/eathena/buyingstorehandler.cpp | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index a68111dc1..baaee1aca 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -150,7 +150,7 @@ void BuyingStoreHandler::processBuyingStoreCreateFailed(Net::MessageIn &msg) void BuyingStoreHandler::processBuyingStoreOwnItems(Net::MessageIn &msg) { const int count = (msg.readInt16("len") - 12) / 9; - msg.readInt32("account id"); + msg.readBeingId("account id"); msg.readInt32("money limit"); for (int f = 0; f < count; f ++) { @@ -165,7 +165,7 @@ void BuyingStoreHandler::processBuyingStoreOwnItems(Net::MessageIn &msg) void BuyingStoreHandler::processBuyingStoreShowBoard(Net::MessageIn &msg) { - const int id = msg.readInt32("owner id"); + const BeingId id = msg.readBeingId("owner id"); const std::string shopName = msg.readString(80, "shop name"); Being *const dstBeing = actorManager->findBeing(id); if (dstBeing) @@ -174,7 +174,7 @@ void BuyingStoreHandler::processBuyingStoreShowBoard(Net::MessageIn &msg) void BuyingStoreHandler::processBuyingStoreHideBoard(Net::MessageIn &msg) { - const int id = msg.readInt32("owner id"); + const BeingId id = msg.readBeingId("owner id"); Being *const dstBeing = actorManager->findBeing(id); if (dstBeing) dstBeing->setBuyBoard(std::string()); @@ -188,7 +188,7 @@ void BuyingStoreHandler::processBuyingStoreHideBoard(Net::MessageIn &msg) void BuyingStoreHandler::processBuyingStoreItemsList(Net::MessageIn &msg) { const int count = (msg.readInt16("len") - 16) / 9; - const int id = msg.readInt32("account id"); + const BeingId id = msg.readBeingId("account id"); const int storeId = msg.readInt32("store id"); // +++ in future need use it too msg.readInt32("money limit"); @@ -321,7 +321,7 @@ void BuyingStoreHandler::open(const Being *const being) const if (!being) return; createOutPacket(CMSG_BUYINGSTORE_OPEN); - outMsg.writeInt32(being->getId(), "account id"); + outMsg.writeBeingId(being->getId(), "account id"); } void BuyingStoreHandler::sell(const Being *const being, @@ -334,7 +334,7 @@ void BuyingStoreHandler::sell(const Being *const being, createOutPacket(CMSG_BUYINGSTORE_SELL); outMsg.writeInt16(18, "len"); - outMsg.writeInt32(being->getId(), "account id"); + outMsg.writeBeingId(being->getId(), "account id"); outMsg.writeInt32(storeId, "store id"); outMsg.writeInt16(static_cast<int16_t>( item->getInvIndex() + INVENTORY_OFFSET), |