protected override void OnTarget(Mobile from, object targeted) { if (targeted is ContainerReNameTool) { ContainerReNameTool knife = targeted as ContainerReNameTool; if (knife != null) { // int knifeuses = knife.Charges; // m_ContainerReNameTool.Charges += knifeuses; // knife.Delete(); from.SendMessage(38, "You cant use this on it self!"); } } else if (targeted is CommodityDeedBox) { from.SendMessage(38, "You cant use this on Commodity Deed Box!"); } // put in else if statements to have it not engrave certain things, like baseweapons, or basearmor, etc etc // else if ( targeted is Item ) else if (targeted is BaseContainer) { m_engtarg = (Item)targeted; if (!m_engtarg.IsChildOf(from.Backpack)) { from.SendMessage(38, "This must be in your backpack to change its name."); } else { from.SendMessage(75, "What would you like to re-name this item to?"); m_ContainerReNameTool.Charges -= 1; m_ContainerReNameTool.InvalidateProperties(); from.Prompt = new RenameContPrompt(m_engtarg); } } else { from.SendMessage(38, "You cannot re-name that."); } }
public InternalTarget(ContainerReNameTool engrave) : base(1, false, TargetFlags.None) { m_ContainerReNameTool = engrave; }
public InternalTarget( ContainerReNameTool engrave ) : base( 1, false, TargetFlags.None ) { m_ContainerReNameTool = engrave; }