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


C# PlayerMobile.FixedParticles方法代码示例

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


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

示例1: BonusAction

        public virtual void BonusAction( PlayerMobile player, Mobile attacker )
        {
            Unicorn c = new Unicorn();
            c.SetControlMaster( this );
            c.MoveToWorld( this.Location, this.Map );
            c.ControlOrder = OrderType.Guard;

            new InternalTimer( c ).Start();

            if( player != null && player.Poisoned )
            {
                if( player.CurePoison( this ) )
                {
                    player.SendLocalizedMessage( 1010059 ); //You have been cured of all poisons.

                    player.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
                    player.PlaySound( 0x1E0 );
                }
            }
        }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:20,代码来源:SerpentineDragon.cs

示例2: JailThem

		public static void JailThem( PlayerMobile player, JailOption option )
		{
			if ( null == player || player.AccessLevel >= JailConfig.JailImmuneLevel )
				return;

			if ( JailOption.Squelch == option )
				player.Squelched = true;

			foreach ( Item item in player.Items )
			{
				if ( item is JailHammer )	// Jailed while jailed gets them another load of rock to mine
				{
					if ( 0 > ( ((JailHammer)item).UsesRemaining += JailConfig.UsesRemaining ) )	// handle integer overflow
						((JailHammer)item).UsesRemaining *= -1;

					Banker.Withdraw( player, JailConfig.FineAmount );
					player.SendMessage( "Your remaining sentence has been increased!" );
					player.SendMessage( "You have been fined {0} gold and are being kicked!", JailConfig.FineAmount );
					
					// This gives a nice little delay for the message to be read
					s_KickProcessingQueue.Enqueue( player );
					player.Squelched = true;
					Server.Timer.DelayCall( TimeSpan.FromSeconds( kSecondsTillKick ), new Server.TimerCallback( KickPlayerInQueue ) );
					return;
				}
			}

			// If mounted, dismount them and stable mount
			if ( player.Mounted )
			{
				if ( player.Mount is EtherealMount )
				{
					EtherealMount pet = player.Mount as EtherealMount;
					pet.Internalize();
					pet.Rider = null;
				}
				else if ( player.Mount is BaseMount )
				{
					BaseMount pet = player.Mount as BaseMount;
					pet.Rider = null;
					Jail.StablePet( player, pet );
				}
			}

			// Stable all other pets
			foreach ( Mobile mobile in World.Mobiles.Values )
			{
				if ( mobile is BaseCreature )
				{
					BaseCreature bc = mobile as BaseCreature;

					if ( null != bc && (bc.Controlled && bc.ControlMaster == player) || (bc.Summoned && bc.SummonMaster == player) )
						Jail.StablePet( player, bc );
				}
			}

			// Move all items to a bag and move that to the bank
			Container backpack = player.Backpack;
			Backpack bag = new Backpack(); bag.Hue = JailConfig.RobeHue;
			ArrayList equipedItems = new ArrayList( player.Items );

			foreach ( Item item in equipedItems )
			{
				if ( item.Layer == Layer.Bank || item.Layer == Layer.Backpack || item.Layer == Layer.Hair || item.Layer == Layer.FacialHair || item is DeathShroud )
					continue;
				bag.DropItem( item );
			}

			ArrayList backpackItems = new ArrayList( backpack.Items );
			foreach ( Item item in backpackItems )
			{
				if ( item is JailRock )
					item.Delete();
				else if ( item.Movable )	// Non movable pack items must remain (i.e. skill balls)
					bag.DropItem( item );
			}

			// Remember their access level and make them a player
			JailHammer hammer = new JailHammer();
			hammer.PlayerAccessLevel = player.AccessLevel;
			player.AccessLevel = AccessLevel.Player;

			// Bank the bag of belongings, give them a hammer and welcome them
			player.BankBox.DropItem( bag );
			player.AddItem( hammer );

			// Explosively move player to jail
			player.BoltEffect( 0 );
			player.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
			player.PlaySound( 0x307 );
			player.FixedParticles( 0x3709, 10, 30, 5052, EffectLayer.LeftFoot );
			player.PlaySound( 0x225 );

			// This gives a nice little delay for the effect to complete
			s_JailProcessingQueue.Enqueue( player );
			Server.Timer.DelayCall( TimeSpan.FromSeconds( kSecondsTillJail ), new Server.TimerCallback( JailPlayerInQueue ) );
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:97,代码来源:JailCommand.cs

示例3: BerserkTimer

            public BerserkTimer( PlayerMobile owner )
                : base(TimeSpan.FromSeconds( 2.0 ), TimeSpan.FromSeconds( 2.0 ))
            {
                m_Owner = owner;

                m_Owner.PlaySound( 0x20F );
                m_Owner.PlaySound( m_Owner.Body.IsFemale ? 0x338 : 0x44A );
                m_Owner.FixedParticles( 0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist );
                m_Owner.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist );

                BuffInfo.AddBuff( m_Owner, new BuffInfo( BuffIcon.Berserk, 1080449, 1115021, "15\t3", false ) );

                m_Owner.Berserk = true;
            }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:14,代码来源:PlayerMobile.cs

