Exemplo n.º 1
0
        /// <summary>
        /// Triggers the Spawner's spawn methods for the barrier crystal
        /// Spawns the General and a set amount of minions
        /// </summary>
        public void CrystalSpawn()
        {
            ArrayList minions;
            if (CSpawner != null)
            {
                minions = CSpawner.SpawnMinions(1, this);
                General = CSpawner.SpawnGeneral(this);
            }
            else
            {
                CSpawner = new CitySpawner(this);
                minions = CSpawner.SpawnMinions(1, this);
                General = CSpawner.SpawnGeneral(this);
            }

            m_Mobiles.AddRange(minions);
            m_Mobiles.Add(General);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the settings of the specific instances of this item
        /// </summary>
        /// <param name="reader"></param>
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadEncodedInt();

            m_Charges = reader.ReadEncodedInt();
            m_Desecrated = (Desecration)reader.ReadInt();
            m_Difficulty = (Difficulty)reader.ReadInt();
            m_DischargeRate = reader.ReadEncodedInt();
            m_ControllingGuild = (Guild)reader.ReadGuild();
            m_Locked = reader.ReadBool();
            m_Mobiles = reader.ReadMobileList();
            MinorCrystals = reader.ReadItemList();
            CitySpawners = reader.ReadItemList();

            m_GuardedRegion = (GuardedRegion)Region.Find(this.Location, this.Map).GetRegion(typeof(GuardedRegion));
            m_Spawner = new CitySpawner(this);
            m_DischargeTimer = new DischargeTimer(this);
            m_RelockTimer = new RelockTimer(this);
            m_LeaderDeathTimer = new LeaderDeathTimer(this);
            Leaders = new Dictionary<MinorBarrierCrystal, Mobile>();
            CheckTimers();
        }
Exemplo n.º 3
0
        public BarrierCrystal()
            : base(0x2257)
        {
            Name = "a barrier crystal";
            Hue = 1151;
            Light = LightType.Circle150;
            Movable = false;
            Visible = false;

            m_Charges = 100;
            m_Desecrated = Desecration.Normal;
            m_DischargeRate = 10;
            m_Difficulty = Difficulty.Novice;
            m_Locked = false;
            m_Spawner = new CitySpawner(this);
            m_DischargeTimer = new DischargeTimer(this);
            m_RelockTimer = new RelockTimer(this);
            m_LeaderDeathTimer = new LeaderDeathTimer(this);
            m_Mobiles = new ArrayList();
            CitySpawners = new ArrayList();
            MinorCrystals = new ArrayList();
            Leaders = new Dictionary<MinorBarrierCrystal, Mobile>();
        }