summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Protocol/Protocol16x.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/Protocol/Protocol16x.cpp b/source/Protocol/Protocol16x.cpp
index 23e23d463..cfa27b3c4 100644
--- a/source/Protocol/Protocol16x.cpp
+++ b/source/Protocol/Protocol16x.cpp
@@ -17,6 +17,7 @@ Implements the 1.6.x protocol classes:
#include "../ClientHandle.h"
#include "../Entities/Entity.h"
#include "../Entities/Player.h"
+#include "../UI/Window.h"
@@ -153,23 +154,23 @@ void cProtocol161::SendRespawn(void)
-void cProtocol161::SendWindowOpen(char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots)
+void cProtocol161::SendWindowOpen(const cWindow & a_Window)
{
- if (a_WindowType < 0)
+ if (a_Window.GetWindowType() < 0)
{
// Do not send for inventory windows
return;
}
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_WINDOW_OPEN);
- WriteByte (a_WindowID);
- WriteByte (a_WindowType);
- WriteString(a_WindowTitle);
- WriteByte (a_NumSlots);
+ WriteByte (a_Window.GetWindowID());
+ WriteByte (a_Window.GetWindowType());
+ WriteString(a_Window.GetWindowTitle());
+ WriteByte (a_Window.GetNumNonInventorySlots());
WriteByte (1); // Use title
- if (a_WindowType == 11) // horse / donkey
+ if (a_Window.GetWindowType() == cWindow::wtAnimalChest)
{
- WriteInt(0); // Unknown value sent only when window type is 11 (horse / donkey)
+ WriteInt(0); // TODO: The animal's EntityID
}
Flush();
}