summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Items/ItemHandler.cpp31
-rw-r--r--src/UI/SlotArea.cpp2
2 files changed, 26 insertions, 7 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 2cb1471aa..ce9593a70 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -91,12 +91,6 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
{
- // Armor
- if (ItemCategory::IsArmor(a_ItemType))
- {
- return new cItemArmorHandler(a_ItemType);
- }
-
switch(a_ItemType)
{
default: return new cItemHandler(a_ItemType);
@@ -229,6 +223,31 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
{
return new cItemFoodHandler(a_ItemType);
}
+
+ // Armor:
+ case E_ITEM_LEATHER_CAP:
+ case E_ITEM_GOLD_HELMET:
+ case E_ITEM_CHAIN_HELMET:
+ case E_ITEM_IRON_HELMET:
+ case E_ITEM_DIAMOND_HELMET:
+ case E_ITEM_LEATHER_TUNIC:
+ case E_ITEM_GOLD_CHESTPLATE:
+ case E_ITEM_CHAIN_CHESTPLATE:
+ case E_ITEM_IRON_CHESTPLATE:
+ case E_ITEM_DIAMOND_CHESTPLATE:
+ case E_ITEM_LEATHER_PANTS:
+ case E_ITEM_GOLD_LEGGINGS:
+ case E_ITEM_CHAIN_LEGGINGS:
+ case E_ITEM_IRON_LEGGINGS:
+ case E_ITEM_DIAMOND_LEGGINGS:
+ case E_ITEM_LEATHER_BOOTS:
+ case E_ITEM_GOLD_BOOTS:
+ case E_ITEM_CHAIN_BOOTS:
+ case E_ITEM_IRON_BOOTS:
+ case E_ITEM_DIAMOND_BOOTS:
+ {
+ return new cItemArmorHandler(a_ItemType);
+ }
}
}
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index ef4cf17cd..87b4032e0 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1108,7 +1108,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C
return;
}
- //Armors haven't a dbl click
+ // Armors haven't a dbl click
if (a_ClickAction == caDblClick)
{
return;