Exemplo n.º 1
0
        private void Deserialize(IGenericReader reader, int version)
        {
            Poster       = reader.ReadEntity <Mobile>();
            Subject      = reader.ReadString();
            Time         = reader.ReadDateTime();
            LastPostTime = reader.ReadDateTime();
            reader.ReadBool(); // Has thread
            Thread     = reader.ReadEntity <BulletinMessage>();
            PostedName = reader.ReadString();
            PostedBody = reader.ReadInt();
            PostedHue  = reader.ReadInt();

            PostedEquip = new BulletinEquip[reader.ReadInt()];

            for (var i = 0; i < PostedEquip.Length; ++i)
            {
                PostedEquip[i]._itemID = reader.ReadInt();
                PostedEquip[i]._hue    = reader.ReadInt();
            }

            Lines = new string[reader.ReadInt()];

            for (var i = 0; i < Lines.Length; ++i)
            {
                Lines[i] = reader.ReadString();
            }

            // Moved validation/cleanup to the BB itself
        }
Exemplo n.º 2
0
        public PlayerState(IGenericReader reader, Faction faction, List <PlayerState> owner)
        {
            Faction = faction;
            Owner   = owner;

            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                IsActive      = reader.ReadBool();
                LastHonorTime = reader.ReadDateTime();
                goto case 0;
            }

            case 0:
            {
                Mobile = reader.ReadMobile();

                m_KillPoints    = reader.ReadEncodedInt();
                m_MerchantTitle = (MerchantTitle)reader.ReadEncodedInt();

                Leaving = reader.ReadDateTime();

                break;
            }
            }

            Attach();
        }
Exemplo n.º 3
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.ReadInt();

            switch (version)
            {
            case 1:
            case 0:
            {
                Poster       = reader.ReadMobile();
                Subject      = reader.ReadString();
                Time         = reader.ReadDateTime();
                LastPostTime = reader.ReadDateTime();
                var hasThread = reader.ReadBool();
                Thread     = reader.ReadItem() as BulletinMessage;
                PostedName = reader.ReadString();
                PostedBody = reader.ReadInt();
                PostedHue  = reader.ReadInt();

                PostedEquip = new BulletinEquip[reader.ReadInt()];

                for (var i = 0; i < PostedEquip.Length; ++i)
                {
                    PostedEquip[i].itemID = reader.ReadInt();
                    PostedEquip[i].hue    = reader.ReadInt();
                }

                Lines = new string[reader.ReadInt()];

                for (var i = 0; i < Lines.Length; ++i)
                {
                    Lines[i] = reader.ReadString();
                }

                if (hasThread && Thread == null)
                {
                    Delete();
                }

                if (version == 0)
                {
                    ValidationQueue <BulletinMessage> .Add(this);
                }

                break;
            }
            }
        }
Exemplo n.º 4
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
                CartType = (MiningCartType)reader.ReadInt();
                goto case 0;

            case 0:
                IsRewardItem = reader.ReadBool();
                Gems         = reader.ReadInt();
                Ore          = reader.ReadInt();

                var next = reader.ReadDateTime();

                if (next < Core.Now)
                {
                    next = Core.Now;
                }

                m_Timer = Timer.DelayCall(next - Core.Now, TimeSpan.FromDays(1), GiveResources);
                break;
            }
        }
Exemplo n.º 5
0
        public Election(IGenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 0:
            {
                Faction = Faction.ReadReference(reader);

                LastStateTime = reader.ReadDateTime();
                CurrentState  = (ElectionState)reader.ReadEncodedInt();

                Candidates = new List <Candidate>();

                int count = reader.ReadEncodedInt();

                for (int i = 0; i < count; ++i)
                {
                    Candidate cd = new Candidate(reader);

                    if (cd.Mobile != null)
                    {
                        Candidates.Add(cd);
                    }
                }

                break;
            }
            }

            StartTimer();
        }
