Server.Loot.RandomScroll C# (CSharp) Méthode

RandomScroll() public static méthode

public static RandomScroll ( int minIndex, int maxIndex, SpellbookType type ) : SpellScroll
minIndex int
maxIndex int
type SpellbookType
Résultat Server.Items.SpellScroll
		public static SpellScroll RandomScroll( int minIndex, int maxIndex, SpellbookType type )
		{
			Type[] types;

			switch ( type )
			{
				default:
				case SpellbookType.Regular: types = m_RegularScrollTypes; break;
			}

			return Construct( types, Utility.RandomMinMax( minIndex, maxIndex ) ) as SpellScroll;
		}

Usage Example

Exemple #1
0
        public static Item RandomScroll(int minCircle, int maxCircle)
        {
            if (Utility.Random(500) == 17)
            {
                return(new Item(Utility.Random(6) + 0xEf4));
            }

            int min = GetIntensityCircle(minCircle);
            int rnd = Utility.Random(min, GetIntensityCircle(maxCircle) - min);

            if (50 > rnd)
            {
                return(Loot.RandomScroll(0, 15));
            }
            else
            {
                rnd -= 50;
            }

            if (25 > rnd)
            {
                return(Loot.RandomScroll(16, 31));
            }
            else
            {
                rnd -= 25;
            }

            if (14 > rnd)
            {
                return(Loot.RandomScroll(32, 47));
            }
            else
            {
                rnd -= 14;
            }

            if (8 > rnd)
            {
                return(Loot.RandomScroll(48, 55));
            }

            return(Loot.RandomScroll(56, 63));
        }
All Usage Examples Of Server.Loot::RandomScroll