private bool CheckTools(Creature creature)
{
// Check for kit and valid manual
// Sanity check, client checks it as well.
if (
creature.RightHand == null || !creature.RightHand.HasTag("/tailor/kit/") ||
creature.Magazine == null || !creature.Magazine.HasTag("/tailor/manual/") || !creature.Magazine.MetaData1.Has("FORMID")
)
{
Send.MsgBox(creature, Localization.Get("You need a Tailoring Kit in your right hand\nand a Sewing Pattern in your left."));
return false;
}
// Check if kit has enough durability
// Does the client check this?
if (creature.RightHand.Durability < ToolDurabilityLoss)
{
Send.MsgBox(creature, Localization.Get("You can't use this Tailoring Kit anymore."));
return false;
}
// Check if pattern has enough durability
// Does the client check this?
if (creature.Magazine.Durability < ManualDurabilityLoss)
{
Send.MsgBox(creature, Localization.Get("You can't use this Sewing Pattern anymore. You'll stab your fingers!"));
return false;
}
return true;
}