当前位置: 首页>>代码示例>>C#>>正文


C# Gold.MoveToWorld方法代码示例

本文整理汇总了C#中Server.Items.Gold.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Gold.MoveToWorld方法的具体用法?C# Gold.MoveToWorld怎么用?C# Gold.MoveToWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Items.Gold的用法示例。


在下文中一共展示了Gold.MoveToWorld方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Carve

        public void Carve( Mobile from, Item item )
        {
            Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
            Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

            if ( breakChance > Utility.RandomDouble() )
            {
                from.SendMessage( "You destroy the skull." );

                if( Utility.RandomDouble() < 0.1 )
                {
                    Gold gold = new Gold( 750, 1000 );
                    gold.MoveToWorld( GetWorldLocation(), Map );
                }

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage( "You damage the skull." );
                breakChance += Utility.RandomDouble() * 0.15 + 0.15;
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:PlaguedSkull.cs

示例2: Carve

		public void Carve( Mobile from, Item item )
		{
			Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
			Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

			if ( 0.3 > Utility.RandomDouble() )
			{
				if ( ItemID == 0xF7E )
					from.SendMessage( "You destroy the bone." );
				else
					from.SendMessage( "You destroy the bone pile." );

				Gold gold = new Gold( 25, 100 );

				gold.MoveToWorld( GetWorldLocation(), Map );

				Delete();

				m_Timer.Stop();
			}
			else
			{
				if ( ItemID == 0xF7E )
					from.SendMessage( "You damage the bone." );
				else
					from.SendMessage( "You damage the bone pile." );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:28,代码来源:UnholyBone.cs

示例3: OnBeforeDeath

		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
			gold.MoveToWorld( Location, Map );

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:8,代码来源:MorgBergen.cs

示例4: OnBeforeDeath

		public override bool OnBeforeDeath()
		{
			if ( !base.OnBeforeDeath() )
				return false;

			Gold gold = new Gold( Utility.RandomMinMax( 240, 375 ) );
			gold.MoveToWorld( Location, Map );

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:11,代码来源:SpectralArmour.cs

示例5: OnBeforeDeath

		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
			gold.MoveToWorld( Location, Map );

			if ( Utility.Random( 3 ) == 0 )
			{
				BaseBook journal = Loot.RandomTavarasJournal();
				journal.MoveToWorld( Location, Map );
			}

			Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
			return true;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:14,代码来源:TavaraSewel.cs

示例6: OnBeforeDeath

        public override bool OnBeforeDeath()
        {
            if (Utility.RandomDouble() < 0.05)
            {
                if (!base.OnBeforeDeath())
                    return false;

                //VileTentacles VT = new VileTentacles();
                //VT.MoveToWorld(Location, Map);
            }

            if (!base.OnBeforeDeath())
                return false;

            var gold = new Gold(Utility.RandomMinMax(1767, 1800));
            gold.MoveToWorld(Location, Map);

            Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
            return true;
        }
开发者ID:rokann,项目名称:JustUO,代码行数:20,代码来源:MaddeningHorror.cs

示例7: OnDoubleClick

		public void OnDoubleClick( Mobile from, Item item )
		{
			Effects.PlaySound( GetWorldLocation(), Map, 0x25B );
			Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );

			if ( 0.3 > Utility.RandomDouble() )
			{

				from.SendMessage( "You destroy the egg sac." );

				Gold gold = new Gold( 25, 100 );

				gold.MoveToWorld( GetWorldLocation(), Map );

				Delete();

				m_Timer.Stop();
			}
			else
			{
					from.SendMessage( "You damage the egg sac." );
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:23,代码来源:RecluseSpiderEggSac.cs

示例8: Carve

        public void Carve(Mobile from, Item item)
        {
            Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
            Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);

            //Change to 50/50 chance you can disarm the egg.
            if (0.5 > Utility.RandomDouble())
            {

                from.SendMessage("You destroy the BonBon egg.");

                Gold gold = new Gold(25, 100);

                gold.MoveToWorld(GetWorldLocation(), Map);

                Delete();

                m_Timer.Stop();
            }
            else
            {
                from.SendMessage("You fail to break the BonBon egg.");
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:24,代码来源:BonBonEgg.cs

示例9: CheckAtDestination

        public virtual bool CheckAtDestination()
        {
            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( IsAtDest() )
            {
                Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( GetGoldAmount() );

                if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                BeginDelete();

                Misc.Titles.AlterNotoriety( escorter, 1, NotoCap.Honorable );
                return true;
            }

            return false;
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:35,代码来源:BaseEscortable.cs

示例10: OnTick

            protected override void OnTick()
            {
                if (cycles == 15)
                {
                    new MovingEffectInfo(new Point3D(corpse.X, corpse.Y, 100), corpse, corpse.Map, 3823, 0, 10,
                        EffectRender.Lighten)
                        .MovingImpact(
                            e =>
                            {
                                int amount = Utility.RandomMinMax(200, 400);

                                if (amount <= 0)
                                {
                                    return;
                                }

                                var g = new Gold(amount);
                                g.MoveToWorld(e.Target.Location, e.Map);

                                new EffectInfo(e.Target, e.Map, 14202, 51, 10, 40, EffectRender.Lighten).Send();
                                Effects.PlaySound(e.Target, e.Map, g.GetDropSound());
                            });
                    Stop();
                    return;
                }
                if (count == 9)
                {
                    count = 1;
                    cycles++;
                }
                corpse.Hue = Utility.RandomBrightHue();
                corpse.Direction = (Direction) count;
                count++;
            }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:34,代码来源:WheelofCorptune.cs

示例11: OnDoubleClick

        //public void OnAttack(Mobile from)
        public override void OnDoubleClick(Mobile from)
        //public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
        {
            if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendLocalizedMessage(500446); // That is too far away. 
            }
            else
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10); //smoke or dust
                Effects.PlaySound(Location, Map, 0x11C);

                switch (Utility.Random(10))  //picks one of the following
                {
                    case 0:
                        Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10); //Posion Player
                        from.PlaySound(0x231);
                        from.ApplyPoison(from, Poison.Regular);
                        break;
                    case 1:
                        Effects.SendLocationEffect(from, from.Map, 0x3709, 30);//Burn Player
                        from.PlaySound(0x54);
                        AOS.Damage(from, from, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
                        break;
                    case 2:
                        new BarrelLid().MoveToWorld(Location, Map);
                        break;
                    case 3:
                        new BarrelHoops().MoveToWorld(Location, Map);
                        break;
                    case 4:
                        new BarrelStaves().MoveToWorld(Location, Map);
                        break;
                    case 5:
                        Gold g = new Gold(Utility.Random(500)); //Random amount of gold 0 - 500
                        g.MoveToWorld(Location, Map);
                        break;
                    case 6:
                        new CurePotion().MoveToWorld(Location, Map);
                        break;
                    case 7:
                        new GreaterCurePotion().MoveToWorld(Location, Map);
                        break;
                    case 8:
                        new HealPotion().MoveToWorld(Location, Map);
                        break;
                    case 9:
                        new GreaterHealPotion().MoveToWorld(Location, Map);
                        break;
                }
                Destroy();
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:54,代码来源:DungeonBarrel.cs

示例12: CheckAtDestination

        public virtual bool CheckAtDestination()
        {
            EDI dest = GetDestination();

            if ( dest == null )
                return false;

            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( dest.Contains( Location ) )
            {
                Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( 500, 1000 );

                if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                m_EscortTable.Remove( escorter );
                BeginDelete();

                Misc.Titles.AwardFame( escorter, 10, true );

                bool gainedPath = false;

                PlayerMobile pm = escorter as PlayerMobile;

                if ( pm != null )
                {
                    if ( pm.CompassionGains > 0 && DateTime.Now > pm.NextCompassionDay )
                    {
                        pm.NextCompassionDay = DateTime.MinValue;
                        pm.CompassionGains = 0;
                    }

                    if ( pm.CompassionGains >= 5 ) // have already gained 5 points in one day, can gain no more
                    {
                        pm.SendLocalizedMessage( 1053004 ); // You must wait about a day before you can gain in compassion again.
                    }
                    else if ( VirtueHelper.Award( pm, VirtueName.Compassion, 1, ref gainedPath ) )
                    {
                        if ( gainedPath )
                            pm.SendLocalizedMessage( 1053005 ); // You have achieved a path in compassion!
                        else
                            pm.SendLocalizedMessage( 1053002 ); // You have gained in compassion.

                        pm.NextCompassionDay = DateTime.Now + TimeSpan.FromDays( 1.0 ); // in one day CompassionGains gets reset to 0
                        ++pm.CompassionGains;
                    }
                    else
                    {
                        pm.SendLocalizedMessage( 1053003 ); // You have achieved the highest path of compassion and can no longer gain any further.
                    }
                }

                return true;
            }

            return false;
        }
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:74,代码来源:BaseEscortable.cs

示例13: OnBeforeDeath

        public override bool OnBeforeDeath()
        {
            Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
            Gold g = new Gold( 900, 1000 );
            g.MoveToWorld( new Point3D( X, Y, Z ), Map );

            return true;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:8,代码来源:CursedAxe.cs

示例14: OnDeath

        public override void OnDeath( Container c )
        {
            base.OnDeath( c );

            if( m_Parent != null && !m_Parent.Deleted ) {
                m_Parent.Destroy( );
            }
            Item Gold = new Gold( 100, 200 );
            Gold.MoveToWorld( new Point3D( c.X + Utility.RandomMinMax( -1, 1 ), c.Y + Utility.RandomMinMax( -1, 1 ), c.Z ), c.Map );

            if( this.Corpse != null && !this.Corpse.Deleted ) {
                ((Corpse)this.Corpse).Delete();
            }
        }
开发者ID:zerodowned,项目名称:My-Stuff,代码行数:14,代码来源:LivingStatue_BaseDes.cs

示例15: CheckAtDestination

        public virtual bool CheckAtDestination()
        {
            EDI dest = GetDestination();

            if ( dest == null )
                return false;

            Mobile escorter = GetEscorter();

            if ( escorter == null )
                return false;

            if ( dest.Contains( Location ) )
            {
                Say( true, String.Format("We have arrived! I thank thee, {0} I have no further need of thy services. Here is thy pay.", escorter.Name ) ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

                // not going anywhere
                m_Destination = null;
                m_DestinationString = null;

                Container cont = escorter.Backpack;

                if ( cont == null )
                    cont = escorter.BankBox;

                Gold gold = new Gold( 500, 750 );

                if ( !cont.TryDropItem( escorter, gold, false ) )
                    gold.MoveToWorld( escorter.Location, escorter.Map );

                StopFollow();
                SetControlMaster( null );
                m_EscortTable.Remove( escorter );
                BeginDelete();

                Misc.Titles.AwardKarma( escorter, 10, true );

                return true;
            }

            return false;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:42,代码来源:BaseEscortable.cs


注:本文中的Server.Items.Gold.MoveToWorld方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。