Exemplo n.º 6
0
        public void Deserialize(IGenericReader reader)
        {
            int version = reader.ReadInt();

            Progress    = reader.ReadInt();
            CompletedOn = reader.ReadDateTime();
        }
Exemplo n.º 7
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                m_NextMountAbility = reader.ReadDateTime();
                goto case 0;
            }

            case 0:
            {
                m_Rider        = reader.ReadEntity <Mobile>();
                m_InternalItem = reader.ReadEntity <Item>();

                if (m_InternalItem == null)
                {
                    Delete();
                }

                break;
            }
            }
        }
Exemplo n.º 8
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);
            var version = reader.ReadInt();

            LifeSpan     = reader.ReadTimeSpan();
            CreationTime = reader.ReadDateTime();

            Timer.StartTimer(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry, out _timerToken);
        }
Exemplo n.º 9
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            LifeSpan     = reader.ReadTimeSpan();
            CreationTime = reader.ReadDateTime();

            m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry);
        }
Exemplo n.º 10
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            if (version > 0)
            {
                m_MilkedOn = reader.ReadDateTime();
                m_Milk     = reader.ReadInt();
            }
        }
Exemplo n.º 11
0
            public override void Deserialize(IGenericReader reader)
            {
                base.Deserialize(reader);

                var version = reader.ReadInt();

                From        = reader.ReadMobile();
                m_End       = reader.ReadDateTime();
                m_MinDamage = reader.ReadInt();
                m_MaxDamage = reader.ReadInt();

                m_Timer = new InternalTimer(this, m_End);
                m_Timer.Start();
            }
        public PlayerBBMessage(IGenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 0:
            {
                m_Time    = reader.ReadDateTime();
                m_Poster  = reader.ReadEntity <Mobile>();
                m_Message = reader.ReadString();
                break;
            }
            }
        }
Exemplo n.º 13
0
        public PlayerBBMessage(IGenericReader reader)
        {
            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 0:
            {
                Time    = reader.ReadDateTime();
                Poster  = reader.ReadMobile();
                Message = reader.ReadString();
                break;
            }
            }
        }
Exemplo n.º 14
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_Start          = reader.ReadDateTime();
                m_HatchDuration  = reader.ReadDouble();
                m_AllowEvolution = reader.ReadBool();
                break;
            }
            }
        }
Exemplo n.º 15
0
        public FactionItem(IGenericReader reader, Faction faction)
        {
            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 0:
            {
                Item       = reader.ReadEntity <Item>();
                Expiration = reader.ReadDateTime();
                break;
            }
            }

            Faction = faction;
        }
Exemplo n.º 16
0
        public RaffleEntry(IGenericReader reader, int version)
        {
            switch (version)
            {
            case 3:     // HouseRaffleStone version changes
            case 2:
            case 1:
            case 0:
            {
                From    = reader.ReadEntity <Mobile>();
                Address = Utility.Intern(reader.ReadIPAddress());
                Date    = reader.ReadDateTime();

                break;
            }
            }
        }
Exemplo n.º 17
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.ReadInt();

            Faction         = Faction.ReadReference(reader);
            Placer          = reader.ReadEntity <Mobile>();
            TimeOfPlacement = reader.ReadDateTime();

            if (Visible)
            {
                BeginConceal();
            }

            CheckDecay();
        }
Exemplo n.º 18
0
        public PlantSystem(PlantItem plant, IGenericReader reader)
        {
            Plant = plant;

            int version = reader.ReadInt();

            FertileDirt = reader.ReadBool();

            if (version >= 1)
            {
                NextGrowth = reader.ReadDateTime();
            }
            else
            {
                NextGrowth = reader.ReadDeltaTime();
            }

            GrowthIndicator = (PlantGrowthIndicator)reader.ReadInt();

            m_Water = reader.ReadInt();

            m_Hits           = reader.ReadInt();
            m_Infestation    = reader.ReadInt();
            m_Fungus         = reader.ReadInt();
            m_Poison         = reader.ReadInt();
            m_Disease        = reader.ReadInt();
            m_PoisonPotion   = reader.ReadInt();
            m_CurePotion     = reader.ReadInt();
            m_HealPotion     = reader.ReadInt();
            m_StrengthPotion = reader.ReadInt();

            Pollinated       = reader.ReadBool();
            m_SeedType       = (PlantType)reader.ReadInt();
            m_SeedHue        = (PlantHue)reader.ReadInt();
            m_AvailableSeeds = reader.ReadInt();
            m_LeftSeeds      = reader.ReadInt();

            m_AvailableResources = reader.ReadInt();
            m_LeftResources      = reader.ReadInt();

            if (version < 2 && PlantHueInfo.IsCrossable(m_SeedHue))
            {
                m_SeedHue |= PlantHue.Reproduces;
            }
        }
