diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-04 20:07:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-04 20:07:08 +0300 |
commit | 4b53e78ab06a4a717470a76de707cbba9d0aab18 (patch) | |
tree | 694936774d7f5237f0b7a18f3806a4c46d283765 /src | |
parent | 423385491fbfc0df9b01f6e7cb7af0d995154a6a (diff) | |
download | mv-4b53e78ab06a4a717470a76de707cbba9d0aab18.tar.gz mv-4b53e78ab06a4a717470a76de707cbba9d0aab18.tar.bz2 mv-4b53e78ab06a4a717470a76de707cbba9d0aab18.tar.xz mv-4b53e78ab06a4a717470a76de707cbba9d0aab18.zip |
Add support for close only client side window without affecting server.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/npcrecv.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net/ea/npcrecv.cpp b/src/net/ea/npcrecv.cpp index ad3a6da10..047d9ca50 100644 --- a/src/net/ea/npcrecv.cpp +++ b/src/net/ea/npcrecv.cpp @@ -211,6 +211,20 @@ void NpcRecv::processNpcCommand(Net::MessageIn &msg) mDialog->itemCraftRequest(invSize); break; } + case 14: + { + const NpcDialogs::iterator it = NpcDialog::mNpcDialogs.find(npcId); + if (it != NpcDialog::mNpcDialogs.end()) + { + NpcDialog *const dialog = (*it).second; + if (dialog) + dialog->close(); + if (dialog == Ea::NpcRecv::mDialog) + Ea::NpcRecv::mDialog = nullptr; + NpcDialog::mNpcDialogs.erase(it); + } + break; + } default: UNIMPLIMENTEDPACKETFIELD(cmd); break; |