summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemArmor.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-06 21:46:50 +0200
committerMattes D <github@xoft.cz>2014-05-06 21:46:50 +0200
commit66c5c81e02dd9350542e1dd65b8e33c2f45a011b (patch)
treee719f55d50354e881c8ace1ca83516596519abaf /src/Items/ItemArmor.h
parentMerge pull request #927 from mc-server/fixes (diff)
parentRename CanRepairWithItem to CanRepairWithRawMaterial and rename Size() to Count() (diff)
downloadcuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.gz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.bz2
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.lz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.xz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.zst
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.zip
Diffstat (limited to 'src/Items/ItemArmor.h')
-rw-r--r--src/Items/ItemArmor.h43
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;
+ }
+
} ;