Aura.Channel.World.Entities.Creature.Warp C# (CSharp) Метод

Warp() публичный Метод

Warps creature to target location, returns false if warp is unsuccessful.
public Warp ( Location loc ) : bool
loc Location
Результат bool
		public bool Warp(Location loc)
		{
			return this.Warp(loc.RegionId, loc.X, loc.Y);
		}

Same methods

Creature::Warp ( int regionId, Position position ) : bool
Creature::Warp ( int regionId, int x, int y ) : bool
Creature::Warp ( string locationPath ) : bool

Usage Example

Пример #1
0
		/// <summary>
		/// Completes skill, teleporting behind target.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="skill"></param>
		/// <param name="packet"></param>
		public void Complete(Creature creature, Skill skill, Packet packet)
		{
			var target = creature.Target;
			if (target != null)
			{
				var pos = creature.GetPosition();
				var targetPos = target.GetPosition();
				var telePos = pos.GetRelative(targetPos, DistanceToTarget);

				Send.Effect(creature, Effect.SilentMoveTeleport, (byte)2, telePos.X, telePos.Y);
				creature.Warp(creature.RegionId, telePos);
			}

			Send.SkillComplete(creature, skill.Info.Id);
		}
All Usage Examples Of Aura.Channel.World.Entities.Creature::Warp