public void AddFixedItems(AItemContainer <TModuleType> itemContainer, List <AItem <TModuleType> > items) { if (items != null) { foreach (AItem <TModuleType> item in items) { itemContainer.AddItem(item); } } }
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); } } } }
public void GenerateConsommable(AItemContainer <TModuleType> itemContainer) { e_consommableProbability whichConsommable = (e_consommableProbability)ServiceLocator.Instance.ProbabilityManager.GetProbabilityIndex(this.probabilities); itemContainer.AddItem(this.GenerateConsommable(whichConsommable)); }