diff options
author | Mattes D <github@xoft.cz> | 2014-05-10 21:27:57 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-10 21:27:57 +0200 |
commit | 28815252e6ff086c0fab7cf56be4839f3d8612a3 (patch) | |
tree | 4532e85cbcc873a2616147713e9f899ecf84d111 /src/Items/ItemArmor.h | |
parent | Client cert is not requested. (diff) | |
parent | Merge pull request #993 from mc-server/GridStructGen (diff) | |
download | cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.gz cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.bz2 cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.lz cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.xz cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.zst cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.zip |
Diffstat (limited to 'src/Items/ItemArmor.h')
-rw-r--r-- | src/Items/ItemArmor.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h index 08cddb1ad..2436df5bd 100644 --- a/src/Items/ItemArmor.h +++ b/src/Items/ItemArmor.h @@ -60,6 +60,49 @@ public: return true; } + virtual bool CanRepairWithRawMaterial(short a_ItemType) override + { + switch (m_ItemType) + { + case E_ITEM_CHAIN_BOOTS: + case E_ITEM_CHAIN_CHESTPLATE: + case E_ITEM_CHAIN_HELMET: + case E_ITEM_CHAIN_LEGGINGS: + { + return (a_ItemType == E_ITEM_IRON); + } + case E_ITEM_DIAMOND_BOOTS: + case E_ITEM_DIAMOND_CHESTPLATE: + case E_ITEM_DIAMOND_HELMET: + case E_ITEM_DIAMOND_LEGGINGS: + { + return (a_ItemType == E_ITEM_DIAMOND); + } + case E_ITEM_IRON_BOOTS: + case E_ITEM_IRON_CHESTPLATE: + case E_ITEM_IRON_HELMET: + case E_ITEM_IRON_LEGGINGS: + { + return (a_ItemType == E_ITEM_IRON); + } + case E_ITEM_GOLD_BOOTS: + case E_ITEM_GOLD_CHESTPLATE: + case E_ITEM_GOLD_HELMET: + case E_ITEM_GOLD_LEGGINGS: + { + return (a_ItemType == E_ITEM_GOLD); + } + case E_ITEM_LEATHER_BOOTS: + case E_ITEM_LEATHER_CAP: + case E_ITEM_LEATHER_PANTS: + case E_ITEM_LEATHER_TUNIC: + { + return (a_ItemType == E_ITEM_LEATHER); + } + } + return false; + } + } ; |