From 3b429a9bdff601a4d36e9ae715f54f35e0569875 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 24 May 2013 07:20:16 +0000 Subject: Added ItemCategory::IsArmor() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1502 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Defines.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/Defines.h') diff --git a/source/Defines.h b/source/Defines.h index e92568d78..8b3c402c8 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -496,6 +496,18 @@ namespace ItemCategory (a_ItemType == E_ITEM_DIAMOND_BOOTS) ); } + + + + inline bool IsArmor(short a_ItemType) + { + return ( + IsHelmet(a_ItemType) || + IsChestPlate(a_ItemType) || + IsLeggings(a_ItemType) || + IsBoots(a_ItemType) + ); + } } // tolua_end -- cgit v1.2.3