summaryrefslogtreecommitdiffstats
path: root/src/Inventory.cpp
diff options
context:
space:
mode:
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);
}
}