コード例 #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);

                    if (!Map.GetItemsInRange(p, 0).OfType <StainedOoze>().Any())
                    {
                        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
ファイル: Ilhenir.cs プロジェクト: phpjunkie420/ServUO
        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 is PlayerMobile)
            {
                if (corrosive)
                {
                    ((PlayerMobile)Combatant).SendLocalizedMessage(1072071); // A corrosive gas seeps out of your enemy's skin!
                }
                else
                {
                    ((PlayerMobile)Combatant).SendLocalizedMessage(1072072); // A poisonous gas seeps out of your enemy's skin!
                }
            }
        }
コード例 #3
0
ファイル: InterredGrizzle .cs プロジェクト: nathanvy/runuo
        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!
            }
        }