Server.Items.HouseRaffleStone.Deserialize C# (CSharp) Méthode

Deserialize() public méthode

public Deserialize ( Server.GenericReader reader ) : void
reader Server.GenericReader
Résultat void
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_Deed = reader.ReadItem<HouseRaffleDeed>();

                    goto case 0;
                }
                case 0:
                {
                    m_Active = reader.ReadBool();

                    m_Bounds = reader.ReadRect2D();
                    m_Facet = reader.ReadMap();

                    m_Winner = reader.ReadMobile();

                    m_TicketPrice = reader.ReadInt();
                    m_Started = reader.ReadDateTime();
                    m_Duration = reader.ReadTimeSpan();

                    int entryCount = reader.ReadInt();
                    m_Entries = new List<RaffleEntry>( entryCount );

                    for ( int i = 0; i < entryCount; i++ )
                    {
                        RaffleEntry entry = new RaffleEntry( reader, version );

                        if ( entry.From == null )
                            continue; // Character was deleted

                        m_Entries.Add( entry );
                    }

                    InvalidateRegion();

                    m_AllStones.Add( this );

                    break;
                }
            }
        }