Aura.Channel.World.Entities.Creature.Unlock C# (CSharp) Method

Unlock() public method

Deactivates given Locks for creature.
Unlocking movement on the client apparently resets skill stuns.
public Unlock ( Locks locks, bool updateClient = false ) : Locks
locks Locks Locks to deactivate.
updateClient bool Sends CharacterUnlock to client if true.
return Locks
		public Locks Unlock(Locks locks, bool updateClient = false)
		{
			var prev = this.Locks;
			this.Locks &= ~locks;

			if (updateClient /*&& prev != this.Locks*/)
				Send.CharacterUnlock(this, locks);

			return this.Locks;
		}

Usage Example

Example #1
0
		/// <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;
		}
All Usage Examples Of Aura.Channel.World.Entities.Creature::Unlock