public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (m_Deed.Deleted)
                {
                    return;
                }

                Item newHair = null;

                switch (info.ButtonID)
                {
                case 0: return;

                case 2: newHair = new ShortHair(); break;

                case 3: newHair = new LongHair(); break;

                case 4: newHair = new PonyTail(); break;

                case 5: newHair = new Mohawk(); break;

                case 6: newHair = new PageboyHair(); break;

                case 7: newHair = new ReceedingHair(); break;

                case 8: newHair = new TwoPigTails(); break;

                case 9: newHair = new KrisnaHair(); break;
                }

                if (m_From is PlayerMobile)
                {
                    PlayerMobile pm = (PlayerMobile)m_From;

                    pm.SetHairMods(-1, -1);                     // clear any hairmods (disguise kit, incognito)
                }

                Item oldHair = m_From.FindItemOnLayer(Layer.Hair);

                if (oldHair != null)
                {
                    oldHair.Delete();
                }

                if (newHair != null)
                {
                    if (oldHair != null)
                    {
                        newHair.Hue = oldHair.Hue;
                    }

                    m_From.AddItem(newHair);
                }

                m_Deed.Delete();
            }
Пример #2
0
        public static void AddHair( Mobile m, int itemID, int hue )
        {
            Item item;

            switch ( itemID & 0x3FFF )
            {
                case 0x2044: item = new Mohawk( hue ); break;
                case 0x2045: item = new PageboyHair( hue ); break;
                case 0x2046: item = new BunsHair( hue ); break;
                case 0x2047: item = new Afro( hue ); break;
                case 0x2048: item = new ReceedingHair( hue ); break;
                case 0x2049: item = new TwoPigTails( hue ); break;
                case 0x204A: item = new KrisnaHair( hue ); break;
                case 0x203B: item = new ShortHair( hue ); break;
                case 0x203C: item = new LongHair( hue ); break;
                case 0x203D: item = new PonyTail( hue ); break;
                default: return;
            }

            m.AddItem( item );
        }
Пример #3
0
            public override void OnResponse( NetState sender, RelayInfo info )
            {
                if ( m_Deed.Deleted )
                    return;

                Item newHair = null;

                switch ( info.ButtonID )
                {
                    case 0: return;
                    case 2: newHair = new ShortHair(); break;
                    case 3: newHair = new LongHair(); break;
                    case 4: newHair = new PonyTail(); break;
                    case 5: newHair = new Mohawk(); break;
                    case 6: newHair = new PageboyHair(); break;
                    case 7: newHair = new ReceedingHair(); break;
                    case 8: newHair = new TwoPigTails(); break;
                    case 9: newHair = new KrisnaHair(); break;
                }

                if ( m_From is PlayerMobile )
                {
                    PlayerMobile pm = (PlayerMobile)m_From;

                    pm.SetHairMods( -1, -1 ); // clear any hairmods (disguise kit, incognito)
                }

                Item oldHair = m_From.FindItemOnLayer( Layer.Hair );

                if ( oldHair != null )
                    oldHair.Delete();

                if ( newHair != null )
                {
                    if ( oldHair != null )
                        newHair.Hue = oldHair.Hue;

                    m_From.AddItem( newHair );
                }

                m_Deed.Delete();
            }