summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}