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/npcrecv.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/npcrecv.cpp')
-rw-r--r-- | src/net/eathena/npcrecv.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/eathena/npcrecv.cpp b/src/net/eathena/npcrecv.cpp index 875718768..535e57d7c 100644 --- a/src/net/eathena/npcrecv.cpp +++ b/src/net/eathena/npcrecv.cpp @@ -45,6 +45,12 @@ namespace NpcRecv void NpcRecv::processNpcCutin(Net::MessageIn &msg) { Ea::NpcRecv::mRequestLang = false; + if (cutInWindow == nullptr) + { + msg.readString(64, "image name"); + msg.readUInt8("type"); + return; + } const std::string image = msg.readString(64, "image name"); const CutInT cutin = static_cast<CutInT>(msg.readUInt8("type")); if (cutInWindow != nullptr) @@ -112,9 +118,15 @@ void NpcRecv::processNpcSkin(Net::MessageIn &msg) { const int len = msg.readInt16("len"); npcHandler->getNpc(msg, NpcAction::Other); - const std::string skin = msg.readString(len - 8, "skin"); if (Ea::NpcRecv::mDialog != nullptr) + { + const std::string skin = msg.readString(len - 8, "skin"); Ea::NpcRecv::mDialog->setSkin(skin); + } + else + { + msg.readString(len - 8, "skin"); + } } } // namespace EAthena |