protected override void OnTarget(Mobile from, object targeted) { if (m_Totem.Deleted) { return; } if (!m_Totem.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1060640); // The item must be in your backpack to use it. return; } if (targeted is BaseCostume) { BaseCostume costume = targeted as BaseCostume; m_Totem.CostumeCreatureName = costume.CreatureName; m_Totem.CostumeBody = costume.CostumeBody; m_Totem.InvalidateProperties(); costume.Delete(); } }
public static void OnDamaged(Mobile m) { BaseCostume costume = m.FindItemOnLayer(Layer.FirstValid) as BaseCostume; if (costume != null) { m.AddToBackpack(costume); } }