本文整理汇总了C#中Aura.Channel.World.Entities.Creature.Lock方法的典型用法代码示例。如果您正苦于以下问题:C# Creature.Lock方法的具体用法?C# Creature.Lock怎么用?C# Creature.Lock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.Channel.World.Entities.Creature
的用法示例。
在下文中一共展示了Creature.Lock方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Prepare
/// <summary>
/// Prepares skill.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Prepare(Creature creature, Skill skill, Packet packet)
{
Send.SkillFlashEffect(creature);
Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
creature.Lock(Locks.Run);
return true;
}
示例2: Prepare
/// <summary>
/// Prepares skill.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Prepare(Creature creature, Skill skill, Packet packet)
{
Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
// Lock running if not elf
if (!creature.CanRunWithRanged)
creature.Lock(Locks.Run);
return true;
}
示例3: Prepare
/// <summary>
/// Prepares WM, empty skill init for only the loading sound.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Prepare(Creature creature, Skill skill, Packet packet)
{
creature.StopMove();
creature.Lock(Locks.Move);
Send.SkillInitEffect(creature, null);
Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
return true;
}
示例4: Prepare
/// <summary>
/// Prepares skill.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Prepare(Creature creature, Skill skill, Packet packet)
{
Send.SkillFlashEffect(creature);
Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
if (creature.RightHand == null || !creature.RightHand.HasTag("/crossbow/"))
creature.Lock(Locks.Run);
return true;
}
示例5: Ready
/// <summary>
/// Handles redying the skill, called when finishing casting it.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
public override bool Ready(Creature creature, Skill skill, Packet packet)
{
Send.SkillReady(creature, skill.Info.Id);
// Default lock is Run, lock Walk if no combat weapon is equipped.
if (AuraData.FeaturesDb.IsEnabled("TalentRenovationCloseCombat"))
{
if (creature.RightHand == null || !creature.RightHand.HasTag("/weapontype_combat/"))
creature.Lock(Locks.Walk);
}
// Tell client to lock any movement if renovation isn't enabled.
else
creature.Lock(Locks.Move, true);
// Training
if (skill.Info.Rank == SkillRank.RF)
skill.Train(1); // Use Counterattack.
return true;
}
示例6: Prepare
/// <summary>
/// Prepares the skill, called to start casting.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
public override bool Prepare(Creature creature, Skill skill, Packet packet)
{
Send.SkillFlashEffect(creature);
Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
// Default lock is Walk|Run, since renovation you're not able to
// move while loading anymore.
if (AuraData.FeaturesDb.IsEnabled("TalentRenovationCloseCombat"))
{
creature.StopMove();
}
// Since the client locks Walk|Run by default we have to tell it
// to enable walk but disable run (under any circumstances) if
// renovation is disabled.
else
{
creature.Lock(Locks.Run, true);
creature.Unlock(Locks.Walk, true);
}
return true;
}
示例7: Ready
/// <summary>
/// Readies skill, activates fire effect.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Ready(Creature creature, Skill skill, Packet packet)
{
creature.Temp.FireArrow = creature.Region.GetProps(a => a.Info.Id == 203 && a.GetPosition().InRange(creature.GetPosition(), 500)).Count > 0;
if (creature.Temp.FireArrow)
Send.Effect(creature, Effect.FireArrow, true);
Send.SkillReady(creature, skill.Info.Id);
// Lock running if not elf
if (!creature.IsElf)
creature.Lock(Locks.Run);
return true;
}
示例8: Ready
/// <summary>
/// Readies skill, activates fire effect.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Ready(Creature creature, Skill skill, Packet packet)
{
// Light arrows (!) on fire if there's a campfire nearby
if (creature.RightHand != null && creature.RightHand.HasTag("/bow/"))
creature.Temp.FireArrow = creature.Region.GetProps(a => a.Info.Id == 203 && a.GetPosition().InRange(creature.GetPosition(), 500)).Count > 0;
// Add fire arrow effect to arrow
if (creature.Temp.FireArrow)
Send.Effect(creature, Effect.FireArrow, true);
Send.SkillReady(creature, skill.Info.Id);
// Lock running
if (!creature.CanRunWithRanged)
creature.Lock(Locks.Run);
return true;
}
示例9: Ready
/// <summary>
/// Readies the skill, called when casting is done.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
public override bool Ready(Creature creature, Skill skill, Packet packet)
{
Send.SkillReady(creature, skill.Info.Id);
// No default locks, set them depending on whether a shield is
// equipped or not.
if (AuraData.FeaturesDb.IsEnabled("TalentRenovationCloseCombat"))
{
if (creature.LeftHand == null || !creature.LeftHand.IsShield)
creature.Lock(Locks.Run);
}
// Send lock to client if renovation isn't enabled,
// so it doesn't let the creature run, no matter what.
else
{
creature.Lock(Locks.Run, true);
}
// Training
if (skill.Info.Rank == SkillRank.RF)
skill.Train(1); // Use the Defense skill.
return true;
}
示例10: Ready
/// <summary>
/// Readies skill, activates fire effect.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Ready(Creature creature, Skill skill, Packet packet)
{
creature.Temp.FireArrow = creature.Region.GetProps(a => a.Info.Id == 203 && a.GetPosition().InRange(creature.GetPosition(), 500)).Count > 0;
if (creature.Temp.FireArrow)
Send.Effect(creature, Effect.FireArrow, true);
Send.SkillReady(creature, skill.Info.Id);
if (creature.RightHand == null || !creature.RightHand.HasTag("/crossbow/"))
creature.Lock(Locks.Run);
return true;
}
示例11: Ready
/// <summary>
/// Readies skill, activates fire effect.
/// </summary>
/// <param name="creature"></param>
/// <param name="skill"></param>
/// <param name="packet"></param>
/// <returns></returns>
public bool Ready(Creature creature, Skill skill, Packet packet)
{
// Light arrows (!) on fire if there's a campfire nearby
if (creature.RightHand != null && creature.RightHand.HasTag("/bow/"))
creature.Temp.FireArrow = Campfire.GetNearbyCampfire(creature, 500) != null;
// Add fire arrow effect to arrow
if (creature.Temp.FireArrow)
Send.Effect(creature, Effect.FireArrow, true);
Send.SkillReady(creature, skill.Info.Id);
// Lock running
if (!creature.CanRunWithRanged)
creature.Lock(Locks.Run);
return true;
}