From 4b53e78ab06a4a717470a76de707cbba9d0aab18 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Sep 2016 20:07:08 +0300 Subject: Add support for close only client side window without affecting server. --- src/net/ea/npcrecv.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2