diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-04-24 23:03:04 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-04-24 23:03:04 +0200 |
commit | 376dc880b37e1b104c86efebef0f294c34ca3c42 (patch) | |
tree | 269046846e0077c2f3d776f51e5c43a0d451c0a6 /src/Items/ItemHandler.cpp | |
parent | Fix armor in survival mode. (diff) | |
download | cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar.gz cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar.bz2 cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar.lz cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar.xz cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.tar.zst cuberite-376dc880b37e1b104c86efebef0f294c34ca3c42.zip |
Diffstat (limited to 'src/Items/ItemHandler.cpp')
-rw-r--r-- | src/Items/ItemHandler.cpp | 31 |
1 files changed, 25 insertions, 6 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); + } } } |