Exemplo n.º 19
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_TimeoutDelay = reader.ReadTimeSpan();
            m_Teleporting  = new Dictionary <Mobile, Timer>();

            int count = reader.ReadInt();

            for (int i = 0; i < count; ++i)
            {
                Mobile   m   = reader.ReadEntity <Mobile>();
                DateTime end = reader.ReadDateTime();

                StartTimer(m, end - DateTime.Now);
            }
        }
Exemplo n.º 20
0
        private void Deserialize(IGenericReader reader, int version)
        {
            switch (version)
            {
            case 3:
            case 2:
            case 1:
            {
                var next = reader.ReadDateTime();

                if (next < Core.Now)
                {
                    next = Core.Now;
                }

                _evaluateTimer = Timer.DelayCall(next - Core.Now, EvaluationInterval, Evaluate);

                goto case 0;
            }

            case 0:
            {
                _liveCreatures = reader.ReadInt();
                _vacationLeft  = reader.ReadInt();

                _food = new AquariumState(this);
                _food.Deserialize(reader);
                _water = new AquariumState(this);
                _water.Deserialize(reader);

                _events = new List <int>();
                var count = reader.ReadInt();
                for (var i = 0; i < count; i++)
                {
                    _events.Add(reader.ReadInt());
                }

                _rewardAvailable = reader.ReadBool();
                break;
            }
            }
        }
Exemplo n.º 21
0
        public void Deserialize(IGenericReader reader)
        {
            var version = reader.ReadInt();

            InvasionTown     = (InvasionTowns)reader.ReadInt();
            TownMonsterType  = (TownMonsterType)reader.ReadInt();
            TownChampionType = (TownChampionType)reader.ReadInt();
            StartTime        = reader.ReadDateTime();
            Spawned          = reader.ReadEntityList <Mobile>();
            Active           = reader.ReadBool();

            if (Spawned == null)
            {
                Spawned = new List <Mobile>();
            }

            if (Active)
            {
                InitTimer();
            }
        }
Exemplo n.º 22
0
        public WarDeclaration(IGenericReader reader)
        {
            var version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                Kills    = reader.ReadInt();
                MaxKills = reader.ReadInt();

                WarLength    = reader.ReadTimeSpan();
                WarBeginning = reader.ReadDateTime();

                Guild    = reader.ReadGuild() as Guild;
                Opponent = reader.ReadGuild() as Guild;

                WarRequester = reader.ReadBool();

                break;
            }
            }
        }
