summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 15:25:48 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-10-15 15:25:48 +0200
commite4ee71868e307c5d51ca910a97a36623efdfaff0 (patch)
tree5d8c60bd530e2715a79a9954c243e4b72014f9df /src
parentReturned cFastRandom and cEnchantment:GetRandomEnchantmentFromVector to before (diff)
downloadcuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar.gz
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar.bz2
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar.lz
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar.xz
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.tar.zst
cuberite-e4ee71868e307c5d51ca910a97a36623efdfaff0.zip
Diffstat (limited to 'src')
-rw-r--r--src/ItemGrid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ItemGrid.cpp b/src/ItemGrid.cpp
index a5273c6da..5621c00fd 100644
--- a/src/ItemGrid.cpp
+++ b/src/ItemGrid.cpp
@@ -644,7 +644,7 @@ void cItemGrid::GenerateRandomLootWithBooks(const cLootProbab * a_LootProbabs, s
cEnchantments::AddItemEnchantmentWeights(Enchantments, E_ITEM_BOOK, 24 + Noise.IntNoise2DInt(a_Seed, TotalProbab) % 7);
int NumEnchantments = Noise.IntNoise3DInt(TotalProbab, Rnd, a_Seed) % 5; // The number of enchantments this book wil get.
- for (int I = 0; I <= NumEnchantments; I++)
+ for (int j = 0; j <= NumEnchantments; j++)
{
cEnchantments Enchantment = cEnchantments::GenerateEnchantmentFromVector(Enchantments, Noise.IntNoise2DInt(NumEnchantments, i));
CurrentLoot.m_Enchantments.AddFromString(Enchantment.ToString());