summaryrefslogtreecommitdiffstats
path: root/src/Inventory.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-30 16:50:15 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-14 22:46:30 +0200
commit8656e149c8820272a882406912790f0075ed5f28 (patch)
treeb4f89f69dfb026f76862046637fd99162a49d3c9 /src/Inventory.cpp
parentMerge pull request #2352 from mmdk95/master (diff)
downloadcuberite-8656e149c8820272a882406912790f0075ed5f28.tar
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.gz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.bz2
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.lz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.xz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.zst
cuberite-8656e149c8820272a882406912790f0075ed5f28.zip
Diffstat (limited to 'src/Inventory.cpp')
-rw-r--r--src/Inventory.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/Inventory.cpp b/src/Inventory.cpp
index 6b3c8e62f..455a4bbe5 100644
--- a/src/Inventory.cpp
+++ b/src/Inventory.cpp
@@ -580,21 +580,9 @@ bool cInventory::AddToBar(cItem & a_Item, const int a_Offset, const int a_Size,
void cInventory::UpdateItems(void)
{
const cItem & Slot = GetEquippedItem();
-
- if (Slot.IsEmpty())
- {
- return;
- }
-
- switch (Slot.m_ItemType)
+ if (!Slot.IsEmpty())
{
- case E_ITEM_MAP:
- {
- ItemHandler(Slot.m_ItemType)->OnUpdate(m_Owner.GetWorld(), &m_Owner, Slot);
- break;
- }
-
- default: break;
+ ItemHandler(Slot.m_ItemType)->OnUpdate(m_Owner.GetWorld(), &m_Owner, Slot);
}
}