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


C# Mobile.RevealingAction方法代码示例

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


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

示例1: OnPickedInstrument

 public static void OnPickedInstrument( Mobile from, BaseInstrument instrument )
 {
     from.RevealingAction();
     from.SendLocalizedMessage( 1049525 ); // Whom do you wish to calm?
     from.Target = new InternalTarget( from, instrument );
     from.NextSkillTime = DateTime.Now + TimeSpan.FromHours( 6.0 );
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:Peacemaking.cs

示例2: OnSwing

		public override TimeSpan OnSwing( Mobile attacker, Mobile defender )
		{
			// Make sure we've been standing still for .25/.5/1 second depending on Era
			if ( DateTime.Now > (attacker.LastMoveTime + TimeSpan.FromSeconds( 1.0 )) )
			{
				if ( attacker.HarmfulCheck( defender ) )
				{
					attacker.DisruptiveAction();
					attacker.Send( new Swing( 0, attacker, defender ) );

					if ( OnFired( attacker, defender ) )
					{
						if ( CheckHit( attacker, defender ) )
							OnHit( attacker, defender );
						else
							OnMiss( attacker, defender );
					}
				}

				attacker.RevealingAction();

				return GetDelay( attacker );
			}
			else
			{
				attacker.RevealingAction();

				return TimeSpan.FromSeconds( 0.25 );
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:30,代码来源:BaseRanged.cs

示例3: HandleThrow

        public static void HandleThrow(BaseBeverage beverage, WaterElemental elemental, Mobile thrower)
        {
            if (!beverage.IsFull)
            {
                thrower.SendLocalizedMessage(1113038);
            }
            else if (!thrower.InRange(elemental.Location, 5))   // It is not full. 
            {
                thrower.SendLocalizedMessage(500295);   // You are too far away to do that.
            }
            else if (!elemental.HasDecanter)
            {
                thrower.SendLocalizedMessage(1115895);  // It seems that this water elemental no longer has a magical decanter...
            }
            else if (0.1 > Utility.RandomDouble())
            {
                thrower.RevealingAction();
                elemental.Damage(1, thrower);

                elemental.HasDecanter = false;
                beverage.Delete();
                thrower.AddToBackpack(new EndlessDecanter());
                thrower.SendLocalizedMessage(1115897);  // The water elemental has thrown a magical decanter back to you!
            }
            else
            {
                thrower.RevealingAction();
                elemental.Damage(1, thrower);

                beverage.Delete();
                thrower.PlaySound(0x040);
                thrower.SendLocalizedMessage(1115896);  // The water pitcher has shattered.
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:34,代码来源:EndlessDecanter.cs

示例4: OnTarget

            protected override void OnTarget( Mobile from, object targeted )
            {
                from.RevealingAction();

                if( targeted is BaseCreature && from.CanBeHarmful((Mobile)targeted, true) )
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if( !m_Instrument.IsChildOf(from.Backpack) )
                    {
                        from.SendLocalizedMessage(1062488); // The instrument you are trying to play is no longer in your backpack!
                    }
                    else if( creature.Controlled && from.Skills.Provocation.Value < 120.0)
                    {
                        from.SendLocalizedMessage(501590); // They are too loyal to their master to be provoked.
                    }
                    else
                    {
                        from.RevealingAction();
                        m_Instrument.PlayInstrumentWell(from);
                        from.SendLocalizedMessage(1008085); // You play your music and your target becomes angered.  Whom do you wish them to attack?
                        from.Target = new InternalSecondTarget(from, m_Instrument, creature);
                    }
                }
                else
                {
                    from.SendLocalizedMessage(501589); // You can't incite that!
                }

                EventSink.InvokeSkillUsed(new SkillUsedEventArgs(from, from.Skills[SkillName.Provocation]));
            }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:31,代码来源:Provocation.cs

示例5: OnTarget

            protected override void OnTarget( Mobile from, object targeted )
            {
                from.RevealingAction();

                if ( targeted is BaseCreature && from.CanBeHarmful( (Mobile)targeted, true ) )
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if ( creature.Controled )
                    {
                        from.SendLocalizedMessage( 501590 ); // They are too loyal to their master to be provoked.
                    }
                    else if ( creature.IsParagon )
                    {
                        from.SendLocalizedMessage( 1049446 ); // You have no chance of provoking those creatures.
                    }
                    else
                    {
                        from.RevealingAction();
                        m_Instrument.PlayInstrumentWell( from );
                        from.SendLocalizedMessage( 1008085 ); // You play your music and your target becomes angered.  Whom do you wish them to attack?
                        from.Target = new InternalSecondTarget( from, m_Instrument, creature );
                    }
                }
            }
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:25,代码来源:Provocation.cs

示例6: OnUse

		public static TimeSpan OnUse( Mobile m )
		{
			if ( !m.Hidden )
			{
				m.SendLocalizedMessage( 502725 ); // You must hide first
			}
			else if ( m.Skills[SkillName.Hiding].Base < HidingRequirement )
			{
				m.SendLocalizedMessage( 502726 ); // You are not hidden well enough.  Become better at hiding.
				m.RevealingAction();
			}
			else if( !m.CanBeginAction( typeof( Stealth ) ) )
			{
				m.SendLocalizedMessage( 1063086 ); // You cannot use this skill right now.
				m.RevealingAction();
			}
			else
			{
				int armorRating = GetArmorRating( m );

				if( armorRating >= (Core.AOS ? 42 : 26) ) //I have a hunch '42' was chosen cause someone's a fan of DNA
				{
					m.SendLocalizedMessage( 502727 ); // You could not hope to move quietly wearing this much armor.
					m.RevealingAction();
				}
				else if( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2) ) )
				{
					int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.AOS ? 5.0 : 10.0));

					if( steps < 1 )
						steps = 1;

					m.AllowedStealthSteps = steps;

// ------ NERUN's DISTRO - Orc Scout bug fix -----
					if ( m is PlayerMobile )
					{
						PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
						pm.IsStealthing = true;
					}
/*
					PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles

					if( pm != null )
    						pm.IsStealthing = true;
*/
// ------ END
					m.SendLocalizedMessage( 502730 ); // You begin to move quietly.

					return TimeSpan.FromSeconds( 10.0 );
				}
				else
				{
					m.SendLocalizedMessage( 502731 ); // You fail in your attempt to move unnoticed.
					m.RevealingAction();
				}
			}

			return TimeSpan.FromSeconds( 10.0 );
		}
