| 168 | |
| 169 | |
| 170 | void cProtocol161::SendWindowOpen(const cWindow & a_Window) |
| 171 | { |
| 172 | if (a_Window.GetWindowType() < 0) |
| 173 | { |
| 174 | // Do not send for inventory windows |
| 175 | return; |
| 176 | } |
| 177 | cCSLock Lock(m_CSPacket); |
| 178 | WriteByte (PACKET_WINDOW_OPEN); |
| 179 | WriteChar (a_Window.GetWindowID()); |
| 180 | WriteByte ((Byte)a_Window.GetWindowType()); |
| 181 | WriteString(a_Window.GetWindowTitle()); |
| 182 | WriteByte ((Byte)a_Window.GetNumNonInventorySlots()); |
| 183 | WriteByte (1); // Use title |
| 184 | if (a_Window.GetWindowType() == cWindow::wtAnimalChest) |
| 185 | { |
| 186 | WriteInt(0); // TODO: The animal's EntityID |
| 187 | } |
| 188 | Flush(); |
| 189 | } |
| 190 | |
| 191 | |
| 192 |
no test coverage detected