Ejemplo n.º 1
0
        public Mobile SpawnCaptain(MinorBarrierCrystal crystal)
        {
            try
            {
                Mobile m = Activator.CreateInstance(m_SpawnList.GetRandomCaptain()) as Mobile;
                m.OnBeforeSpawn(crystal.Location, crystal.Map);
                m.MoveToWorld(crystal.Location, crystal.Map);
                m.OnAfterSpawn();
                return m;
            }
            catch { }

            return null;
        }
Ejemplo n.º 2
0
 public ArrayList SpawnMinions(int amount, MinorBarrierCrystal crystal)
 {
     ArrayList list = new ArrayList();
     for (int i = 0; i < amount; i++)
     {
         try
         {
             Mobile m = Activator.CreateInstance(m_SpawnList.GetRandomMinion()) as Mobile;
             m.OnBeforeSpawn(crystal.Location, crystal.Map);
             m.MoveToWorld(crystal.Location, crystal.Map);
             m.OnAfterSpawn();
             list.Add(m);
         }
         catch { }
     }
     return list;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Triggers the Spawner's spawn methods for the minor barrier crystal
        /// Spawns the minor crystal's leader and a set amount of minions
        /// </summary>
        /// <param name="crystal">MinorBarrierCrystal to spawn to</param>
        public void MinorCrystalSpawn(MinorBarrierCrystal crystal)
        {
            ArrayList minions = CSpawner.SpawnMinions(1, crystal);
            if (!Leaders.ContainsKey(crystal))
                Leaders.Add(crystal, CSpawner.SpawnCaptain(crystal));
            else
                Leaders[crystal] = CSpawner.SpawnCaptain(crystal);

            m_Mobiles.AddRange(minions);
            m_Mobiles.Add(Leaders[crystal]);
        }
Ejemplo n.º 4
0
 public RelockTimer(MinorBarrierCrystal crystal)
     : base(TimeSpan.FromSeconds(10.0), TimeSpan.FromSeconds(10.0))
 {
     m_Crystal = crystal;
     Priority = TimerPriority.FiveSeconds;
 }