1
0

Returned cFastRandom and cEnchantment:GetRandomEnchantmentFromVector to before

Added cEnchantment:GenerateEnchantmentFromVector that allows to get the same enchantments over and over.
This commit is contained in:
STRWarrior
2014-10-15 14:44:07 +02:00
parent e3aa6e4857
commit ff5f57514e
5 changed files with 37 additions and 17 deletions

View File

@@ -646,7 +646,7 @@ void cItemGrid::GenerateRandomLootWithBooks(const cLootProbab * a_LootProbabs, s
for (int I = 0; I <= NumEnchantments; I++)
{
cEnchantments Enchantment = cEnchantments::GetRandomEnchantmentFromVector(Enchantments, a_Seed);
cEnchantments Enchantment = cEnchantments::GenerateEnchantmentFromVector(Enchantments, Noise.IntNoise2DInt(NumEnchantments, i));
CurrentLoot.m_Enchantments.AddFromString(Enchantment.ToString());
cEnchantments::RemoveEnchantmentWeightFromVector(Enchantments, Enchantment);
}