本文整理汇总了C#中WCell.RealmServer.Entities.NPC.Mount方法的典型用法代码示例。如果您正苦于以下问题:C# NPC.Mount方法的具体用法?C# NPC.Mount怎么用?C# NPC.Mount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WCell.RealmServer.Entities.NPC
的用法示例。
在下文中一共展示了NPC.Mount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SeekForgiveness
/// <summary>
/// Move to the killer and pleed
/// </summary>
/// <param name="ambusher"></param>
/// <param name="killer"></param>
private static void SeekForgiveness(NPC ambusher, Character killer)
{
if (killer.IsInWorld &&
killer.IsAlive &&
killer.Map == ambusher.Map &&
killer.IsInRadius(ambusher, MaxForgivenessDistance))
{
// make sure we are using the right means of transportation
if (killer.IsFlying)
{
ambusher.Mount(MountId.FlyingBroom); // probably won't display correctly
ambusher.Movement.MoveType = AIMoveType.Fly;
}
else
{
ambusher.Dismount();
ambusher.Movement.MoveType = AIMoveType.Walk;
}
// go to killer
ambusher.MoveInFrontThenExecute(killer, mover => {
mover.StandState = StandState.Kneeling;
mover.Say("I beg thee for forgiveness!");
});
}
else
{
// killer is not in reach anymore
ambusher.Say("Sigh!");
ambusher.Delete();
}
}