Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_Town       = Town.ReadReference(reader);
                m_Corrupted  = Faction.ReadReference(reader);
                m_Corrupting = Faction.ReadReference(reader);

                m_LastMonolith = reader.ReadItem() as BaseMonolith;

                m_LastStolen        = reader.ReadDateTime();
                m_GraceStart        = reader.ReadDateTime();
                m_CorruptionStart   = reader.ReadDateTime();
                m_PurificationStart = reader.ReadDateTime();

                Update();

                Mobile mob = RootParent as Mobile;

                if (mob != null)
                {
                    mob.SolidHueOverride = OwnershipHue;
                }

                break;
            }
            }
        }
Пример #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_Faction = Faction.ReadReference(reader);
            m_Town    = Town.ReadReference(reader);
            m_Orders  = new Orders(this, reader);

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Register));
        }
Пример #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                Town = Town.ReadReference(reader);
                break;
            }
            }
        }
Пример #4
0
        public TownState(GenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 4:
            {
                m_Active = reader.ReadBool();
                goto case 3;
            }

            case 3:
            {
                m_LastIncome = reader.ReadDateTime();

                goto case 2;
            }

            case 2:
            {
                m_Tax           = reader.ReadEncodedInt();
                m_LastTaxChange = reader.ReadDateTime();

                goto case 1;
            }

            case 1:
            {
                m_Silver = reader.ReadEncodedInt();

                goto case 0;
            }

            case 0:
            {
                m_Town  = Town.ReadReference(reader);
                m_Owner = Faction.ReadReference(reader);

                m_Sheriff = reader.ReadMobile();
                m_Finance = reader.ReadMobile();

                m_Town.State = this;

                break;
            }
            }
        }
Пример #5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                Town    = Town.ReadReference(reader);
                Faction = Faction.ReadReference(reader);
                m_Sigil = reader.ReadItem() as Sigil;
                break;
            }
            }
        }
Пример #6
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_Town    = Town.ReadReference(reader);
                m_Faction = Faction.ReadReference(reader);
                Register();
                break;
            }
            }

            Frozen = true;
        }
Пример #7
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                Town    = Town.ReadReference(reader);
                Faction = Faction.ReadReference(reader);
                m_Sigil = reader.ReadItem() as Sigil;
                break;
            }
            }

            Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(CheckActive));
        }