Ejemplo n.º 1
0
        public static void ReadCloseWindow(Client client, PacketReader reader)
        {
            CloseWindowPacket cw = new CloseWindowPacket();
            cw.Read(reader);

            if(!reader.Failed)
                Client.HandlePacketCloseWindow(client, cw);
        }
Ejemplo n.º 2
0
 private void OnCloseWindow(CloseWindowPacket p)
 {
     if (CloseWindow != null) CloseWindow.Invoke(this, new PacketEventArgs<CloseWindowPacket>(p));
 }
Ejemplo n.º 3
0
 public static void HandlePacketCloseWindow(Client client, CloseWindowPacket packet)
 {
     if (client.Owner.CurrentInterface != null)
     {
         client.Owner.CurrentInterface.Close(false);
     }
     else if (client.Owner.Inventory != null && packet.WindowId == client.Owner.Inventory.Handle)
     {
         client.Owner.Inventory.Close(false);
     }
     client.Owner.CurrentInterface = null;
 }