diff options
Diffstat (limited to 'src/Enchantments.cpp')
-rw-r--r-- | src/Enchantments.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp index a8300aabb..a18f6d68a 100644 --- a/src/Enchantments.cpp +++ b/src/Enchantments.cpp @@ -1012,14 +1012,12 @@ void cEnchantments::CheckEnchantmentConflictsFromVector(cWeightedEnchantments & cEnchantments cEnchantments::GetRandomEnchantmentFromVector(cWeightedEnchantments & a_Enchantments) { - cFastRandom Random; - int AllWeights = 0; for (cWeightedEnchantments::iterator it = a_Enchantments.begin(); it != a_Enchantments.end(); ++it) { AllWeights += (*it).m_Weight; } - int RandomNumber = Random.GenerateRandomInteger(0, AllWeights - 1); + int RandomNumber = GetRandomProvider().RandInt(AllWeights - 1); for (cWeightedEnchantments::iterator it = a_Enchantments.begin(); it != a_Enchantments.end(); ++it) { RandomNumber -= (*it).m_Weight; |