summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-17 19:31:43 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-17 19:31:43 +0200
commit0086fcfef18db58f3a4509853399c0a9b610e950 (patch)
treefa84dc65a061981a56c3040ef3ff87adb4182885 /src/Item.cpp
parentModified many things (diff)
downloadcuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar.gz
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar.bz2
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar.lz
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar.xz
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.tar.zst
cuberite-0086fcfef18db58f3a4509853399c0a9b610e950.zip
Diffstat (limited to '')
-rw-r--r--src/Item.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 8bc25d242..540725492 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -267,7 +267,7 @@ int cItem::GetEnchantability()
-bool cItem::EnchantByXPLevels(int a_NumXPLevels, cPlayer & a_Player, bool a_BlockConflictingEnchantments, bool a_DeleteLevelFromPlayer)
+bool cItem::EnchantByXPLevels(int a_NumXPLevels)
{
if (!cItem::IsEnchantable(m_ItemType) && m_ItemType != E_ITEM_BOOK)
{
@@ -338,12 +338,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels, cPlayer & a_Player, bool a_Bloc
}
}
- if (a_Player.DeltaExperience(-a_Player.XpForLevel(a_NumXPLevels)) >= 0 || a_Player.IsGameModeCreative())
- {
- return true;
- }
-
- return false;
+ return true;
}