diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/net/eathena/buyingstorerecv.cpp | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/net/eathena/buyingstorerecv.cpp')
-rw-r--r-- | src/net/eathena/buyingstorerecv.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp index 55c1624f9..bf5d2032b 100644 --- a/src/net/eathena/buyingstorerecv.cpp +++ b/src/net/eathena/buyingstorerecv.cpp @@ -94,10 +94,15 @@ void BuyingStoreRecv::processBuyingStoreOwnItems(Net::MessageIn &msg) void BuyingStoreRecv::processBuyingStoreShowBoard(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("owner id"); - const std::string shopName = msg.readString(80, "shop name"); Being *const dstBeing = actorManager->findBeing(id); if (dstBeing != nullptr) - dstBeing->setBuyBoard(shopName); + { + dstBeing->setBuyBoard(msg.readString(80, "shop name")); + } + else + { + msg.readString(80, "shop name"); + } } void BuyingStoreRecv::processBuyingStoreHideBoard(Net::MessageIn &msg) |