Server.Gumps.Gump.SendTo C# (CSharp) Méthode

SendTo() public méthode

public SendTo ( Server.Network.NetState state ) : void
state Server.Network.NetState
Résultat void
        public void SendTo( NetState state )
        {
            state.AddGump( this );
            state.Send( Compile( state ) );
        }

Usage Example

Exemple #1
0
        public static void CloseAndSendGump(NetState ns, Gump g, params Type[] types)
        {
            if (ns == null)
                return;

            for (int i = 0; i < types.Length; ++i)
                ns.Send(new CloseGump(Gump.GetTypeID(types[i]), 0));

            g.SendTo(ns);
            /*ns.AddGump( g );
            Packet[] packets = new Packet[types.Length + 1];
            for ( int i = 0; i < types.Length; ++i )
            packets[i] = new CloseGump( Gump.GetTypeID( types[i] ), 0 );
            packets[types.Length] = (Packet) typeof( Gump ).InvokeMember( "Compile", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, g, null, null );
            bool compress = ns.CompressionEnabled;
            ns.CompressionEnabled = false;
            ns.Send( BindPackets( compress, packets ) );
            ns.CompressionEnabled = compress;*/
        }
All Usage Examples Of Server.Gumps.Gump::SendTo