void cProtocol125::SendWindowOpen(const cWindow & a_Window) { if (a_Window.GetWindowType() < 0) { // Do not send for inventory windows return; } cCSLock Lock(m_CSPacket); WriteByte (PACKET_WINDOW_OPEN); WriteChar (a_Window.GetWindowID()); WriteByte ((Byte)a_Window.GetWindowType()); WriteString(a_Window.GetWindowTitle()); WriteByte ((Byte)a_Window.GetNumNonInventorySlots()); Flush(); }
void cProtocol125::SendWindowClose(const cWindow & a_Window) { if (a_Window.GetWindowType() == cWindow::wtInventory) { // Do not send inventory-window-close return; } cCSLock Lock(m_CSPacket); WriteByte(PACKET_WINDOW_CLOSE); WriteChar(a_Window.GetWindowID()); Flush(); }