Server.Network.PacketHandlers.AsciiPromptResponse C# (CSharp) Méthode

AsciiPromptResponse() public static méthode

public static AsciiPromptResponse ( Server.Network.NetState state, PacketReader pvSrc ) : void
state Server.Network.NetState
pvSrc PacketReader
Résultat void
        public static void AsciiPromptResponse( NetState state, PacketReader pvSrc )
        {
            int serial = pvSrc.ReadInt32();
            int prompt = pvSrc.ReadInt32();
            int type = pvSrc.ReadInt32();
            string text = pvSrc.ReadStringSafe();

            if ( text.Length > 128 )
                return;

            Mobile from = state.Mobile;
            Prompt p = from.Prompt;

            if ( p != null && p.Serial == serial && p.Serial == prompt )
            {
                from.Prompt = null;

                if ( type == 0 )
                    p.OnCancel( from );
                else
                    p.OnResponse( from, text );
            }
        }
PacketHandlers