diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-04 13:47:31 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-04 13:47:31 +0200 |
commit | 4aed49a70fe2e4fa3600b31525766c52bff52e3d (patch) | |
tree | d17c4a960f4fea8c4020c0b5b6eba1d951fe25da /source/Protocol/Protocol125.cpp | |
parent | Fixed CreateHexDump() filling the string with garbage (diff) | |
download | cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.gz cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.bz2 cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.lz cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.xz cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.zst cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.zip |
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r-- | source/Protocol/Protocol125.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index f09cf7178..8d212a4a2 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -863,11 +863,17 @@ void cProtocol125::SendWholeInventory(const cWindow & a_Window) -void cProtocol125::SendWindowClose(char a_WindowID)
+void cProtocol125::SendWindowClose(const cWindow & a_Window)
{
+ if (a_Window.GetWindowType() == cWindow::Inventory)
+ {
+ // Do not send inventory-window-close
+ return;
+ }
+
cCSLock Lock(m_CSPacket);
WriteByte(PACKET_WINDOW_CLOSE);
- WriteByte(a_WindowID);
+ WriteByte(a_Window.GetWindowID());
Flush();
}
|