Aura.Channel.Skills.Action.DiceTossing.Use C# (CSharp) Метод

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

Uses skill, the actual usage is in Complete.
public Use ( Creature creature, Skill skill, Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат void
		public void Use(Creature creature, Skill skill, Packet packet)
		{
			var location = packet.GetLong();
			var unkInt1 = packet.GetInt();
			var unkInt2 = packet.GetInt();

			var areaPosition = new Position(location);

			// Check range
			if (!creature.GetPosition().InRange(areaPosition, Range))
			{
				this.Cancel(creature, skill);
				Send.SkillUseSilentCancel(creature);
				Send.Notice(creature, Localization.Get("Out of range."));
				return;
			}

			// Reduce Dice
			if (creature.Inventory.RightHand != null)
				creature.Inventory.Decrement(creature.Inventory.RightHand);

			var number = (byte)(RandomProvider.Get().Next(6));

			Send.UseMotion(creature, 27, 2, false, false);
			Send.Effect(creature, Effect.Dice, 0, "process", location, number); // [200200, NA233 (2016-08-12)] New 0 int after effect id
			Send.SkillUse(creature, skill.Info.Id, location, unkInt1, unkInt2);

			skill.Stacks = 0;
		}