Server.Spells.Sixth.InvisibilitySpell.Target C# (CSharp) Méthode

Target() public méthode

public Target ( Mobile m ) : void
m Mobile
Résultat void
		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m is Mobiles.BaseVendor || m is Mobiles.PlayerVendor || m.AccessLevel > Caster.AccessLevel )
			{
				Caster.SendLocalizedMessage( 501857 ); // This spell won't work on that!
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				Effects.SendLocationParticles( EffectItem.Create( new Point3D( m.X, m.Y, m.Z + 16 ), Caster.Map, EffectItem.DefaultDuration ), 0x376A, 10, 15, 5045 );
				m.PlaySound( 0x3C4 );

				m.Hidden = true;
				m.Combatant = null;
				m.Warmode = false;

				RemoveTimer( m );

				TimeSpan duration = TimeSpan.FromSeconds( (( 1.2 * Caster.Skills.Magery.Fixed) / 10 ));

				Timer t = new InternalTimer( m, duration );

				BuffInfo.RemoveBuff( m, BuffIcon.HidingAndOrStealth );
				BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.Invisibility, 1075825, duration, m ) );	//Invisibility/Invisible

				m_Table[m] = t;

				t.Start();
			}

			FinishSequence();
		}

Usage Example

Exemple #1
0
 protected override void OnTarget(Mobile from, object o)
 {
     if (o is Mobile)
     {
         m_Owner.Target((Mobile)o);
     }
 }
All Usage Examples Of Server.Spells.Sixth.InvisibilitySpell::Target