Server.Spells.First.HealSpell.Target C# (CSharp) Method

Target() public method

public Target ( Mobile m ) : void
m Mobile
return void
		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m.IsDeadBondedPet )
			{
				Caster.SendLocalizedMessage( 1060177 ); // You cannot heal a creature that is already dead!
			}
			else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
			{
				Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
			}
			else if ( m.Poisoned )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				int toHeal;

				toHeal = (int)(Caster.Skills[SkillName.Magery].Value * 0.1);
				toHeal += Utility.Random( 1, 5 );
                
				//m.Heal( toHeal, Caster );
				SpellHelper.Heal( toHeal, m, Caster );

				m.FixedParticles( 0x376A, 9, 32, 5005, EffectLayer.Waist );
				m.PlaySound( 0x1F2 );
			}

			FinishSequence();
		}

Usage Example

Example #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.First.HealSpell::Target