Example #1
0
 /// <summary>
 /// Constructs a new instance of UltimaItemCounter.
 /// </summary>
 /// <param name="serial">First item serial.</param>
 public UltimaItemCounter(uint serial, string name) : base()
 {
     _Serial             = serial;
     _Name               = name;
     _Chance             = 0;
     _MinAmountPerCorpse = Int32.MaxValue;
     _MaxAmountPerCorpse = Int32.MinValue;
     _Hues               = new UltimaEnumPropertyCounter(0);
     _Amount             = new UltimaPropertyRangeCounter(0);
 }
Example #2
0
 /// <summary>
 /// Constructs a new instance of UltimaItemCounter.
 /// </summary>
 /// <param name="serial">First item serial.</param>
 public UltimaItemCounter( uint serial, string name )
     : base()
 {
     _Serial = serial;
     _Name = name;
     _Chance = 0;
     _MinAmountPerCorpse = Int32.MaxValue;
     _MaxAmountPerCorpse = Int32.MinValue;
     _Hues = new UltimaEnumPropertyCounter( 0 );
     _Amount = new UltimaPropertyRangeCounter( 0 );
 }
Example #3
0
        private UltimaPropertyCounter GetPropertyCounter(int cliloc, int type = 0)
        {
            UltimaPropertyCounter counter = null;

            if (!_Properties.ContainsKey(cliloc))
            {
                switch (type)
                {
                default: counter = new UltimaPropertyCounter(cliloc); break;

                case 1: counter = new UltimaPropertyRangeCounter(cliloc); break;

                case 2: counter = new UltimaPropertyCounterString(cliloc); break;
                }

                _Properties.Add(cliloc, counter);
            }
            else
            {
                counter = _Properties[cliloc];
            }

            return(counter);
        }
Example #4
0
        private UltimaPropertyCounter GetPropertyCounter( int cliloc, int type = 0 )
        {
            UltimaPropertyCounter counter = null;

            if ( !_Properties.ContainsKey( cliloc ) )
            {
                switch ( type )
                {
                    default: counter = new UltimaPropertyCounter( cliloc ); break;
                    case 1: counter = new UltimaPropertyRangeCounter( cliloc ); break;
                    case 2: counter = new UltimaPropertyCounterString( cliloc ); break;
                }

                _Properties.Add( cliloc, counter );
            }
            else
                counter = _Properties[ cliloc ];

            return counter;
        }