示例#1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            DateTime next = reader.ReadDateTime();

            m_Area = new Rectangle3D[reader.ReadInt()];

            for (int i = 0; i < m_Area.Length; i++)
            {
                m_Area[i] = reader.ReadRect3D();
            }

            m_Region = new SimpleNoHousingRegion(Map, m_Area);
            m_Region.Register();

            if (next < DateTime.UtcNow)
            {
                m_Timer = new NoHousingDelayTimer(this, next - DateTime.UtcNow);
                m_Timer.Start();
            }
            else
            {
                Delete();
            }
        }
示例#2
0
		public NoHousingItem( BaseHouse house ) : base( 0x2FD5 )
		{
			m_Timer = new NoHousingDelayTimer( this );
			m_Timer.Start();

			m_Area = house.Region.Area;
			m_Region = new SimpleNoHousingRegion( house.Region.Map, m_Area );
			m_Region.Register();

			Visible = false;
			Movable = false;
		}
        public NoHousingItem(BaseHouse house) : base(0x2FD5)
        {
            m_Timer = new NoHousingDelayTimer(this);
            m_Timer.Start();

            m_Area   = house.Region.Area;
            m_Region = new SimpleNoHousingRegion(house.Region.Map, m_Area);
            m_Region.Register();

            Visible = false;
            Movable = false;
        }
示例#4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
			
            int version = reader.ReadInt();

            DateTime next = reader.ReadDateTime();
            this.m_Area = new Rectangle3D[reader.ReadInt()];

            for (int i = 0; i < this.m_Area.Length; i++)
                this.m_Area[i] = reader.ReadRect3D();

            this.m_Region = new SimpleNoHousingRegion(this.Map, this.m_Area);
            this.m_Region.Register();

            if (next < DateTime.Now)
            {
                this.m_Timer = new NoHousingDelayTimer(this, next - DateTime.Now);
                this.m_Timer.Start();
            }
            else
                this.Delete();		
        }