summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Enchantments.cpp')
-rw-r--r--src/Enchantments.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp
index 264878c22..e106ef398 100644
--- a/src/Enchantments.cpp
+++ b/src/Enchantments.cpp
@@ -994,9 +994,13 @@ void cEnchantments::CheckEnchantmentConflictsFromVector(cWeightedEnchantments &
-cEnchantments cEnchantments::GetRandomEnchantmentFromVector(cWeightedEnchantments & a_Enchantments)
+cEnchantments cEnchantments::GetRandomEnchantmentFromVector(cWeightedEnchantments & a_Enchantments, int a_Seed)
{
cFastRandom Random;
+ if (a_Seed != -1)
+ {
+ Random = cFastRandom(a_Seed);
+ }
int AllWeights = 0;
for (cWeightedEnchantments::iterator it = a_Enchantments.begin(); it != a_Enchantments.end(); ++it)