Aura.Channel.Skills.Life.Blacksmithing.CheckTools C# (CSharp) Метод

CheckTools() приватный Метод

Checks hands for hammer and manual, returns false if equip isn't present, and sends a notice about it.
private CheckTools ( Creature creature ) : bool
creature Aura.Channel.World.Entities.Creature
Результат bool
		private bool CheckTools(Creature creature)
		{
			if (creature.RightHand == null || creature.Magazine == null || !creature.RightHand.HasTag("/tool/blacksmith/*/hammer/") || !creature.Magazine.HasTag("/blacksmith/manual/"))
			{
				// Sanity check, client checks it as well.
				Send.Notice(creature, Localization.Get("You need a Hammer in your right hand\nand a Blacksmith Manual in your left."));
				return false;
			}

			// Check if kit has enough durability
			if (creature.RightHand.Durability < ToolDurabilityLoss)
			{
				Send.MsgBox(creature, Localization.Get("You can't use this Blacksmith Hammer anymore."));
				return false;
			}

			// Check if manual has enough durability
			if (creature.Magazine.Durability < ManualDurabilityLoss)
			{
				Send.MsgBox(creature, Localization.Get("You can't use this blueprint anymore. It's too faded."));
				return false;
			}

			return true;
		}