示例4: ApplyNightSight

		public bool ApplyNightSight(PlayerMobile Wearer)
		{
			Spell spell = new NightSightSpell(Wearer,null);

			if( Wearer == null )
				return false;

			if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
			{
				Wearer.SendMessage("The magic normally within this object seems absent.");
				return false;
			}	
			//Pix: this was borrowed from the NightSight spell...
			else if( Wearer.BeginAction( typeof( LightCycle ) ) )
			{
				new LightCycle.NightSightTimer( Wearer ).Start();

				int level = 25;

				Wearer.LightLevel = level;

				Wearer.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
				Wearer.PlaySound( 0x1E3 );

				return true;
			}

			return false;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:29,代码来源:BaseJewel.cs

示例5: ApplyMagicReflectEffect

		public bool ApplyMagicReflectEffect(PlayerMobile Wearer)
		{
			if (Wearer == null)
				return false;

			Spell spell = new MagicReflectSpell(Wearer,null); 
	
			if ( Wearer.MagicDamageAbsorb > 0 )
			{
				Wearer.SendMessage("The magic of this item is already protecting you.");
				return false;
			}
			else if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false)
			{
				Wearer.SendMessage("The magic normally within this object seems absent.");
				return false;
			}	
			else if ( !Wearer.CanBeginAction( typeof( DefensiveSpell ) ) )
			{
				Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time.
				return false;
			}
			else
			{
				if ( Wearer.BeginAction( typeof( DefensiveSpell ) ) )
				{
					int value = (int)((Utility.Random(51) + 50) + (Utility.Random(51) + 50)); // Random value of up to 100 for magery and up to 100 for scribing - lowest though is 50 magery/50 scribing equivalent strength
					value = (int)(8 + (value/200)*7.0);//absorb from 8 to 15 "circles"

					Wearer.MagicDamageAbsorb = value;

					Wearer.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
					Wearer.PlaySound( 0x1E9 );
					Wearer.SendMessage("You feel the magic of the item envelope you.");
					return true;
				}
				else
				{
					Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time.
					return false;
				}
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:43,代码来源:BaseJewel.cs

示例6: SummonTimer

 public SummonTimer(BellOfSummoning b, PlayerMobile p)
     : base(TimeSpan.FromSeconds(b.DelaySeconds))
 {
     m_Bell = b;
     m_Player = p;
     p.Frozen = true;
     p.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.RightHand);
     p.PlaySound(b.Sound);
     p.NonlocalOverheadMessage(Server.Network.MessageType.Emote, 123, true, "*begins to ring a magical bell*");
     p.LocalOverheadMessage(Server.Network.MessageType.Emote, 123, true, "*You begin to ring the magical bell*");
     Priority = TimerPriority.OneSecond;
 }
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:12,代码来源:pet-BellOfSummoning.cs

示例7: IncogMode

        public void IncogMode(PlayerMobile pm)
        {
            string originalName = pm.Name;
            pm.HueMod = pm.Race.RandomSkinHue();
            pm.NameMod = pm.Female ? NameList.RandomName("female") : NameList.RandomName("male");

            LoggingCustom.LogDisguise(DateTime.Now + "\t" + originalName + "\t" + pm.NameMod);

            if (pm.Race != null)
            {
                pm.SetHairMods(pm.Race.RandomHair(pm.Female), pm.Race.RandomFacialHair(pm.Female));
                pm.HairHue = pm.Race.RandomHairHue();
                pm.FacialHairHue = pm.Race.RandomHairHue();
            }

            pm.FixedParticles(0x373A, 10, 15, 5036, EffectLayer.Head);
            pm.PlaySound(0x3BD);

            BaseArmor.ValidateMobile(pm);
            BaseClothing.ValidateMobile(pm);

            //BuffInfo.AddBuff( Caster, new BuffInfo( BuffIcon.Incognito, 1075819, length, Caster ) );
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:23,代码来源:PvPBattle.cs

示例8: DoExplode

        public void DoExplode(PlayerMobile pm)
        {
            pm.Emote("*The gaze of the asylum guardian melts the flesh from your bones and causes your organs to explode.*");
            int range = Utility.RandomMinMax(5, 7);
            int zOffset = pm.Mounted ? 20 : 10;

            Point3D src = pm.Location.Clone3D(0, 0, zOffset);
            Point3D[] points = src.GetAllPointsInRange(pm.Map, 0, range);

            Effects.PlaySound(pm.Location, pm.Map, 0x19C);

            pm.FixedParticles(0x36BD, 20, 10, 5044, 137, 0, EffectLayer.Head);
            pm.PlaySound(0x307);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    int i = 0;
                    int place = 0;
                    int[] BodyPartArray = {7584, 7583, 7586, 7585, 7588, 7587};
                    foreach (Point3D trg in points)
                    {
                        i++;
                        int bodypartID = Utility.RandomMinMax(4650, 4655);

                        if (Utility.RandomDouble() <= 0.1 && place < BodyPartArray.Count())
                        {
                            bodypartID = BodyPartArray[place];
                            place++;
                        }
                        new MovingEffectInfo(src, trg.Clone3D(0, 0, 2), pm.Map, bodypartID).MovingImpact(
                            info =>
                            {
                                Item bodypart;
                                if (bodypartID <= 4655 && bodypartID >= 4650)
                                {
                                    bodypart = new Blood
                                    {
                                        ItemID = bodypartID
                                    };
                                    bodypart.MoveToWorld(info.Target.Location, info.Map);
                                }

                                switch (bodypartID)
                                {
                                    case 7584:
                                        bodypart = new Head();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7583:
                                        bodypart = new Torso();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7586:
                                        bodypart = new RightArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7585:
                                        bodypart = new LeftArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7588:
                                        bodypart = new RightLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7587:
                                        bodypart = new LeftLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;
                                }

                                Effects.PlaySound(info.Target, info.Map, 0x028);
                            });
                    }
                });

            pm.Damage(pm.Hits + 5);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    var corpse = pm.Corpse as Corpse;

                    if (corpse != null && !corpse.Deleted)
                    {
                        corpse.TurnToBones();
                    }
                });
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:96,代码来源:AsylumStatue.cs


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