diff options
Diffstat (limited to '')
-rw-r--r-- | src/Enchantments.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp index 8eda97eba..e1609bf62 100644 --- a/src/Enchantments.cpp +++ b/src/Enchantments.cpp @@ -1170,14 +1170,14 @@ void cEnchantments::CheckEnchantmentConflictsFromVector( -cEnchantments cEnchantments::GetRandomEnchantmentFromVector(const cWeightedEnchantments & a_Enchantments) +cEnchantments cEnchantments::GetRandomEnchantmentFromVector(const cWeightedEnchantments & a_Enchantments, MTRand & a_Random) { int AllWeights = 0; for (const auto & Enchantment: a_Enchantments) { AllWeights += Enchantment.m_Weight; } - int RandomNumber = GetRandomProvider().RandInt(AllWeights - 1); + int RandomNumber = a_Random.RandInt(AllWeights - 1); for (const auto & Enchantment: a_Enchantments) { RandomNumber -= Enchantment.m_Weight; |