本文整理汇总了C#中Server.Mobiles.PlayerMobile.Animate方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.Animate方法的具体用法?C# PlayerMobile.Animate怎么用?C# PlayerMobile.Animate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.Animate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Honor
private static void Honor( PlayerMobile source, Mobile target )
{
IHonorTarget honorTarget = target as IHonorTarget;
if ( honorTarget == null || !source.CanBeHarmful( target, true ) )
return;
if ( honorTarget.ReceivedHonorContext != null )
{
if ( honorTarget.ReceivedHonorContext.Source == source )
return;
if ( honorTarget.ReceivedHonorContext.CheckDistance() )
{
source.SendLocalizedMessage( 1063233 ); // Somebody else is honoring this opponent
return;
}
}
if ( target.Hits < target.HitsMax )
{
source.SendLocalizedMessage( 1063166 ); // You cannot honor this monster because it is too damaged.
return;
}
if ( source.SentHonorContext != null )
source.SentHonorContext.Cancel();
new HonorContext( source, target );
source.Direction = source.GetDirectionTo( target );
if ( !source.Mounted )
source.Animate( 32, 5, 1, true, true, 0 );
// OSI apparently removed this message... it's nice though
source.Say( 1063231 ); // I honor you
}
示例2: Honor
private static void Honor( PlayerMobile source, Mobile target )
{
IHonorTarget honorTarget = target as IHonorTarget;
GuardedRegion reg = (GuardedRegion) source.Region.GetRegion( typeof( GuardedRegion ) );
Map map = source.Map;
if ( honorTarget == null )
return;
if ( honorTarget.ReceivedHonorContext != null )
{
if ( honorTarget.ReceivedHonorContext.Source == source )
return;
if ( honorTarget.ReceivedHonorContext.CheckDistance() )
{
source.SendLocalizedMessage( 1063233 ); // Somebody else is honoring this opponent
return;
}
}
if ( target.Hits < target.HitsMax )
{
source.SendLocalizedMessage( 1063166 ); // You cannot honor this monster because it is too damaged.
return;
}
BaseCreature cret = target as BaseCreature;
if ( target.Body.IsHuman && (cret == null || (!cret.AlwaysAttackable && !cret.AlwaysMurderer)) )
{
if( reg == null || reg.IsDisabled() )
{
//Allow honor on blue if Out of guardzone
}
else if ( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
{
//Allow honor on blue if in Fel
}
else
{
source.SendLocalizedMessage( 1001018 ); // You cannot perform negative acts
return; //cannot honor in trammel town on blue
}
}
if( Core.ML && target is PlayerMobile )
{
source.SendLocalizedMessage( 1075614 ); // You cannot honor other players.
return;
}
if ( source.SentHonorContext != null )
source.SentHonorContext.Cancel();
new HonorContext( source, target );
source.Direction = source.GetDirectionTo( target );
if ( !source.Mounted )
source.Animate( 32, 5, 1, true, true, 0 );
}
示例3: InternalTimer
public InternalTimer(PlayerMobile from, int turn)
: base(TimeSpan.FromSeconds(1.4))
{
if (from.Body.Type == BodyType.Human && !from.Mounted)
from.Animate(9, (5 - turn), 1, true, false, 0);
m_From = from;
m_turn = turn;
}