예제 #1
0
            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();
                }
            }
예제 #2
0
        public static void OnDamaged(Mobile m)
        {
            BaseCostume costume = m.FindItemOnLayer(Layer.FirstValid) as BaseCostume;

            if (costume != null)
            {
                m.AddToBackpack(costume);
            }
        }