summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-11 21:43:28 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-11 21:43:28 +0200
commit339992ffcd0935a285e768a1488bb7c91463ea47 (patch)
treef075bd40b42dd8906d0417d69d16a9832ec034e9 /source
parentAdded cItemHandler::GetMaxStackSize() with a very basic implementation (diff)
downloadcuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar.gz
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar.bz2
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar.lz
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar.xz
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.tar.zst
cuberite-339992ffcd0935a285e768a1488bb7c91463ea47.zip
Diffstat (limited to '')
-rw-r--r--source/Defines.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/source/Defines.h b/source/Defines.h
index fb856b835..70368373f 100644
--- a/source/Defines.h
+++ b/source/Defines.h
@@ -275,6 +275,58 @@ namespace ItemCategory
|| IsHoe ( a_ItemID )
|| IsShovel ( a_ItemID );
}
+
+
+
+ inline bool IsHelmet(ENUM_ITEM_ID a_ItemType)
+ {
+ return (
+ (a_ItemType == E_ITEM_LEATHER_CAP) ||
+ (a_ItemType == E_ITEM_GOLD_HELMET) ||
+ (a_ItemType == E_ITEM_CHAIN_HELMET) ||
+ (a_ItemType == E_ITEM_IRON_HELMET) ||
+ (a_ItemType == E_ITEM_DIAMOND_HELMET)
+ );
+ }
+
+
+
+ inline bool IsChestPlate(ENUM_ITEM_ID a_ItemType)
+ {
+ return (
+ (a_ItemType == E_ITEM_LEATHER_TUNIC) ||
+ (a_ItemType == E_ITEM_GOLD_CHESTPLATE) ||
+ (a_ItemType == E_ITEM_CHAIN_CHESTPLATE) ||
+ (a_ItemType == E_ITEM_IRON_CHESTPLATE) ||
+ (a_ItemType == E_ITEM_DIAMOND_CHESTPLATE)
+ );
+ }
+
+
+
+ inline bool IsLeggings(ENUM_ITEM_ID a_ItemType)
+ {
+ return (
+ (a_ItemType == E_ITEM_LEATHER_PANTS) ||
+ (a_ItemType == E_ITEM_GOLD_LEGGINGS) ||
+ (a_ItemType == E_ITEM_CHAIN_LEGGINGS) ||
+ (a_ItemType == E_ITEM_IRON_LEGGINGS) ||
+ (a_ItemType == E_ITEM_DIAMOND_LEGGINGS)
+ );
+ }
+
+
+
+ inline bool IsBoots(ENUM_ITEM_ID a_ItemType)
+ {
+ return (
+ (a_ItemType == E_ITEM_LEATHER_BOOTS) ||
+ (a_ItemType == E_ITEM_GOLD_BOOTS) ||
+ (a_ItemType == E_ITEM_CHAIN_BOOTS) ||
+ (a_ItemType == E_ITEM_IRON_BOOTS) ||
+ (a_ItemType == E_ITEM_DIAMOND_BOOTS)
+ );
+ }
}
//tolua_end