本文整理汇总了C#中Server.Mobiles.PlayerMobile.Say方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.Say方法的具体用法?C# PlayerMobile.Say怎么用?C# PlayerMobile.Say使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.Say方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Faint
// this method is used for .e faint, and is copied directly from LieDown.cs, but modified to include an emote
private static void Faint( PlayerMobile pm )
{
if( pm == null || pm.Deleted )
return;
CombatSystemAttachment csa = CombatSystemAttachment.GetCSA( pm );
if( pm.TrippedTimer != null )
{
pm.TrippedTimer.Stop();
pm.TrippedTimer.Interval = TimeSpan.FromSeconds( 0.1 );
pm.TrippedTimer.Delay = TimeSpan.FromSeconds( 0.1 );
( (Misc.TripFoe.TripFoeTimer)pm.TrippedTimer ).m_Repeat = false;
( (Misc.TripFoe.TripFoeTimer)pm.TrippedTimer ).m_Stage = 1;
pm.TrippedTimer.Start();
}
else
{
pm.PlaySound(pm.Female ? 791 : 1063);
pm.Say("*faints*");
csa.DoTrip( 3 );
( (Misc.TripFoe.TripFoeTimer)pm.TrippedTimer ).m_Repeat = true;
}
}
示例2: RefreshPlayer
/// <summary>
/// Fully refreshes the targetted player.
/// Prevents any type of pre-casting or other advantages.
/// </summary>
/// <param name="targ"> The target to be refreshed</param>
public static void RefreshPlayer( PlayerMobile targ )
{
try
{
if (!targ.Alive)
{
Mobile m = (Mobile)targ;
m.Resurrect();
}
targ.Mana = targ.ManaMax;
targ.Hits = targ.HitsMax;
targ.Stam = targ.StamMax;
targ.Poison = null;
targ.Say("*Refreshed!*");
targ.Say("*Debuffed!*");
if (targ.Target != null)
targ.Say("I have pre-casted...");
Server.Targeting.Target.Cancel(targ);
if (targ.MeleeDamageAbsorb > 0)
{
targ.MeleeDamageAbsorb = 0;
targ.EndAction(typeof(RechargeSpell));
targ.SendMessage("Reactive armor has been nullified.");
}
if (targ.MagicDamageAbsorb > 0)
{
targ.MagicDamageAbsorb = 0;
targ.SendMessage("Magic Reflection has been nullified.");
}
StatMod mod;
mod = targ.GetStatMod("[Magic] Str Offset");
if (mod != null)
targ.RemoveStatMod("[Magic] Str Offset");
mod = targ.GetStatMod("[Magic] Dex Offset");
if (mod != null)
targ.RemoveStatMod("[Magic] Dex Offset");
mod = targ.GetStatMod("[Magic] Int Offset");
if (mod != null)
targ.RemoveStatMod("[Magic] Int Offset");
targ.Paralyzed = false;
BuffInfo.RemoveBuff(targ, BuffIcon.Clumsy);
BuffInfo.RemoveBuff(targ, BuffIcon.FeebleMind);
BuffInfo.RemoveBuff(targ, BuffIcon.Weaken);
BuffInfo.RemoveBuff(targ, BuffIcon.MassCurse);
BuffInfo.RemoveBuff(targ, BuffIcon.Agility);
BuffInfo.RemoveBuff(targ, BuffIcon.Cunning);
BuffInfo.RemoveBuff(targ, BuffIcon.Strength);
BuffInfo.RemoveBuff(targ, BuffIcon.Bless);
}
catch (Exception e)
{
Console.WriteLine("Error : " + e.Message);
Console.WriteLine("Location : refresh() in Manager.cs");
}
}
示例3: 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
}
示例4: 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.Say("I Honor Thee");
source.Direction = source.GetDirectionTo(target);
if (!source.Mounted)
source.Animate(32, 5, 1, true, true, 0);
}