本文整理汇总了C#中Server.Mobiles.PlayerMobile.RevealingAction方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.RevealingAction方法的具体用法?C# PlayerMobile.RevealingAction怎么用?C# PlayerMobile.RevealingAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.RevealingAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Shoot
private static void Shoot(PlayerMobile from, Mobile target, INinjaWeapon weapon)
{
if (from != target && CanUseWeapon(from, weapon) && from.CanBeHarmful(target))
{
if (weapon.WeaponMinRange == 0 || !from.InRange(target, weapon.WeaponMinRange))
{
from.NinjaWepCooldown = true;
from.Direction = from.GetDirectionTo(target);
from.RevealingAction();
weapon.AttackAnimation(from, target);
ConsumeUse(weapon);
if (CombatCheck(from, target))
{
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback<object[]>(OnHit), new object[] { from, target, weapon });
}
Timer.DelayCall(TimeSpan.FromSeconds(2.5), new TimerStateCallback<PlayerMobile>(ResetUsing), from);
}
else
{
from.SendLocalizedMessage(1063303); // Your target is too close!
}
}
}
示例2: Release
public void Release(PlayerMobile pm, GovernmentEntity g)
{
if( !(GovernmentEntity.IsGuildOfficer(pm, g)) )
{
pm.SendMessage("Only officers may order a resource to be abandoned.");
return;
}
pm.RevealingAction();
pm.SendMessage("You order the " + this.Resource.ToString() + " to be abandoned by " + this.Government.Name.ToString() + ".");
Owned = false;
Name = BaseName;
Government = null;
}
示例3: Claim
public void Claim(PlayerMobile pm, GovernmentEntity g)
{
if (Government != null && !Government.Deleted && Government == g)
{
pm.SendMessage(g.Name.ToString() + " already owns this resource.");
return;
}
if (m_ClaimantGovernment != null && !m_ClaimantGovernment.Deleted && m_ClaimantGovernment == g)
{
pm.SendMessage(g.Name.ToString() + " is already laying claim to this resource.");
return;
}
if (Owned && (DateTime.Now < m_LastCapture + TimeSpan.FromDays(1)) )
{
pm.SendMessage("It is too soon to claim this resource.");
return;
}
if (Owned && ( DateTime.Now < (pm.LastDeath + TimeSpan.FromHours(1)) ) )
{
pm.SendMessage("You have been injured in the last hour. Try resting before attempting to claim these resources.");
return;
}
if (!CustomGuildStone.IsGuildOfficer(pm, g))
{
pm.SendMessage("Only officers of " + g.Name.ToString() + " may claim resources.");
return;
}
pm.RevealingAction();
m_Claimant = pm;
m_ClaimantGovernment = g;
m_ClaimTimer = new ClaimResourceTimer(this);
m_ClaimTimer.Start();
if (m_Government != null && !m_Government.Deleted)
{
bool nodeThief = true;
foreach (CustomGuildStone c in CustomGuildStone.Guilds)
{
if (CustomGuildStone.IsGuildMember(pm, c))
{
if (m_Government.AlliedGuilds.Contains(c))
{
nodeThief = false;
continue;
}
}
}
if (nodeThief)
{
XmlAttachment attachment = null;
attachment = XmlAttach.FindAttachmentOnMobile(pm, typeof(XmlCriminal), m_Government.Nation.ToString());
if (attachment == null)
{
XmlAttach.AttachTo(pm, new XmlCriminal(m_Government.Nation));
pm.SendMessage(Soldier.CriminalAlertMessage(m_Government.Nation));
pm.RevealingAction();
}
}
}
m_Claimant.SendMessage("You begin laying claim to the " + Resource.ToString() + " in the name of " + m_ClaimantGovernment.Name.ToString() + ".");
}