Exemplo n.º 23
0
        public override void Deserialize(IGenericReader reader)
        {
            int version = reader.ReadInt();

            switch (version)
            {
            case 5:
            case 4:
            {
                m_AllyDeclarations = reader.ReadEntityList <Guild>();
                m_AllyInvitations  = reader.ReadEntityList <Guild>();

                goto case 3;
            }

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

                goto case 2;
            }

            case 2:
            {
                m_Type = (GuildType)reader.ReadInt();

                goto case 1;
            }

            case 1:
            {
                m_LastFealty = reader.ReadDateTime();

                goto case 0;
            }

            case 0:
            {
                m_Leader = reader.ReadEntity <Mobile>();

                if (m_Leader is PlayerMobile)
                {
                    ((PlayerMobile)m_Leader).GuildRank = RankDefinition.Leader;
                }

                m_Name         = reader.ReadString();
                m_Abbreviation = reader.ReadString();

                m_Allies          = reader.ReadEntityList <Guild>();
                m_Enemies         = reader.ReadEntityList <Guild>();
                m_WarDeclarations = reader.ReadEntityList <Guild>();
                m_WarInvitations  = reader.ReadEntityList <Guild>();

                m_Members = reader.ReadEntityList <Mobile>();
                ;
                m_Candidates = reader.ReadEntityList <Mobile>();
                ;
                m_Accepted = reader.ReadEntityList <Mobile>();
                ;

                m_Guildstone = reader.ReadEntity <Item>();
                m_Teleporter = reader.ReadEntity <Item>();

                m_Charter = reader.ReadString();
                m_Website = reader.ReadString();

                break;
            }
            }

            if (m_AllyDeclarations == null)
            {
                m_AllyDeclarations = new List <Guild>();
            }

            if (m_AllyInvitations == null)
            {
                m_AllyInvitations = new List <Guild>();
            }

            Timer.DelayCall(TimeSpan.Zero, VerifyGuild_Callback);
        }
Exemplo n.º 24
0
        public override void Deserialize(IGenericReader reader)
        {
            int version = reader.ReadInt();

            switch (version)
            {
            case 5:
            {
                int count = reader.ReadInt();

                PendingWars = new List <WarDeclaration>();
                for (int i = 0; i < count; i++)
                {
                    PendingWars.Add(new WarDeclaration(reader));
                }

                count        = reader.ReadInt();
                AcceptedWars = new List <WarDeclaration>();
                for (int i = 0; i < count; i++)
                {
                    AcceptedWars.Add(new WarDeclaration(reader));
                }

                bool isAllianceLeader = reader.ReadBool();

                if (isAllianceLeader)
                {
                    m_AllianceInfo = new AllianceInfo(reader);
                }
                else
                {
                    m_AllianceLeader = reader.ReadGuild() as Guild;
                }

                goto case 4;
            }

            case 4:
            {
                AllyDeclarations = reader.ReadStrongGuildList <Guild>();
                AllyInvitations  = reader.ReadStrongGuildList <Guild>();

                goto case 3;
            }

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

                goto case 2;
            }

            case 2:
            {
                m_Type = (GuildType)reader.ReadInt();

                goto case 1;
            }

            case 1:
            {
                LastFealty = reader.ReadDateTime();

                goto case 0;
            }

            case 0:
            {
                m_Leader = reader.ReadMobile();

                if (m_Leader is PlayerMobile mobile)
                {
                    mobile.GuildRank = RankDefinition.Leader;
                }

                m_Name         = reader.ReadString();
                m_Abbreviation = reader.ReadString();

                Allies          = reader.ReadStrongGuildList <Guild>();
                Enemies         = reader.ReadStrongGuildList <Guild>();
                WarDeclarations = reader.ReadStrongGuildList <Guild>();
                WarInvitations  = reader.ReadStrongGuildList <Guild>();

                Members    = reader.ReadStrongMobileList();
                Candidates = reader.ReadStrongMobileList();
                Accepted   = reader.ReadStrongMobileList();

                Guildstone = reader.ReadItem();
                Teleporter = reader.ReadItem();

                Charter = reader.ReadString();
                Website = reader.ReadString();

                break;
            }
            }

            AllyDeclarations ??= new List <Guild>();
            AllyInvitations ??= new List <Guild>();
            AcceptedWars ??= new List <WarDeclaration>();
            PendingWars ??= new List <WarDeclaration>();

            Timer.DelayCall(TimeSpan.Zero, VerifyGuild_Callback);
        }
