Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
        internal void PauseClient(PauseClientChoice pause)
        {
            PauseClientPacket packet = new PauseClientPacket(pause);

            Send(packet.RawPacket);
        }