private void HandlePauseClient(PauseClientPacket packet) { // Server resumes client as soons as it is finished with sending content of a container. // When container contains an item: // HandleDrawContainer -> HandlePauseClient (Pause) -> HandleAddMultipleItemsInContainer -> HandlePauseClient (Resume) // When container is empty: // HandleDrawContainer -> HandlePauseClient (Pause) -> HandlePauseClient (Resume) // The problem is with empty containers - no HandleAddMultipleItemsInContainer is invoked if (packet.Choice == PauseClientChoice.Resume && drawContainerId.HasValue) { eventJournalSource.Publish(new ContainerOpenedEvent(drawContainerId.Value)); drawContainerId = null; } }
internal void PauseClient(PauseClientChoice pause) { PauseClientPacket packet = new PauseClientPacket(pause); Send(packet.RawPacket); }