Ejemplo n.º 1
0
        public BaseItem GetDropChance()
        {
            if (Loot.Count() == 0 || Loot == null)
            {
                return(null);
            }
            else
            {
                List <BaseItem> PercentageChance = new List <BaseItem>();
                for (int i = 0; i < Loot.Count; i++)
                {
                    for (int x = 0; x < Loot[i].GetDropChance(); x++)
                    {
                        PercentageChance.Add(Loot[i].GetItem());
                    }
                }

                int FinalDrop = rng.Next(0, Loot.Count);
                return(Loot[FinalDrop].GetItem());
            }
        }