Server.Mobiles.BaseCreature.DeathAdderCharmTarget.OnTarget C# (CSharp) Méthode

OnTarget() protected méthode

protected OnTarget ( Mobile from, object targeted ) : void
from Mobile
targeted object
Résultat void
            protected override void OnTarget( Mobile from, object targeted )
            {
                if ( !m_Charmed.DeathAdderCharmable || m_Charmed.Combatant != null || !from.CanBeHarmful( m_Charmed, false ) )
                    return;

                DeathAdder da = Spells.Necromancy.SummonFamiliarSpell.Table[from] as DeathAdder;
                if ( da == null || da.Deleted )
                    return;

                Mobile targ = targeted as Mobile;
                if ( targ == null || !from.CanBeHarmful( targ, false ) )
                    return;

                from.RevealingAction();
                from.DoHarmful( targ, true );

                m_Charmed.Combatant = targ;

                if ( m_Charmed.AIObject != null )
                    m_Charmed.AIObject.Action = ActionType.Combat;
            }
BaseCreature.DeathAdderCharmTarget