Exemplo n.º 25
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 4:
            {
                ICraftable.Deserialize(reader, this);

                m_Resource = (CraftResource)reader.ReadEncodedInt();

                goto case 3;
            }

            case 3:
            {
                m_ReplenishesCharges = reader.ReadBool();

                if (m_ReplenishesCharges)
                {
                    m_LastReplenished = reader.ReadDateTime();
                }

                goto case 2;
            }

            case 2:
            {
                m_Slayer  = (SlayerName)reader.ReadEncodedInt();
                m_Slayer2 = (SlayerName)reader.ReadEncodedInt();

                UsesRemaining = reader.ReadEncodedInt();

                m_WellSound  = reader.ReadEncodedInt();
                m_BadlySound = reader.ReadEncodedInt();

                break;
            }

            case 1:
            {
                m_Slayer = (SlayerName)reader.ReadEncodedInt();

                UsesRemaining = reader.ReadEncodedInt();

                m_WellSound  = reader.ReadEncodedInt();
                m_BadlySound = reader.ReadEncodedInt();

                break;
            }

            case 0:
            {
                m_WellSound   = reader.ReadInt();
                m_BadlySound  = reader.ReadInt();
                UsesRemaining = Utility.RandomMinMax(InitMinUses, InitMaxUses);

                break;
            }
            }

            CheckReplenishUses();
        }
Exemplo n.º 26
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 2:
            case 1:
            {
                m_NextPayTime = reader.ReadDeltaTime();
                House         = reader.ReadEntity <BaseHouse>();

                goto case 0;
            }

            case 0:
            {
                m_Owner       = reader.ReadEntity <Mobile>();
                m_BankAccount = reader.ReadInt();
                m_HoldGold    = reader.ReadInt();

                m_SellItems = new Hashtable();

                int count = reader.ReadInt();
                for (int i = 0; i < count; i++)
                {
                    Item item = reader.ReadEntity <Item>();

                    int price = reader.ReadInt();
                    if (price > 100000000)
                    {
                        price = 100000000;
                    }

                    string description = reader.ReadString();

                    DateTime created = version < 1 ? DateTime.Now : reader.ReadDateTime();

                    if (item != null)
                    {
                        SetVendorItem(item, version < 1 && price <= 0 ? -1 : price, description, created);
                    }
                }

                break;
            }
            }

            Timer.DelayCall(TimeSpan.Zero, FixDresswear);

            m_NextPayTime = DateTime.Now + PayTimer.GetInterval();

            if (version < 2 && RawStr == 75 && RawDex == 75 && RawInt == 75)
            {
                InitStats(100, 100, 25);
            }

            TimeSpan delay = m_NextPayTime - DateTime.Now;

            m_PayTimer = new PayTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
            m_PayTimer.Start();

            Blessed = false;
        }
Exemplo n.º 27
0
        private void Deserialize(IGenericReader reader, int version)
        {
            if (version != 2)
            {
                // Due to a bug where we were not versioning at all, reset so we don't have an issue deserializing
                reader.Seek(0, SeekOrigin.Begin);
            }

            _username          = reader.ReadString();
            _passwordAlgorithm = version < 2 ? (PasswordProtectionAlgorithm)reader.ReadInt() : reader.ReadEnum <PasswordProtectionAlgorithm>();
            _password          = reader.ReadString();
            _accessLevel       = version < 2 ? (AccessLevel)reader.ReadInt() : reader.ReadEnum <AccessLevel>();
            _flags             = reader.ReadInt();
            Created            = reader.ReadDateTime();
            _lastLogin         = reader.ReadDateTime();

            _totalGold = reader.ReadInt();
            _totalPlat = reader.ReadInt();

            var length = reader.ReadInt();

            _rawMobiles = new Mobile[length];
            for (int i = 0; i < length; i++)
            {
                _rawMobiles[i] = reader.ReadEntity <Mobile>();
            }

            length    = reader.ReadInt();
            _comments = length > 0 ? new List <AccountComment>(length) : null;
            for (int i = 0; i < length; i++)
            {
                _comments !.Add(new AccountComment(reader));
            }

            length = reader.ReadInt();
            _tags  = length > 0 ? new List <AccountTag>(length) : null;
            for (int i = 0; i < length; i++)
            {
                _tags !.Add(new AccountTag(reader));
            }

            length    = reader.ReadInt();
            _loginIPs = new IPAddress[length];
            for (int i = 0; i < length; i++)
            {
                if (version < 2)
                {
                    if (IPAddress.TryParse(reader.ReadString(), out var address))
                    {
                        _loginIPs[i] = Utility.Intern(address);
                    }
                }
                else
                {
                    _loginIPs[i] = reader.ReadIPAddress();
                }
            }

            length          = reader.ReadInt();
            _ipRestrictions = new string[length];
            for (int i = 0; i < length; i++)
            {
                _ipRestrictions[i] = reader.ReadString();
            }

            _totalGameTime = reader.ReadTimeSpan();

            if (version > 1)
            {
                _email = reader.ReadString();
            }

            Timer.StartTimer(AfterDeserialization);
        }
