當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。