开发者ID:ITLongwell,项目名称:runuo-nerun-distro,代码行数:60,代码来源:Stealth.cs

示例7: OnTarget

            protected override void OnTarget(Mobile from, object targeted)
            {
                from.RevealingAction();

                if (targeted is BaseCreature && from.CanBeHarmful((Mobile)targeted, true))
                {
                    BaseCreature creature = (BaseCreature)targeted;

                    if (!this.m_Instrument.IsChildOf(from.Backpack))
                    {
                        from.SendLocalizedMessage(1062488); // The instrument you are trying to play is no longer in your backpack!
                    }
                    else if (creature.Controlled)
                    {
                        from.SendLocalizedMessage(501590); // They are too loyal to their master to be provoked.
                    }
                    else if (creature.IsParagon && BaseInstrument.GetBaseDifficulty(creature) >= 160.0)
                    {
                        from.SendLocalizedMessage(1049446); // You have no chance of provoking those creatures.
                    }
                    else
                    {
                        from.RevealingAction();
                        this.m_Instrument.PlayInstrumentWell(from);
                        from.SendLocalizedMessage(1008085); // You play your music and your target becomes angered.  Whom do you wish them to attack?
                        from.Target = new InternalSecondTarget(from, this.m_Instrument, creature);
                    }
                }
                else
                {
                    from.SendLocalizedMessage(501589); // You can't incite that!
                }
            }
开发者ID:FreeReign,项目名称:forkuo,代码行数:33,代码来源:Provocation.cs

示例8: OnUse

        public static TimeSpan OnUse( Mobile m )
        {
            if( !m.Hidden )
            {
                m.SendLocalizedMessage(502725); // You must hide first
            }
            else if( m.Skills[SkillName.Hiding].Base < HidingRequirement )
            {
                m.SendLocalizedMessage(502726); // You are not hidden well enough.  Become better at hiding.
                m.RevealingAction();
            }
            else if( !Hiding.CheckLighting(m))
            {
                m.SendMessage("You cannot stay hidden near so much light.");
                m.RevealingAction();
            }
            else
            {
                int armorRating = GetArmorRating(m);
                DesignContext context = DesignContext.Find(m);

                if( context != null )
                {
                }
                else if( armorRating >= (Core.AOS ? 42 : 26) )	//I have a hunch '42' was chosen cause someone's a fan of DNA
                {
                    m.SendLocalizedMessage(502727); // You could not hope to move quietly wearing this much armor.
                    m.RevealingAction();
                }
                else if( m.CheckSkill(SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2)) )
                {
                    int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.SE ? 5.0 : 10.0));

                    if( steps < 1 )
                        steps = 1;

                    m.AllowedStealthSteps = steps;
                    //PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
                    //pm.IsStealthing = true;

                    m.SendLocalizedMessage(502730); // You begin to move quietly.

                    return TimeSpan.FromSeconds(10.0);
                }
                else
                {
                    m.SendLocalizedMessage(502731); // You fail in your attempt to move unnoticed.
                    m.RevealingAction();
                }
            }

            EventSink.InvokeSkillUsed(new SkillUsedEventArgs(m, m.Skills[SkillName.Stealth]));

            return TimeSpan.FromSeconds(10.0);
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:55,代码来源:Stealth.cs

