Пример #1
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 );
        }
Пример #2
0
 public virtual Item AddRandomHair()
 {
     Item hair = null;
     switch ( Utility.Random( 8 ) )
     {
         case 0: AddItem( hair = new Afro() ); break;
         case 1: AddItem( hair = new KrisnaHair() ); break;
         case 2: AddItem( hair = new PageboyHair() ); break;
         case 3: AddItem( hair = new PonyTail() ); break;
         case 4: AddItem( hair = new ReceedingHair() ); break;
         case 5: AddItem( hair = new TwoPigTails() ); break;
         case 6: AddItem( hair = new ShortHair() ); break;
         case 7: AddItem( hair = new LongHair() ); break;
     }
     return hair;
 }