当前位置: 首页>>代码示例>>C#>>正文


C# Creature.Lock方法代码示例

本文整理汇总了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;
		}
开发者ID:NegativeJ,项目名称:aura,代码行数:16,代码来源:MagnumShot.cs

示例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;
		}
开发者ID:tkiapril,项目名称:aura,代码行数:17,代码来源:SupportShot.cs

示例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;
		}
开发者ID:RonnyZijler,项目名称:aura,代码行数:17,代码来源:Windmill.cs

示例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;
		}
开发者ID:aura-project,项目名称:aura,代码行数:17,代码来源:MagnumShot.cs

示例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;
		}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:26,代码来源:Counterattack.cs

示例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;
		}
开发者ID:aura-project,项目名称:aura,代码行数:28,代码来源:Defense.cs

示例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;
		}
开发者ID:xKamuna,项目名称:aura,代码行数:21,代码来源:RangedAttack.cs

示例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;
		}
开发者ID:tkiapril,项目名称:aura,代码行数:25,代码来源:SupportShot.cs

示例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;
		}
开发者ID:aura-project,项目名称:aura,代码行数:30,代码来源:Defense.cs

示例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;
		}
开发者ID:aura-project,项目名称:aura,代码行数:20,代码来源:MagnumShot.cs

示例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;
        }
开发者ID:,项目名称:,代码行数:25,代码来源:


注:本文中的Aura.Channel.World.Entities.Creature.Lock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。