示例9: OnUse

		public static TimeSpan OnUse(Mobile m)
		{
			m.RevealingAction();

			m.Target = new InternalTarget();
			m.RevealingAction();

			m.SendLocalizedMessage(500397); // To whom do you wish to grovel?

			return TimeSpan.FromHours(6.0);
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:11,代码来源:Begging.cs

示例10: OnUse

        public static TimeSpan OnUse(Mobile m)
        {
            m.RevealingAction();

            m.Target = new InternalTarget();
            m.RevealingAction();

            if (!m_DisableMessage)
                m.SendLocalizedMessage(502789); // Tame which animal?

            return TimeSpan.FromHours(6.0);
        }
开发者ID:m309,项目名称:ForkUO,代码行数:12,代码来源:AnimalTaming.cs

示例11: OnUse

		public static TimeSpan OnUse( Mobile m )
		{
			if ( !m.Hidden )
			{
				m.SendLocalizedMessage( 502725 ); // You must hide first
			}
			else if ( m.Skills[SkillName.Hiding].Base < HidingRequirement )
			{
				m.SendLocalizedMessage( 502726 ); // You are not hidden well enough.  Become better at hiding.
				m.RevealingAction();
			}
			else if( !m.CanBeginAction( typeof( Stealth ) ) )
			{
				m.SendLocalizedMessage( 1063086 ); // You cannot use this skill right now.
				m.RevealingAction();
			}
			else
			{
				int armorRating = GetArmorRating( m );

				if( armorRating >= 26 )
				{
					m.SendLocalizedMessage( 502727 ); // You could not hope to move quietly wearing this much armor.
					m.RevealingAction();
				}
				else if( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), 80.0 + (armorRating * 2) ) )
				{
					int steps = (int)(m.Skills[SkillName.Stealth].Value / 10.0);

					if( steps < 1 )
						steps = 1;

					m.AllowedStealthSteps = steps;

					PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles

					if( pm != null )
						pm.IsStealthing = true;

					m.SendLocalizedMessage( 502730 ); // You begin to move quietly.

					return TimeSpan.FromSeconds( 10.0 );
				}
				else
				{
					m.SendLocalizedMessage( 502731 ); // You fail in your attempt to move unnoticed.
					m.RevealingAction();
				}
			}

			return TimeSpan.FromSeconds( 10.0 );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:52,代码来源:Stealth.cs

示例12: OnUse

		public static TimeSpan OnUse( Mobile m )
		{
            if (m.BeginAction(typeof(IAction)))
            {
                m.RevealingAction();
                m.Target = new InternalTarget();
                m.RevealingAction();
                m.SendLocalizedMessage(500397); // To whom do you wish to grovel?
            }
            else
                m.SendAsciiMessage("You must wait to perform another action.");

            return TimeSpan.Zero;
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:14,代码来源:Begging.cs

示例13: Drink

        public override void Drink(Mobile from)
        {
            if (Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)))
            {
                from.SendLocalizedMessage(1062725); // You can not use that potion while paralyzed.
                return;
            }

            int delay = GetDelay(from);

            if (delay > 0)
            {
                from.SendLocalizedMessage(1072529, String.Format("{0}\t{1}", delay, delay > 1 ? "seconds." : "second.")); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
                return;
            }

            ThrowTarget targ = from.Target as ThrowTarget;

            if (targ != null && targ.Potion == this)
                return;

            from.RevealingAction();

            if (!this.m_Users.Contains(from))
                this.m_Users.Add(from);

            from.Target = new ThrowTarget(this);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:28,代码来源:BaseConfusionBlastPotion.cs

示例14: OnPickedInstrument

		public static void OnPickedInstrument(Mobile from, BaseInstrument instrument)
		{
			from.RevealingAction();
			from.SendLocalizedMessage(1049541); // Choose the target for your song of discordance.
			from.Target = new DiscordanceTarget(from, instrument);
			from.NextSkillTime = Core.TickCount + 6000;
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:Discordance.cs

示例15: OnPickedInstrument

		public static void OnPickedInstrument(Mobile from, BaseInstrument instrument)
		{
			from.RevealingAction();
			from.SendLocalizedMessage(1049525); // Whom do you wish to calm?
			from.Target = new InternalTarget(from, instrument);
			from.NextSkillTime = Core.TickCount + 21600000;
		}
开发者ID:FreeReign,项目名称:JustUO,代码行数:7,代码来源:Peacemaking.cs


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