コード例 #1
0
ファイル: ItemsObservers.cs プロジェクト: uoinfusion/Infusion
 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;
     }
 }
コード例 #2
0
ファイル: UltimaClient.cs プロジェクト: uoinfusion/Infusion
        internal void PauseClient(PauseClientChoice pause)
        {
            PauseClientPacket packet = new PauseClientPacket(pause);

            Send(packet.RawPacket);
        }