TurnTo() public méthode

Turns creature in direction of position.
public TurnTo ( Position pos ) : void
pos Position
Résultat void
Exemple #1
0
		/// <summary>
		/// Starts fishing at target location.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="skill"></param>
		/// <param name="packet"></param>
		public void Use(Creature creature, Skill skill, Packet packet)
		{
			var targetPositionId = packet.GetLong();
			var unkInt1 = packet.GetInt();
			var unkInt2 = packet.GetInt();

			var pos = new Position(targetPositionId);

			creature.Temp.FishingProp = new Prop(274, creature.RegionId, pos.X, pos.Y, 1, 1, 0, "empty");
			creature.Region.AddProp(creature.Temp.FishingProp);

			creature.TurnTo(pos);

			Send.Effect(creature, Effect.Fishing, (byte)FishingEffectType.Cast, true);
			Send.SkillUse(creature, skill.Info.Id, targetPositionId, unkInt1, unkInt2);

			this.StartFishing(creature, 1000);
		}