Exemplo n.º 28
0
        public FactionState(IGenericReader reader)
        {
            var version = reader.ReadEncodedInt();

            switch (version)
            {
            case 5:
            {
                LastAtrophy = reader.ReadDateTime();
                goto case 4;
            }

            case 4:
            {
                var count = reader.ReadEncodedInt();

                for (var i = 0; i < count; ++i)
                {
                    var time = reader.ReadDateTime();

                    if (i < m_LastBroadcasts.Length)
                    {
                        m_LastBroadcasts[i] = time;
                    }
                }

                goto case 3;
            }

            case 3:
            case 2:
            case 1:
            {
                Election = new Election(reader);

                goto case 0;
            }

            case 0:
            {
                m_Faction = Faction.ReadReference(reader);

                m_Commander = reader.ReadEntity <Mobile>();

                if (version < 5)
                {
                    LastAtrophy = Core.Now;
                }

                if (version < 4)
                {
                    var time = reader.ReadDateTime();

                    if (m_LastBroadcasts.Length > 0)
                    {
                        m_LastBroadcasts[0] = time;
                    }
                }

                Tithe  = reader.ReadEncodedInt();
                Silver = reader.ReadEncodedInt();

                var memberCount = reader.ReadEncodedInt();

                Members = new List <PlayerState>();

                for (var i = 0; i < memberCount; ++i)
                {
                    var pl = new PlayerState(reader, m_Faction, Members);

                    if (pl.Mobile != null)
                    {
                        Members.Add(pl);
                    }
                }

                m_Faction.State = this;

                m_Faction.ZeroRankOffset = Members.Count;
                Members.Sort();

                for (var i = Members.Count - 1; i >= 0; i--)
                {
                    var player = Members[i];

                    if (player.KillPoints <= 0)
                    {
                        m_Faction.ZeroRankOffset = i;
                    }
                    else
                    {
                        player.RankIndex = i;
                    }
                }

                FactionItems = new List <FactionItem>();

                if (version >= 2)
                {
                    var factionItemCount = reader.ReadEncodedInt();

                    for (var i = 0; i < factionItemCount; ++i)
                    {
                        var factionItem = new FactionItem(reader, m_Faction);

                        Timer.StartTimer(factionItem.CheckAttach);         // sandbox attachment
                    }
                }

                Traps = new List <BaseFactionTrap>();

                if (version >= 3)
                {
                    var factionTrapCount = reader.ReadEncodedInt();

                    for (var i = 0; i < factionTrapCount; ++i)
                    {
                        if (reader.ReadEntity <Item>() is BaseFactionTrap trap && !trap.CheckDecay())
                        {
                            Traps.Add(trap);
                        }
                    }
                }

                break;
            }
            }

            if (version < 1)
            {
                Election = new Election(m_Faction);
            }
        }
Exemplo n.º 29
0
 /// <summary>
 ///     Deserializes an AccountComment instance.
 /// </summary>
 /// <param name="node">The deserialization reader</param>
 public AccountComment(IGenericReader reader)
 {
     AddedBy      = reader.ReadString();
     LastModified = reader.ReadDateTime();
     m_Content    = reader.ReadString();
 }