summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authorr.ramazanov <r.ramazanov@servplus.ru>2014-04-23 16:15:28 +0200
committerr.ramazanov <r.ramazanov@servplus.ru>2014-04-23 16:15:28 +0200
commit103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932 (patch)
treeb17cb676477be05abac7084bc0e1e49f651c2456 /src/Item.cpp
parentMobs shouldn't burn when it's Raining #906 (diff)
parentMerge pull request #925 from archshift/master (diff)
downloadcuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.gz
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.bz2
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.lz
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.xz
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.zst
cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.zip
Diffstat (limited to 'src/Item.cpp')
-rw-r--r--src/Item.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 6a5fefbe1..7e472f6d8 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -198,9 +198,6 @@ bool cItem::IsEnchantable(short item)
return true;
if ((item >= 298) && (item <= 317))
return true;
- if ((item >= 290) && (item <= 294))
- return true;
-
if ((item == 346) || (item == 359) || (item == 261))
return true;
@@ -318,7 +315,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
// Next Enchantment (Second)
NewEnchantmentLevel = NewEnchantmentLevel / 2;
float SecondEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
- if ((Random.NextFloat(100) > SecondEnchantmentChance) || (enchantments.size() == 0))
+ if (enchantments.empty() || (Random.NextFloat(100) > SecondEnchantmentChance))
{
return true;
}
@@ -333,7 +330,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
// Next Enchantment (Third)
NewEnchantmentLevel = NewEnchantmentLevel / 2;
float ThirdEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
- if ((Random.NextFloat(100) > ThirdEnchantmentChance) || (enchantments.size() == 0))
+ if (enchantments.empty() || (Random.NextFloat(100) > ThirdEnchantmentChance))
{
return true;
}
@@ -348,7 +345,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
// Next Enchantment (Fourth)
NewEnchantmentLevel = NewEnchantmentLevel / 2;
float FourthEnchantmentChance = (NewEnchantmentLevel + 1) / 50 * 100;
- if ((Random.NextFloat(100) > FourthEnchantmentChance) || (enchantments.size() == 0))
+ if (enchantments.empty() || (Random.NextFloat(100) > FourthEnchantmentChance))
{
return true;
}