示例#1
0
        public virtual void DropOoze()
        {
            int  amount    = Utility.RandomMinMax(1, 3);
            bool corrosive = Utility.RandomBool();

            for (int i = 0; i < amount; i++)
            {
                Item    ooze = new StainedOoze(corrosive);
                Point3D p    = new Point3D(Location);

                for (int j = 0; j < 5; j++)
                {
                    p = GetSpawnPosition(2);
                    bool found = false;

                    foreach (Item item in Map.GetItemsInRange(p, 0))
                    {
                        if (item is StainedOoze)
                        {
                            found = true;
                            break;
                        }
                    }

                    if (!found)
                    {
                        break;
                    }
                }

                ooze.MoveToWorld(p, Map);
            }

            if (Combatant != null)
            {
                if (corrosive)
                {
                    Combatant.SendLocalizedMessage(1072071); // A corrosive gas seeps out of your enemy's skin!
                }
                else
                {
                    Combatant.SendLocalizedMessage(1072072); // A poisonous gas seeps out of your enemy's skin!
                }
            }
        }
示例#2
0
        public virtual void DropOoze()
        {
            var amount    = Utility.RandomMinMax(1, 3);
            var corrosive = Utility.RandomBool();

            for (var i = 0; i < amount; i++)
            {
                Item ooze = new StainedOoze(corrosive);
                var  p    = new Point3D(Location);

                for (var j = 0; j < 5; j++)
                {
                    p = GetSpawnPosition(2);

                    var eable = Map.GetItemsInRange <StainedOoze>(p, 0);
                    using var enumerator = eable.GetEnumerator();
                    bool atLocation = enumerator.MoveNext();
                    eable.Free();
                    if (!atLocation)
                    {
                        break;
                    }
                }

                ooze.MoveToWorld(p, Map);
            }

            if (Combatant != null)
            {
                if (corrosive)
                {
                    Combatant.SendLocalizedMessage(1072071); // A corrosive gas seeps out of your enemy's skin!
                }
                else
                {
                    Combatant.SendLocalizedMessage(1072072); // A poisonous gas seeps out of your enemy's skin!
                }
            }
        }
		public virtual void DropOoze()
		{
			int amount = Utility.RandomMinMax( 1, 3 );
			bool corrosive = Utility.RandomBool();

			for( int i = 0; i < amount; i++ )
			{
				Item ooze = new StainedOoze( corrosive );
				Point3D p = new Point3D( Location );

				for( int j = 0; j < 5; j++ )
				{
					p = GetSpawnPosition( 2 );
					bool found = false;

					foreach( Item item in Map.GetItemsInRange( p, 0 ) )
						if( item is StainedOoze )
						{
							found = true;
							break;
						}

					if( !found )
						break;
				}

				ooze.MoveToWorld( p, Map );
			}

			if( Combatant != null )
			{
				if( corrosive )
					Combatant.SendLocalizedMessage( 1072071 ); // A corrosive gas seeps out of your enemy's skin!
				else
					Combatant.SendLocalizedMessage( 1072072 ); // A poisonous gas seeps out of your enemy's skin!
			}
		}