summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-21 06:41:11 +0200
committerMattes D <github@xoft.cz>2014-04-21 06:41:11 +0200
commitd7f88396e0ed7c024fd367c4e225bbd9c05404b6 (patch)
tree32c8b0f88abbe505bf1934cc3f80a34ca807a0b8 /src
parentUpdated the nightbuild script. (diff)
downloadcuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar.gz
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar.bz2
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar.lz
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar.xz
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.tar.zst
cuberite-d7f88396e0ed7c024fd367c4e225bbd9c05404b6.zip
Diffstat (limited to '')
-rw-r--r--src/Item.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index f92efcb39..6a5fefbe1 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -320,7 +320,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
float SecondEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
if ((Random.NextFloat(100) > SecondEnchantmentChance) || (enchantments.size() == 0))
{
- return false;
+ return true;
}
cEnchantments Enchantment2 = cEnchantments::GetRandomEnchantmentFromVector(enchantments);
@@ -335,7 +335,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
float ThirdEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
if ((Random.NextFloat(100) > ThirdEnchantmentChance) || (enchantments.size() == 0))
{
- return false;
+ return true;
}
cEnchantments Enchantment3 = cEnchantments::GetRandomEnchantmentFromVector(enchantments);
@@ -350,7 +350,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
float FourthEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
if ((Random.NextFloat(100) > FourthEnchantmentChance) || (enchantments.size() == 0))
{
- return false;
+ return true;
}
cEnchantments Enchantment4 = cEnchantments::GetRandomEnchantmentFromVector(enchantments);
m_Enchantments.AddFromString(Enchantment4.ToString());