Beispiel #1
0
 public void AddFixedItems(AItemContainer <TModuleType> itemContainer, List <AItem <TModuleType> > items)
 {
     if (items != null)
     {
         foreach (AItem <TModuleType> item in items)
         {
             itemContainer.AddItem(item);
         }
     }
 }
Beispiel #2
0
    public void GenerateRandomItems(AItemContainer <TModuleType> itemContainer)
    {
        int number = MathExtension.GenerateRandomIntBetweenFloat(NumberOfItemGenerated);

        for (byte i = 0; i < number; i++)
        {
            if (this.probabilities.Length > 0)
            {
                e_stuffInstantiate   whichPartOfStuff = (e_stuffInstantiate)ServiceLocator.Instance.ProbabilityManager.GetProbabilityIndex(this.probabilities);
                AStuff <TModuleType> itemGenerated    = GenerateStuff(whichPartOfStuff);

                if (null != itemGenerated)
                {
                    itemGenerated.levelRequiered   = this.levelRequired.RandomBetweenValues();
                    itemGenerated.equipmentQuality = this.GenerateStuffQuality();

                    this.GenerateStuffName(itemGenerated);
                    itemContainer.AddItem(itemGenerated);
                }
            }
        }
    }
Beispiel #3
0
    public void GenerateConsommable(AItemContainer <TModuleType> itemContainer)
    {
        e_consommableProbability whichConsommable = (e_consommableProbability)ServiceLocator.Instance.ProbabilityManager.GetProbabilityIndex(this.probabilities);

        itemContainer.AddItem(this.GenerateConsommable(whichConsommable));
    }