Example #1
0
        public void SpawnSpectralArmour(Mobile m)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            SpectralArmour spawned = new SpectralArmour();

            spawned.Team = this.Team;

            bool    validLocation = false;
            Point3D loc           = this.Location;

            for (int j = 0; !validLocation && j < 10; ++j)
            {
                int x = X + Utility.Random(3) - 1;
                int y = Y + Utility.Random(3) - 1;
                int z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                {
                    loc = new Point3D(x, y, Z);
                }
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                {
                    loc = new Point3D(x, y, z);
                }
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;
        }
Example #2
0
        public void SpawnSpectralArmour(Mobile m)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            SpectralArmour spawned = new SpectralArmour();

            spawned.Team = this.Team;

            bool    validLocation = false;
            Point3D loc           = this.Location;

            for (int j = 0; !validLocation && j < 10; ++j)
            {
                int x = X + Utility.Random(3) - 1;
                int y = Y + Utility.Random(3) - 1;
                int z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                {
                    loc = new Point3D(x, y, Z);
                }
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                {
                    loc = new Point3D(x, y, z);
                }
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;

            IPooledEnumerable eable = GetMobilesInRange(20);

            foreach (Mobile anim in eable)
            {
                if (anim is SpectralArmour && (anim is BaseCreature))
                {
                    ((BaseCreature)anim).SummonMaster = this;
                }
            }

            eable.Free();
        }
Example #3
0
        public void SpawnSpectralArmour(Mobile m)
        {
            var map = Map;

            if (map == null)
            {
                return;
            }

            var spawned = new SpectralArmour();

            spawned.Team = Team;

            var validLocation = false;
            var loc           = Location;

            for (var j = 0; !validLocation && j < 10; ++j)
            {
                var x = X + Utility.Random(3) - 1;
                var y = Y + Utility.Random(3) - 1;
                var z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, Z, 16, false, false))
                {
                    loc = new Point3D(x, y, Z);
                }
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                {
                    loc = new Point3D(x, y, z);
                }
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;

            foreach (var anim in GetMobilesInRange(20))
            {
                if (anim is SpectralArmour && (anim is BaseCreature))
                {
                    ((BaseCreature)anim).SummonMaster = this;
                }
            }
        }
Example #4
0
        public void SpawnSpectralArmour(Mobile m)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            SpectralArmour spawned = new SpectralArmour();

            spawned.Team         = this.Team;
            spawned.SummonMaster = this;

            bool    validLocation = false;
            Point3D loc           = this.Location;

            for (int j = 0; !validLocation && j < 10; ++j)
            {
                int x = X + Utility.Random(3) - 1;
                int y = Y + Utility.Random(3) - 1;
                int z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                {
                    loc = new Point3D(x, y, Z);
                }
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                {
                    loc = new Point3D(x, y, z);
                }
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m; spawned.SummonMaster = this;

            m_NextSpawn = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(30, 60));

            Helpers.Add(spawned);
        }
Example #5
0
		public void SpawnSpectralArmour( Mobile m )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			SpectralArmour spawned = new SpectralArmour();

			spawned.Team = this.Team;

			bool validLocation = false;
			Point3D loc = this.Location;

			for ( int j = 0; !validLocation && j < 10; ++j )
			{
				int x = X + Utility.Random( 3 ) - 1;
				int y = Y + Utility.Random( 3 ) - 1;
				int z = map.GetAverageZ( x, y );

				if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
					loc = new Point3D( x, y, Z );
				else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
					loc = new Point3D( x, y, z );
			}

			spawned.MoveToWorld( loc, map );
			spawned.Combatant = m;
  
                        foreach ( Mobile anim in this.GetMobilesInRange( 20 ) )
		        {
			   if ( anim is SpectralArmour && (anim is BaseCreature) )
			   {
                              ((BaseCreature)anim).SummonMaster = this;
			   }	
	                }	 
		}
		public void SpawnSpectralArmour( Mobile m )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			SpectralArmour spawned = new SpectralArmour();

			spawned.Team = this.Team;

			bool validLocation = false;
			Point3D loc = this.Location;

			for ( int j = 0; !validLocation && j < 10; ++j )
			{
				int x = X + Utility.Random( 3 ) - 1;
				int y = Y + Utility.Random( 3 ) - 1;
				int z = map.GetAverageZ( x, y );

				if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
					loc = new Point3D( x, y, Z );
				else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
					loc = new Point3D( x, y, z );
			}

			spawned.MoveToWorld( loc, map );
			spawned.Combatant = m;
		}
Example #7
0
        public void SpawnSpectralArmour(Mobile m)
        {
            var map = Map;

            if (map == null)
                return;

            var spawned = new SpectralArmour();

            spawned.Team = Team;

            var validLocation = false;
            var loc = Location;

            for (var j = 0; !validLocation && j < 10; ++j)
            {
                var x = X + Utility.Random(3) - 1;
                var y = Y + Utility.Random(3) - 1;
                var z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, Z, 16, false, false))
                    loc = new Point3D(x, y, Z);
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                    loc = new Point3D(x, y, z);
            }

            spawned.MoveToWorld(loc, map);
            spawned.Combatant = m;

            foreach (var anim in GetMobilesInRange(20))
            {
                if (anim is SpectralArmour && (anim is BaseCreature))
                {
                    ((BaseCreature) anim).SummonMaster = this;
                }
            }
        }