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


C# Items.Gold类代码示例

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


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

示例1: OnDoubleClick

public override void OnDoubleClick( Mobile from )
{

if( m_Placer == null || m_Placer.Deleted )
m_Placer = from;

if( from.InRange( this.GetWorldLocation(), 10 ) )
{
if( m_Placer == null || from == m_Placer || from.AccessLevel >= AccessLevel.GameMaster )
{
Container c = m_Placer.Backpack;
Gold t = new Gold( m_Value );
if( c.TryDropItem( m_Placer, t, true ) )
{
this.Delete();
m_Placer.SendMessage( "The item disolves and gives you a refund" );
}
else
{
t.Delete();
m_Placer.SendMessage("For some reason, the refund didn't work! Please page a GM");
}
}
else
{
from.SendMessage( "Stay out of my yard!" );
}
}
else
{
from.SendMessage( "The item is too far away" );
}
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:33,代码来源:YardItem.cs

示例2: 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

示例3: OnTick

			protected override void OnTick()
			{
				if(m_PilesDone >= m_PilesMax)
				{
					Stop();
					return;
				}

				Point3D p = FindGoldLocation(m_Map, m_Location, m_PilesMax / 8);
				Gold g = new Gold(m_MinAmount, m_MaxAmount);
				g.DropToWorld(p, this.m_Map);

				switch (Utility.Random(3))
				{
					case 0: // Fire column
						Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
						Effects.PlaySound(g, g.Map, 0x208);
						break;
					case 1: // Explosion
						Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36BD, 20, 10, 5044);
						Effects.PlaySound(g, g.Map, 0x307);
						break;
					case 2: // Ball of fire
						Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36FE, 10, 10, 5052);
						break;
				}
				++m_PilesDone;
			}
开发者ID:Crome696,项目名称:ServUO,代码行数:28,代码来源:GoldShower.cs

示例4: Target

        public void Target(Gold weapon)
        {
            if (!Caster.CanSee(weapon))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }

            else if (CheckSequence())
            {
                if (Caster.BeginAction(typeof(AncientFalseCoinSpell)))
                {
                    if (this.Scroll != null)
                        Scroll.Consume();
                    FakeGold fake = new FakeGold();
                    fake.m_Amount = weapon.Amount * 5;
                    fake.Name = "" + (weapon.Amount * 5) + " Gold Coins";
                    m_Fake = fake;
                    Caster.AddToBackpack(fake);
                    Caster.PlaySound(0x2E6);

                    IEntity from = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z + 50), Caster.Map);
                    IEntity to = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z), Caster.Map);
                    Effects.SendMovingParticles(from, to, 0x1EC6, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100);
                    StopTimer(Caster);

                    Timer t = new InternalTimer(Caster, m_Fake);

                    m_Timers[Caster] = t;

                    t.Start();
                }
            }

            FinishSequence();
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:35,代码来源:FalseCoinSpell.cs

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: Deposit

        public static bool Deposit(Mobile from, int amount)
        {
            // If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
            if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
            {
                return true;
            }

            var box = from.FindBankNoCreate();

            if (box == null)
            {
                return false;
            }

            var items = new List<Item>();

            while (amount > 0)
            {
                Item item;
                if (amount < 5000)
                {
                    item = new Gold(amount);
                    amount = 0;
                }
                else if (amount <= 1000000)
                {
                    item = new BankCheck(amount);
                    amount = 0;
                }
                else
                {
                    item = new BankCheck(1000000);
                    amount -= 1000000;
                }

                if (box.TryDropItem(from, item, false))
                {
                    items.Add(item);
                }
                else
                {
                    item.Delete();
                    foreach (var curItem in items)
                    {
                        curItem.Delete();
                    }

                    return false;
                }
            }

            return true;
        }
开发者ID:runuo,项目名称:runuo,代码行数:54,代码来源:Banker.cs

示例10: 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:FreeReign,项目名称:imaginenation,代码行数:14,代码来源:TavaraSewel.cs

示例11: OnClick

		public override void OnClick()
		{
			Container c = m_From.Backpack;
			Gold t = new Gold( value );
			if( c.TryDropItem( m_From, t, true ) )
			{
				m_Stair.Delete();
				m_From.SendMessage( "The item disolves and gives you a refund" );
			}
			else
			{
				t.Delete();
				m_From.SendMessage("For some reason, the refund didn't work!  Please page a GM");
			}
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:15,代码来源:StairRefundEntry.cs

示例12: OnBeforeDeath

		public override bool OnBeforeDeath()
		{
			Gold gold = new Gold(150, 250);
			gold.Map = this.Map;
			gold.Location = this.Location;

			Scimitar weapon = new Scimitar();
			weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 1, 5 );
			weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 0, 5 );
			weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 0, 5 );
			weapon.Map = this.Map;
			weapon.Location = this.Location;

			this.Delete();
			return false;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:SpectralArmour.cs

示例13: OnGoldGiven

		public override bool OnGoldGiven( Mobile from, Gold dropped )
		{
			if ( from is PlayerMobile && dropped.Amount == 700 )
			{
				PlayerMobile pm = (PlayerMobile)from;

				if ( pm.NpcGuild == NpcGuild.ThievesGuild )
				{
					from.AddToBackpack( new DisguiseKit() );

					dropped.Delete();
					return true;
				}
			}

			return base.OnGoldGiven( from, dropped );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:17,代码来源:ThiefGuildmaster.cs

示例14: Deposit

        public static bool Deposit( Mobile from, int amount )
        {
            BankBox box = from.FindBankNoCreate();
            if ( box == null )
                return false;

            List<Item> items = new List<Item>();

            while ( amount > 0 )
            {
                Item item;
                if ( amount < 5000 )
                {
                    item = new Gold( amount );
                    amount = 0;
                }
                else if ( amount <= 1000000 )
                {
                    item = new BankCheck( amount );
                    amount = 0;
                }
                else
                {
                    item = new BankCheck( 1000000 );
                    amount -= 1000000;
                }

                if ( box.TryDropItem( from, item, false ) )
                {
                    items.Add( item );
                }
                else
                {
                    item.Delete();
                    foreach ( Item curItem in items )
                    {
                        curItem.Delete();
                    }

                    return false;
                }
            }

            return true;
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:45,代码来源:Banker.cs

示例15: 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


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