summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 14:08:45 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 14:08:45 +0200
commite3aa6e48577f3247653e94a76b68a4626a630c65 (patch)
tree2efec4c43cab7bff0173ad68ef0ab4400addf6dd /src/Enchantments.cpp
parentcWorld: Fixed scheduler. (diff)
downloadcuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.gz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.bz2
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.lz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.xz
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.tar.zst
cuberite-e3aa6e48577f3247653e94a76b68a4626a630c65.zip
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)